]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: tps65132: Stop parsing DT when gpio is not found
authorGuido Günther <agx@sigxcpu.org>
Wed, 4 Sep 2019 19:35:00 +0000 (12:35 -0700)
committerMark Brown <broonie@kernel.org>
Thu, 5 Sep 2019 18:07:30 +0000 (19:07 +0100)
commitc67ba8a20d8191a8125e8ed22c8c05616f86798a
tree98fe8d2799eb23ad79949ac8c7c422ff9fe68271
parent909b9c691c08318e58c9dd4b01a90b63a1b828ba
regulator: tps65132: Stop parsing DT when gpio is not found

In case of a missing (optional) gpio don't fall through up to
"ti,active-discharge-time-us" due to
devm_fwnode_get_index_gpiod_from_child() returning NULL (since
gpiod_get_from_of_node() returned NULL) but rather indicate success as
intended.

This makes the driver probe correctly when e.g. only the enable gpio is
given.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Link: https://lore.kernel.org/r/363bd50cc7c60daa57d614a341d1fd649f05194c.1567625660.git.agx@sigxcpu.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/tps65132-regulator.c