Le 03/01/2025 à 23:57, Shree Ramamoorthy a écrit :
Use chip ID and chip_data struct to differentiate between devices in
probe(). Add TPS65215 resource information. Update descriptions and
copyright information to reflect the driver supports 2 PMIC devices.
Signed-off-by: Shree Ramamoorthy <s-ramamoorthy@xxxxxx>
...
@@ -218,10 +333,29 @@ static const struct regmap_irq_chip tps65219_irq_chip = {
.sub_reg_offsets = tps65219_sub_irq_offsets,
};
+struct tps65219_chip_data {
Maybe tps6521x_chip_data?
(and if so, same for gpio-tps65219.c)
+ const struct regmap_irq_chip *irq_chip;
+ const struct mfd_cell *cells;
+ int n_cells;
+};
+
+static struct tps65219_chip_data chip_info_table[] = {
+ [TPS65215] = {
+ .irq_chip = &tps65215_irq_chip,
+ .cells = tps65215_cells,
+ .n_cells = ARRAY_SIZE(tps65215_cells),
+ },
+ [TPS65219] = {
+ .irq_chip = &tps65219_irq_chip,
+ .cells = tps65219_cells,
+ .n_cells = ARRAY_SIZE(tps65219_cells),
+ },
+};
...
@@ -291,7 +427,10 @@ static int tps65219_probe(struct i2c_client *client)
}
static const struct of_device_id of_tps65219_match_table[] = {
- { .compatible = "ti,tps65219", },
+ { .compatible = "ti,tps65215", .data = (void *)TPS65215, },
+ { .compatible = "ti,tps65219", .data = (void *)TPS65219, },
+ { .compatible = "ti,tps65219", .data = (void *)TPS65219, },
+ { .compatible = "ti,tps65215", .data = (void *)TPS65215, },
{}
Entries look duplicated.
};
...
CJ