diff options
author | Krzysztof Kozlowski <k.kozlowski@samsung.com> | 2015-10-06 20:44:39 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2015-10-30 13:20:37 -0400 |
commit | c2c9f1fe4bf2d6597bbaaab7514d9c9092b5b2f6 (patch) | |
tree | b4119f97d7d83948045e23a63da5a9c735b50e79 /drivers/mfd/sec-core.c | |
parent | 2e44e28ad2628cd29a4829ffab06fe7e3b79469c (diff) |
mfd: sec-core: Dump PMIC revision to find out the HW
There are different revisions of the same chipset. For example S2MPS13 has
more than 2 revisions. They differ slightly in regulator constraints.
Print the revision number to easily find which PMIC is used on the board.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/sec-core.c')
-rw-r--r-- | drivers/mfd/sec-core.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c index 2d1137a7a0ee..589e5efc2d7f 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-core.c | |||
@@ -253,6 +253,15 @@ static const struct regmap_config s5m8767_regmap_config = { | |||
253 | .cache_type = REGCACHE_FLAT, | 253 | .cache_type = REGCACHE_FLAT, |
254 | }; | 254 | }; |
255 | 255 | ||
256 | static void sec_pmic_dump_rev(struct sec_pmic_dev *sec_pmic) | ||
257 | { | ||
258 | unsigned int val; | ||
259 | |||
260 | /* For each device type, the REG_ID is always the first register */ | ||
261 | if (!regmap_read(sec_pmic->regmap_pmic, S2MPS11_REG_ID, &val)) | ||
262 | dev_dbg(sec_pmic->dev, "Revision: 0x%x\n", val); | ||
263 | } | ||
264 | |||
256 | #ifdef CONFIG_OF | 265 | #ifdef CONFIG_OF |
257 | /* | 266 | /* |
258 | * Only the common platform data elements for s5m8767 are parsed here from the | 267 | * Only the common platform data elements for s5m8767 are parsed here from the |
@@ -425,6 +434,7 @@ static int sec_pmic_probe(struct i2c_client *i2c, | |||
425 | goto err_mfd; | 434 | goto err_mfd; |
426 | 435 | ||
427 | device_init_wakeup(sec_pmic->dev, sec_pmic->wakeup); | 436 | device_init_wakeup(sec_pmic->dev, sec_pmic->wakeup); |
437 | sec_pmic_dump_rev(sec_pmic); | ||
428 | 438 | ||
429 | return ret; | 439 | return ret; |
430 | 440 | ||