]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
mfd: tps65219: Remove TPS65219_REG_TI_DEV_ID check
authorShree Ramamoorthy <s-ramamoorthy@ti.com>
Thu, 6 Feb 2025 17:37:23 +0000 (11:37 -0600)
committerLee Jones <lee@kernel.org>
Fri, 14 Mar 2025 08:59:06 +0000 (08:59 +0000)
The chipid macro/variable and regmap_read function call is not needed
because the TPS65219_REG_TI_DEV_ID register value is not a consistent value
across TPS65219 PMIC config versions. Reading from the DEV_ID register
without a consistent value to compare it to isn't useful. There isn't a
way to verify the match data ID is the same ID read from the DEV_ID device
register. 0xF0 isn't a DEV_ID value consistent across TPS65219 NVM
configurations.

For TPS65215, there is a consistent value in bits 5-0 of the DEV_ID
register. However, there are other error checks in place within probe()
that apply to both PMICs rather than keeping this isolated check for one
PMIC.

Signed-off-by: Shree Ramamoorthy <s-ramamoorthy@ti.com>
Link: https://lore.kernel.org/r/20250206173725.386720-4-s-ramamoorthy@ti.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/tps65219.c

index 081c5a30b04a25f5379b99a97803b84d3c683aa3..4aca922658e34d5f3c4d0d5d97225994879271d9 100644 (file)
@@ -221,7 +221,6 @@ static const struct regmap_irq_chip tps65219_irq_chip = {
 static int tps65219_probe(struct i2c_client *client)
 {
        struct tps65219 *tps;
-       unsigned int chipid;
        bool pwr_button;
        int ret;
 
@@ -246,12 +245,6 @@ static int tps65219_probe(struct i2c_client *client)
        if (ret)
                return ret;
 
-       ret = regmap_read(tps->regmap, TPS65219_REG_TI_DEV_ID, &chipid);
-       if (ret) {
-               dev_err(tps->dev, "Failed to read device ID: %d\n", ret);
-               return ret;
-       }
-
        ret = devm_mfd_add_devices(tps->dev, PLATFORM_DEVID_AUTO,
                                   tps65219_cells, ARRAY_SIZE(tps65219_cells),
                                   NULL, 0, regmap_irq_get_domain(tps->irq_data));