[RESEND PATCH v1 04/13] mfd: tps6594-i2c: Add TI TPS65224 PMIC I2C
Kevin Hilman
khilman at kernel.org
Wed Feb 14 09:04:10 PST 2024
Hello,
Bhargav Raviprakash <bhargav.r at ltts.com> writes:
> Add support for TPS65224 PMIC in TPS6594's I2C driver which has
> significant functional overlap.
>
> Signed-off-by: Bhargav Raviprakash <bhargav.r at ltts.com>
Thanks for the patch adding TPS65224 support
[...]
> @@ -216,15 +217,18 @@ static int tps6594_i2c_probe(struct i2c_client *client)
> tps->reg = client->addr;
> tps->irq = client->irq;
>
> - tps->regmap = devm_regmap_init(dev, NULL, client, &tps6594_i2c_regmap_config);
> - if (IS_ERR(tps->regmap))
> - return dev_err_probe(dev, PTR_ERR(tps->regmap), "Failed to init regmap\n");
> -
> match = of_match_device(tps6594_i2c_of_match_table, dev);
> if (!match)
> return dev_err_probe(dev, -EINVAL, "Failed to find matching chip ID\n");
> tps->chip_id = (unsigned long)match->data;
>
> + if (tps->chip_id == TPS65224)
> + tps6594_i2c_regmap_config.volatile_table = &tps65224_volatile_table;
minor nit: for chip-specific differnces like this, rather than do this
kind of "if" check here to update the regmap_config, instead use the
compatible match data have a separate i2c_regmap_config match table for
tps65224.
Kevin
More information about the linux-arm-kernel
mailing list