diff options
author | Andreas Kemnade <andreas@kemnade.info> | 2023-09-16 12:05:13 +0200 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2023-11-01 10:02:12 +0000 |
commit | 63416320419e99ea4c6530587658e5d14e9402ba (patch) | |
tree | 2d57fc6d48e76d28530a6a6c42c1651c3d2761af /drivers/mfd/twl-core.c | |
parent | b06545fcb3c696f36fac6ba4c73023cef96d2f7f (diff) | |
download | lwn-63416320419e99ea4c6530587658e5d14e9402ba.tar.gz lwn-63416320419e99ea4c6530587658e5d14e9402ba.zip |
mfd: twl-core: Add a clock subdevice for the TWL6032
Clock device needs no separate devicetree node, so add it as
a platform device. Other devices in the family also have controllable
clocks, but due to the lack of testing, just add it for the TWL6032
now.
Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
Link: https://lore.kernel.org/r/20230916100515.1650336-4-andreas@kemnade.info
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/mfd/twl-core.c')
-rw-r--r-- | drivers/mfd/twl-core.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c index ce01a87f8dc3..234500b2e53f 100644 --- a/drivers/mfd/twl-core.c +++ b/drivers/mfd/twl-core.c @@ -31,6 +31,8 @@ #include <linux/regulator/machine.h> #include <linux/i2c.h> + +#include <linux/mfd/core.h> #include <linux/mfd/twl.h> /* Register descriptions for audio */ @@ -690,6 +692,10 @@ static struct of_dev_auxdata twl_auxdata_lookup[] = { { /* sentinel */ }, }; +static const struct mfd_cell twl6032_cells[] = { + { .name = "twl6032-clk" }, +}; + /* NOTE: This driver only handles a single twl4030/tps659x0 chip */ static int twl_probe(struct i2c_client *client) @@ -836,6 +842,16 @@ twl_probe(struct i2c_client *client) TWL4030_DCDC_GLOBAL_CFG); } + if (id->driver_data == (TWL6030_CLASS | TWL6032_SUBCLASS)) { + status = devm_mfd_add_devices(&client->dev, + PLATFORM_DEVID_NONE, + twl6032_cells, + ARRAY_SIZE(twl6032_cells), + NULL, 0, NULL); + if (status < 0) + goto free; + } + status = of_platform_populate(node, NULL, twl_auxdata_lookup, &client->dev); |