diff options
author | Lee Jones <lee@kernel.org> | 2023-08-18 21:47:03 +0100 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2023-08-18 21:47:03 +0100 |
commit | 2ccfad1c2be781f3695f213de740a26d3e6913a3 (patch) | |
tree | fc3d86dcbe3d358f5b2146a95cbc59cbb9a12763 /drivers/mfd | |
parent | d5282a53929791071b17dde3eed52e40f76b101c (diff) | |
parent | c01467355f8eb126cab0ef28b66bb506fe6a2e21 (diff) |
Merge tags 'ib-mfd-pinctrl-soundwire-v6.6' and 'ib-mfd-regulator-v6.6' into ibs-for-mfd-merged
Immutable branch between MFD, Pinctrl and soundwire due for the v6.6 merge window
Immutable branch between MFD and Regulator due for the v6.6 merge window
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/tps65086.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/mfd/tps65086.c b/drivers/mfd/tps65086.c index 6a21000aad4a..9bb7d7d8dcfc 100644 --- a/drivers/mfd/tps65086.c +++ b/drivers/mfd/tps65086.c @@ -81,16 +81,23 @@ static int tps65086_probe(struct i2c_client *client) return PTR_ERR(tps->regmap); } - ret = regmap_read(tps->regmap, TPS65086_DEVICEID, &version); + /* Store device ID to load regulator configuration that fit to IC variant */ + ret = regmap_read(tps->regmap, TPS65086_DEVICEID1, &tps->chip_id); if (ret) { - dev_err(tps->dev, "Failed to read revision register\n"); + dev_err(tps->dev, "Failed to read revision register 1\n"); + return ret; + } + + ret = regmap_read(tps->regmap, TPS65086_DEVICEID2, &version); + if (ret) { + dev_err(tps->dev, "Failed to read revision register 2\n"); return ret; } dev_info(tps->dev, "Device: TPS65086%01lX, OTP: %c, Rev: %ld\n", - (version & TPS65086_DEVICEID_PART_MASK), - (char)((version & TPS65086_DEVICEID_OTP_MASK) >> 4) + 'A', - (version & TPS65086_DEVICEID_REV_MASK) >> 6); + (version & TPS65086_DEVICEID2_PART_MASK), + (char)((version & TPS65086_DEVICEID2_OTP_MASK) >> 4) + 'A', + (version & TPS65086_DEVICEID2_REV_MASK) >> 6); if (tps->irq > 0) { ret = regmap_add_irq_chip(tps->regmap, tps->irq, IRQF_ONESHOT, 0, |