regulator: rk808: fix asynchronous probing
authorSebastian Reichel <sebastian.reichel@collabora.com>
Thu, 4 May 2023 17:36:15 +0000 (19:36 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 23 May 2023 18:01:56 +0000 (19:01 +0100)
commit1b9e86d445a0f5c6d8dcbaf11508cb5dfb5848a8
tree8d97aa969afae4790df38d9d8b6c61a69baef754
parent431cb97b763133fba8b1c68c1ed089315f25e4dd
regulator: rk808: fix asynchronous probing

If the probe routine fails with -EPROBE_DEFER after taking over the
OF node from its parent driver, reprobing triggers pinctrl_bind_pins()
and that will fail. Fix this by setting of_node_reused, so that the
device does not try to setup pin muxing.

For me this always happens once the driver is marked to prefer async
probing and never happens without that flag.

Fixes: 259b93b21a9f ("regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in 4.14")
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20230504173618.142075-12-sebastian.reichel@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/rk808-regulator.c