OSDN Git Service

leds: qpnp-flash-v2: modify regulator control for switch devices
authorSubbaraman Narayanamurthy <subbaram@codeaurora.org>
Tue, 25 Oct 2016 03:22:19 +0000 (20:22 -0700)
committerSubbaraman Narayanamurthy <subbaram@codeaurora.org>
Fri, 11 Nov 2016 19:59:15 +0000 (11:59 -0800)
commit05939b3db20fa73d54ff39bcb221a1a54b3be58b
tree1e865d77f500b3bb31b52dbf235a8dcc2bff7f19
parente03e61b954b87c39c7481b84b29cbd96357b90cb
leds: qpnp-flash-v2: modify regulator control for switch devices

Currently multiple regulator devices can be specified for LED
switch device though a switch device may just require one supply.
Also, before the switch device is enabled, voltage request is
sent to set the maximum voltage. This is not needed with the
regulators like BoB being used as supply for the switch device.
Just enabling the regulator is enough during switch operation.
Modify the way the regulator is obtained and controlled for
switch operation.

Since BoB regulator is configured by the bootloader properly
for flash operation, remove them from the supply list of LED
switch devices on pmicobalt and pm2falcon.

While at it, fix the way device tree properties are read from
flash/torch, switch devices.

CRs-Fixed: 1083246
Change-Id: I8eb5f305f89bc18ad4b735bd89cbf259f0e1ea11
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Documentation/devicetree/bindings/leds/leds-qpnp-flash-v2.txt
arch/arm/boot/dts/qcom/msm-pm2falcon.dtsi
arch/arm/boot/dts/qcom/msm-pmicobalt.dtsi
drivers/leds/leds-qpnp-flash-v2.c