[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7hplwz565x.fsf@baylibre.com>
Date: Wed, 14 Feb 2024 09:04:10 -0800
From: Kevin Hilman <khilman@...nel.org>
To: Bhargav Raviprakash <bhargav.r@...s.com>, linux-kernel@...r.kernel.org
Cc: m.nirmaladevi@...s.com, lee@...nel.org, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
jpanis@...libre.com, devicetree@...r.kernel.org, arnd@...db.de,
gregkh@...uxfoundation.org, lgirdwood@...il.com, broonie@...nel.org,
linus.walleij@...aro.org, linux-gpio@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, nm@...com, vigneshr@...com,
kristo@...nel.org, Bhargav Raviprakash <bhargav.r@...s.com>
Subject: Re: [RESEND PATCH v1 04/13] mfd: tps6594-i2c: Add TI TPS65224 PMIC I2C
Hello,
Bhargav Raviprakash <bhargav.r@...s.com> writes:
> Add support for TPS65224 PMIC in TPS6594's I2C driver which has
> significant functional overlap.
>
> Signed-off-by: Bhargav Raviprakash <bhargav.r@...s.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
Powered by blists - more mailing lists