diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2022-09-28 10:50:52 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-10-04 09:46:55 +0200 |
commit | 088cafe05866861f4d5185d8919771e2d7eba763 (patch) | |
tree | 609b1c61b51d1039a534e392e77dce7ff261606c /drivers/mfd | |
parent | e45139b132c6f3a0813254f7380f210fd09ac4fb (diff) | |
download | barebox-088cafe05866861f4d5185d8919771e2d7eba763.tar.gz |
mfd: axp20x: export axp20x-regulator child for AXP152
While the upstream Linux driver doesn't support regulator configuration
for the AXP152, we may need this in barebox for initial regulator setup.
Thus have the MFD driver register the appropriate child device as done
for the other drivers. While at it, pass along the axp20x driver data
object. This is needed, so the regulator driver can query the variant;
so far it was only possible to retrieve the parent regmap and redo the
revision readout.
Signed-off-by: Johannes Zink <j.zink@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220928085052.2599436-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/axp20x.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index da1e8ce35a..0a53eaea7c 100644 --- a/drivers/mfd/axp20x.c +++ b/drivers/mfd/axp20x.c @@ -141,6 +141,9 @@ static const struct mfd_cell axp152_cells[] = { { .name = "axp20x-pek", }, + { + .name = "axp20x-regulator", + }, }; static const struct mfd_cell axp288_cells[] = { @@ -337,6 +340,8 @@ int axp20x_device_probe(struct axp20x_dev *axp20x) AXP806_REG_ADDR_EXT_ADDR_SLAVE_MODE); } + axp20x->dev->priv = axp20x; + ret = mfd_add_devices(axp20x->dev, axp20x->cells, axp20x->nr_cells); if (ret) return dev_err_probe(axp20x->dev, ret, "failed to add MFD devices\n"); |