ChiYuan Huang
aefe5fc300
regulator: rt4831: Add active_discharge_on to fix discharge API
...
To use set_discharge helper function, active_discharge_on need to be
added.
Signed-off-by: ChiYuan Huang <cy_huang@richtek.com >
Link: https://lore.kernel.org/r/1648171577-9663-3-git-send-email-u0084500@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-25 16:09:31 +00:00
ChiYuan Huang
184ae0e32b
regulator: rt4831: Add bypass mask to fix set_bypass API work
...
To use set/get_bypass helper function, bypass mask need to be specified.
Signed-off-by: ChiYuan Huang <cy_huang@richtek.com >
Link: https://lore.kernel.org/r/1648171577-9663-2-git-send-email-u0084500@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-25 16:09:30 +00:00
Rohit Agarwal
5999f85dde
regulator: qcom-rpmh: Add support for SDX65
...
Add support from RPMH regulators found in SDX65 platform.
Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com >
Link: https://lore.kernel.org/r/1647410837-22537-3-git-send-email-quic_rohiagar@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-18 16:05:06 +00:00
Rohit Agarwal
e34855b996
regulator: dt-bindings: Add PMX65 compatibles
...
Add PMX65 compatibles for PMIC found in SDX65 platform.
Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com >
Link: https://lore.kernel.org/r/1647410837-22537-2-git-send-email-quic_rohiagar@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-18 16:05:05 +00:00
Haowen Bai
8a317e0079
regulator: vctrl: Use min() instead of doing it manually
...
Fix following coccicheck warning:
drivers/regulator/vctrl-regulator.c:188:15-17: WARNING opportunity for max()
Signed-off-by: Haowen Bai <baihaowen@meizu.com >
Link: https://lore.kernel.org/r/1647315190-16139-1-git-send-email-baihaowen@meizu.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-15 12:03:51 +00:00
ChiYuan Huang
760423dfad
regulator: rt5190a: Add support for Richtek RT5190A PMIC
...
Add support for Richtek RT5190A PMIC.
Signed-off-by: ChiYuan Huang <cy_huang@richtek.com >
Link: https://lore.kernel.org/r/1646812903-32496-3-git-send-email-u0084500@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-09 13:32:25 +00:00
ChiYuan Huang
b77e70f6b8
regulator: Add bindings for Richtek RT5190A PMIC
...
Add bindings for Richtek RT5190A PMIC.
Signed-off-by: ChiYuan Huang <cy_huang@richtek.com >
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com >
Link: https://lore.kernel.org/r/1646812903-32496-2-git-send-email-u0084500@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-09 13:32:21 +00:00
Georgi Vlaev
2594703044
regulator: Convert TPS62360 binding to json-schema
...
Convert the TPS62360 regulator binding to DT schema format
using json-schema.
This also removes redundant "ti,enable-force-pwm" property
from the example. The property description was removed from the
original text binding file by commit 9a00630c3d ("regulator:
tps62360: support force PWM mode via regulator mode"), but a
reference to it remained in the example.
Signed-off-by: Georgi Vlaev <g-vlaev@ti.com >
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com >
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com >
Link: https://lore.kernel.org/r/20220308134454.14504-1-g-vlaev@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-08 17:24:43 +00:00
Tom Rix
bbc7ba0fa0
regulator: cleanup comments
...
For spdx
Remove leading space, add space after //
Replacements
overriden to overridden
Calulate to Calculate
addional to additional
regulatior to regulator
devive to device
Signed-off-by: Tom Rix <trix@redhat.com >
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com >
Link: https://lore.kernel.org/r/20220305162438.689442-1-trix@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-07 13:15:01 +00:00
Vincent Whitchurch
80c056656d
regulator: virtual: add devicetree support
...
The reg-virt-consumer is very useful for development and testing of
regulator drivers since it allows voltages and modes to be set from
userspace. However, it currently requires platform data so it cannot be
used without patching the kernel. Add support for probing it from the
devicetree to remedy this.
Since this driver is only meant for testing and is a purely software
construct, no binding documentation is added.
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com >
Link: https://lore.kernel.org/r/20220301111831.3742383-4-vincent.whitchurch@axis.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-02 13:45:31 +00:00
Vincent Whitchurch
d2fb5487ec
regulator: virtual: warn against production use
...
This driver is only meant for debugging and testing. Currently, it's
not possible to use it without patching the kernel since it requires
platform data, but we'll be adding devicetree support, so add a loud
warning to make it clear that it's still only meant for debugging and
testing.
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com >
Link: https://lore.kernel.org/r/20220301111831.3742383-3-vincent.whitchurch@axis.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-02 13:45:30 +00:00
Vincent Whitchurch
75c3543e39
regulator: virtual: use dev_err_probe()
...
Use dev_err_probe() to avoid printing spurious warnings on
probe deferral.
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com >
Link: https://lore.kernel.org/r/20220301111831.3742383-2-vincent.whitchurch@axis.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-03-02 13:45:29 +00:00
Vincent Whitchurch
a94e5cd845
regulator: tps62864: Fix bindings for SW property
...
The property is not a pattern, so it should use 'properties' instead of
'patternProperties'. Also, unevaluatedProperties should be set to false
like in the other regulator bindings.
Reported-by: Rob Herring <robh@kernel.org >
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com >
Link: https://lore.kernel.org/r/20220211132449.2899924-1-vincent.whitchurch@axis.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-02-14 12:53:01 +00:00
Vincent Whitchurch
e2a01b4e88
regulator: Add support for TPS6286x
...
TI's TPS62864/TPS6286/TPS62868/TPS62869 are high-frequency synchronous
step-down converters controlled via I2C. There are differences in the
electrical characteristics and packaging between the variants, but the
register interfaces are identical.
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com >
Link: https://lore.kernel.org/r/20220204155241.576342-3-vincent.whitchurch@axis.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-02-08 13:38:10 +00:00
Vincent Whitchurch
2f04aa69ab
regulator: Add bindings for TPS62864x
...
Add bindings for the TPS62864/TPS6286/TPS62868/TPS62869 voltage
regulators.
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com >
Link: https://lore.kernel.org/r/20220204155241.576342-2-vincent.whitchurch@axis.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-02-08 13:38:08 +00:00
Dave Stevenson
e4a7e3f741
regulator/rpi-panel-attiny: Use two transactions for I2C read
...
The I2C to the Atmel is very fussy, and locks up easily on
Pi0-3 particularly on reads.
If running at 100kHz on Pi3, reading the ID register generally
locks up the Atmel, but splitting the register select write and
read into two transactions is reliable.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com >
Link: https://lore.kernel.org/r/20220124220129.158891-10-detlev.casanova@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-01-28 20:55:53 +00:00
Dave Stevenson
5fa4e8ea64
regulator/rpi-panel-attiny: Use the regmap cache
...
The I2C to the Atmel is very fussy, and locks up easily on
Pi0-3 particularly on reads.
The LCD power status is controlled solely by this driver, so
rather than reading it back from the Atmel, use the regmap cache
to avoid reading values.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com >
Link: https://lore.kernel.org/r/20220124220129.158891-9-detlev.casanova@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-01-28 20:55:52 +00:00
Dave Stevenson
1d746d448f
regulator: rpi-panel: Remove get_brightness hook
...
The driver was implementing a get_brightness function that
tried to read back the PWM setting of the display to report
as the current brightness.
The controller on the display does not support that, therefore
we end up reporting a brightness of 0, and that confuses
systemd's backlight service.
Remove the hook so that the framework returns the current
brightness automatically.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com >
Link: https://lore.kernel.org/r/20220124220129.158891-8-detlev.casanova@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-01-28 20:55:51 +00:00
Dave Stevenson
8c518eb403
regulator: rpi-panel: Add GPIO control for panel and touch resets
...
We need independent control of the resets for the panel&bridge,
vs the touch controller.
Expose the reset lines that are on the Atmel's port C via the GPIO
API so that they can be controlled appropriately.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com >
Link: https://lore.kernel.org/r/20220124220129.158891-7-detlev.casanova@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-01-28 20:55:50 +00:00
Dave Stevenson
4866e35e48
regulator: rpi-panel: Convert to drive lines directly
...
The Atmel was doing a load of automatic sequencing of
control lines, however it was combining the touch controller's
reset with the bridge/panel control.
Change to control the control signals directly rather than
through the automatic POWERON control.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com >
Link: https://lore.kernel.org/r/20220124220129.158891-6-detlev.casanova@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-01-28 20:55:49 +00:00
Dave Stevenson
89339a2ae7
regulator: rpi-panel: Ensure the backlight is off during probe.
...
The initial state of the Atmel is not defined, so ensure the
backlight PWM is set to 0 by default.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com >
Link: https://lore.kernel.org/r/20220124220129.158891-5-detlev.casanova@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-01-28 20:55:48 +00:00
Dave Stevenson
00440bcd21
regulator: rpi-panel: Serialise operations.
...
The driver was using the regmap lock to serialise the
individual accesses, but we really need to protect the
timings of enabling the regulators, including any communication
with the Atmel.
Use a mutex within the driver to control overall accesses to
the Atmel, instead of the regmap lock.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com >
Link: https://lore.kernel.org/r/20220124220129.158891-4-detlev.casanova@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-01-28 20:55:47 +00:00
Dave Stevenson
5665eee7a3
regulator: rpi-panel: Handle I2C errors/timing to the Atmel
...
The Atmel is doing some things in the I2C ISR, during which
period it will not respond to further commands. This is
particularly true of the POWERON command.
Increase delays appropriately, and retry should I2C errors be
reported.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com >
Link: https://lore.kernel.org/r/20220124220129.158891-3-detlev.casanova@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-01-28 20:55:45 +00:00
Dave Stevenson
7291e7d686
regulator: rpi-panel: Register with a unique backlight name
...
There's no reason why 2 Raspberry Pi DSI displays can't be
attached to a Pi Compute Module, so the backlight names need to
be unique.
Use the parent dev_name. It's not as readable, but is unique.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com >
Link: https://lore.kernel.org/r/20220124220129.158891-2-detlev.casanova@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-01-28 20:55:44 +00:00
Christophe JAILLET
bef8c5fdf5
spi: qcom: geni: Simplify DMA setting
...
As stated in [1], dma_set_mask() with a 64-bit mask will never fail if
dev->dma_mask is non-NULL.
So, if it fails, the 32 bits case will also fail for the same reason.
Simplify code and remove some dead code accordingly.
[1]: https://lkml.org/lkml/2021/6/7/398
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Link: https://lore.kernel.org/r/1b14e4ce91a33c16b2c655389c728071a9c9aa2e.1641643601.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org >
2022-01-28 16:00:24 +00:00