mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 17:25:38 +00:00
mfd: twl-core: Add a clock subdevice for the TWL6030
Also the TWL6030 has some clocks, so add a subdevice for that. Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Reviewed-by: Roger Quadros <rogerq@kernel.org> Link: https://lore.kernel.org/r/20241014161109.2222-2-andreas@kemnade.info Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
parent
5bcecfcaa6
commit
f2be0c3a95
@ -711,6 +711,10 @@ static struct of_dev_auxdata twl_auxdata_lookup[] = {
|
|||||||
{ /* sentinel */ },
|
{ /* sentinel */ },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct mfd_cell twl6030_cells[] = {
|
||||||
|
{ .name = "twl6030-clk" },
|
||||||
|
};
|
||||||
|
|
||||||
static const struct mfd_cell twl6032_cells[] = {
|
static const struct mfd_cell twl6032_cells[] = {
|
||||||
{ .name = "twl6032-clk" },
|
{ .name = "twl6032-clk" },
|
||||||
};
|
};
|
||||||
@ -861,17 +865,23 @@ twl_probe(struct i2c_client *client)
|
|||||||
TWL4030_DCDC_GLOBAL_CFG);
|
TWL4030_DCDC_GLOBAL_CFG);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (id->driver_data == (TWL6030_CLASS | TWL6032_SUBCLASS)) {
|
if (twl_class_is_6030()) {
|
||||||
status = devm_mfd_add_devices(&client->dev,
|
const struct mfd_cell *cells;
|
||||||
PLATFORM_DEVID_NONE,
|
int num_cells;
|
||||||
twl6032_cells,
|
|
||||||
ARRAY_SIZE(twl6032_cells),
|
if (id->driver_data & TWL6032_SUBCLASS) {
|
||||||
NULL, 0, NULL);
|
cells = twl6032_cells;
|
||||||
|
num_cells = ARRAY_SIZE(twl6032_cells);
|
||||||
|
} else {
|
||||||
|
cells = twl6030_cells;
|
||||||
|
num_cells = ARRAY_SIZE(twl6030_cells);
|
||||||
|
}
|
||||||
|
|
||||||
|
status = devm_mfd_add_devices(&client->dev, PLATFORM_DEVID_NONE,
|
||||||
|
cells, num_cells, NULL, 0, NULL);
|
||||||
if (status < 0)
|
if (status < 0)
|
||||||
goto free;
|
goto free;
|
||||||
}
|
|
||||||
|
|
||||||
if (twl_class_is_6030()) {
|
|
||||||
if (of_device_is_system_power_controller(node)) {
|
if (of_device_is_system_power_controller(node)) {
|
||||||
if (!pm_power_off)
|
if (!pm_power_off)
|
||||||
pm_power_off = twl6030_power_off;
|
pm_power_off = twl6030_power_off;
|
||||||
|
Loading…
Reference in New Issue
Block a user