]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9296248a704960965cbc97d7876843200c8f79b1
tree5eff24c4c9241bb7dc2ee73b274d39dac0740b1c
parentb37c333349489235cc121efc88fd7a0474d9feb4
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