]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: lp8788-ldo: Pass descriptor instead of GPIO number
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 14 May 2018 08:06:28 +0000 (10:06 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 24 May 2018 15:50:31 +0000 (16:50 +0100)
commit12434e72949e57cc9103368a12653a79fd2d4679
tree08f177171e5c7ecbaab1bd816fa28acb6d4161a8
parent80c454286505b58499c4c23459d372392ba0d420
regulator: lp8788-ldo: Pass descriptor instead of GPIO number

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

This driver has supported passing a LDO enable GPIO for years,
yet this facility has never been put to use in the upstream kernel.
If someone desires to put in place GPIO control for the LDOs,
this can be done by adding a GPIO descriptor table in the MFD
nexus in drivers/mfd/lp8788.c for the LDO device when spawning the
MFD children, or using a board file.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/lp8788-ldo.c
include/linux/mfd/lp8788.h