summaryrefslogtreecommitdiff
path: root/drivers/mfd
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-10-04 11:16:38 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-10-04 11:16:38 -0700
commit5a9f228a183bc18bbc64a12a962adc2c7305782c (patch)
treedd24c20eeb668a36c7b88a7d405d20ef303b9480 /drivers/mfd
parent808c2b0583f010d3993ae534980af55c43c1adba (diff)
parent2ed89d577c172506b5bada8c5810f607a4eae771 (diff)
Merge tag 'regulator-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator updates from Mark Brown: "This is an extremely quiet release for the regulator API, we've got a small set of bug fixes and minor feature enhancements for drivers plus a couple of more visible changes: - add support for ramp times in regulators that don't use selectors. - new driver for LTC3676" * tag 'regulator-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: dbx500: remove unused functions in dbx500-prcmu.c regulator: pv88080: Update regulator for PV88080 BB silicon support regulator: core: don't return error with inadequate reason regulator: tps65910: Work around silicon erratum SWCZ010 regulator: core: Add set_voltage_time op regulator: core: Don't skip set_voltage_time when ramp delay disabled regulator: core: Simplify error flow in _regulator_do_set_voltage() regulator: core: Use local ops variable in _regulator_do_set_voltage() regulator: hi6421: mark hi6421_regulator_ldo_get_optimum_mode() static regulator: Kconfig: Fix typo regulator: bindings: Use the correct symbol for second regulator: Remove support for optional supplies in the bulk API regulator: Add LTC3676 support regulator: rk808: Delete owner assignment regulator: tps65218: do not disable DCDC3 during poweroff on broken PMICs mfd: tps65218: add version check to the PMIC probe
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/tps65218.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mfd/tps65218.c b/drivers/mfd/tps65218.c
index 80b9dc363cd8..ba610adbdbff 100644
--- a/drivers/mfd/tps65218.c
+++ b/drivers/mfd/tps65218.c
@@ -219,6 +219,7 @@ static int tps65218_probe(struct i2c_client *client,
struct tps65218 *tps;
const struct of_device_id *match;
int ret;
+ unsigned int chipid;
match = of_match_device(of_tps65218_match_table, &client->dev);
if (!match) {
@@ -250,6 +251,14 @@ static int tps65218_probe(struct i2c_client *client,
if (ret < 0)
return ret;
+ ret = tps65218_reg_read(tps, TPS65218_REG_CHIPID, &chipid);
+ if (ret) {
+ dev_err(tps->dev, "Failed to read chipid: %d\n", ret);
+ return ret;
+ }
+
+ tps->rev = chipid & TPS65218_CHIPID_REV_MASK;
+
ret = of_platform_populate(client->dev.of_node, NULL, NULL,
&client->dev);
if (ret < 0)