Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: max77686: switch to using fwnode_gpiod_get_index

gpiod_get_from_of_node() is being retired in favor of
fwnode_gpiod_get_index(), that behaves similar to gpiod_get_index(),
but can work with arbitrary firmware node. It will also be able to
support secondary software nodes.

Let's switch this driver over.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Link: https://lore.kernel.org/r/20191004231017.130290-8-dmitry.torokhov@gmail.com
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Dmitry Torokhov and committed by
Mark Brown
0b2ba815 22803ca3

+3 -2
+3 -2
drivers/regulator/max77686-regulator.c
··· 256 256 case MAX77686_BUCK8: 257 257 case MAX77686_BUCK9: 258 258 case MAX77686_LDO20 ... MAX77686_LDO22: 259 - config->ena_gpiod = gpiod_get_from_of_node(np, 260 - "maxim,ena-gpios", 259 + config->ena_gpiod = fwnode_gpiod_get_index( 260 + of_fwnode_handle(np), 261 + "maxim,ena", 261 262 0, 262 263 GPIOD_OUT_HIGH | GPIOD_FLAGS_BIT_NONEXCLUSIVE, 263 264 "max77686-regulator");