leds: qpnp-flash-v2: Fix pinctrl configuration
Currently pinctrl is obtained after it is used to obtain
strobe_enable and strobe_disable states. This is incorrect and
needs to be fixed. Also, when the switch device is disabled, the
pinctrl configuration for GPIO that drives the LED output is
selected only when the brightness or current is set to a non-zero
value in flash device.
To keep it simple, move the pinctrl configuration for GPIO that
drives the LED output (e.g. flash LED3) to the switch device so
that both flash and torch device need not have to control it.
Also, fix the pinctrl configuration for GPIO21 that is used to
drive flash LED3 output on sdm845 CDP and MTP for functional
correctness.
Change-Id: If6ec27dd39fd750b6d4311a5e370020961f30e08
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
4 files changed