regulator: da9055: Fully convert to GPIO descriptors
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 20 Feb 2024 08:36:25 +0000 (09:36 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 26 Feb 2024 13:46:34 +0000 (13:46 +0000)
commite450a2b3a335332d4a51fe10c9fff8150c6e2364
tree9b7f53325058d7e588c68e7e63402672255624d2
parent4d52f575e258c6f93f4180c21afda8634b0d2af5
regulator: da9055: Fully convert to GPIO descriptors

The DA9055 regulator was touched before, requireing enable GPIOs
to be passed from pdata.

As we have a device for each regulator, obtain the three gpios
ren ("regulator enable"), rsel ("regulator select") and the
ena ("enable") GPIO associated with the regulator enable
directly from the device and cut down on the amount of
GPIO numbers passed as platform data.

The ren and rsel are just requested as inputs: these are
actually handled by hardware. The ena gpios are driven
actively by the regulator core.

There are no in-tree users, but the regulators are instantiated
from the (undocumed) device tree nodes with "dlg,da9055-regulator"
as compatible, and by simply adding regulator-enable-gpios,
regulator-select-gpios and enable-gpios to this DT node, all
will work as before.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://msgid.link/r/20240220-descriptors-regulators-v1-2-097f608694be@linaro.org
Acked-by: Lee Jones <lee@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/da9055-regulator.c
include/linux/mfd/da9055/pdata.h