regulator: s2mps11: Pass descriptor instead of GPIO number
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 15 Nov 2018 08:01:17 +0000 (09:01 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 15 Nov 2018 19:40:35 +0000 (11:40 -0800)
commit1c984942f0a480ed41635528234b8bc672f6bac7
tree5eff24c4c9241bb7dc2ee73b274d39dac0740b1c
parente770b18bbbaecebfb37389b45bf82974a17488d7
regulator: s2mps11: Pass descriptor instead of GPIO number

Instead of passing a global GPIO number for the enable GPIO, pass
a descriptor looked up with the standard devm_gpiod_get_optional()
call.

This regulator supports passing platform data, but enable/sleep
regulators are looked up from the device tree exclusively, so
we can need not touch other files.

Tested on Odroid XU3 (with s2mps11 although not using any GPIOs
for regulators, so at least default paths are not broken).

Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: Chanwoo Choi <cw00.choi@samsung.com>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Tested-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/s2mps11.c