summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/da9063-core.c
diff options
context:
space:
mode:
authorOpensource [Steve Twiss] <stwiss.opensource@diasemi.com>2014-07-21 11:39:33 +0100
committerLee Jones <lee.jones@linaro.org>2014-07-28 08:09:25 +0100
commit9cb42e2a8ed06e91ce9d2c59fbae8d1185ebe2f7 (patch)
tree67ab0d78b34c742ea7c1c0dde0343d851ac28659 /drivers/mfd/da9063-core.c
parent5fc6c39653f1c34de3f2357d50ba5baff6b6e482 (diff)
mfd: da9063: Add support for AD silicon variant
Add register definitions for DA9063 AD (0x3) silicon variant ID the ability to choose the silicon variant at run-time using regmap configuration. This patch also adds RTC support for the AD silicon changes. It adds both BB and AD support as regmap ranges and then makes the distinction between the two tables at run-time. This allows both AD and BB silicon variants to be supported at the same time. Suggested-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Opensource [Steve Twiss] <stwiss.opensource@diasemi.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/da9063-core.c')
-rw-r--r--drivers/mfd/da9063-core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mfd/da9063-core.c b/drivers/mfd/da9063-core.c
index e70ae315abc..93db8bb8c8f 100644
--- a/drivers/mfd/da9063-core.c
+++ b/drivers/mfd/da9063-core.c
@@ -153,9 +153,9 @@ int da9063_device_init(struct da9063 *da9063, unsigned int irq)
"Device detected (chip-ID: 0x%02X, var-ID: 0x%02X)\n",
model, variant_id);
- if (variant_code != PMIC_DA9063_BB) {
- dev_err(da9063->dev, "Unknown chip variant code: 0x%02X\n",
- variant_code);
+ if (variant_code < PMIC_DA9063_BB && variant_code != PMIC_DA9063_AD) {
+ dev_err(da9063->dev,
+ "Cannot support variant code: 0x%02X\n", variant_code);
return -ENODEV;
}