summaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorWadim Egorov <w.egorov@phytec.de>2016-04-20 10:01:08 +0200
committerMark Brown <broonie@kernel.org>2016-04-20 10:57:26 +0100
commite57cbb70b7b3773f78fc6b8b70ab1eb3367e5350 (patch)
tree5c8aeeb6437bf892de5d77f902a14112d8591812 /drivers/regulator
parent5e39cf49729b910795daa0b86052463d23c0a18d (diff)
downloadblackbird-op-linux-e57cbb70b7b3773f78fc6b8b70ab1eb3367e5350.tar.gz
blackbird-op-linux-e57cbb70b7b3773f78fc6b8b70ab1eb3367e5350.zip
regulator: fan53555: Add support for FAN53555UC13X type
IC type options 00, 13 and 23 are sharing the same DIE_ID 0. Let's differentiate between these revisions. FAN53555UC13X has the ID 0 and REV 0xf, starts at 800mV and increments in 10mV steps. Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/fan53555.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c
index d4bfa9312724..d7da81a875cf 100644
--- a/drivers/regulator/fan53555.c
+++ b/drivers/regulator/fan53555.c
@@ -68,6 +68,12 @@ enum {
FAN53555_CHIP_ID_08 = 8,
};
+/* IC mask revision */
+enum {
+ FAN53555_CHIP_REV_00 = 0x3,
+ FAN53555_CHIP_REV_13 = 0xf,
+};
+
enum {
SILERGY_SYR82X = 8,
};
@@ -218,6 +224,22 @@ static int fan53555_voltages_setup_fairchild(struct fan53555_device_info *di)
/* Init voltage range and step */
switch (di->chip_id) {
case FAN53555_CHIP_ID_00:
+ switch (di->chip_rev) {
+ case FAN53555_CHIP_REV_00:
+ di->vsel_min = 600000;
+ di->vsel_step = 10000;
+ break;
+ case FAN53555_CHIP_REV_13:
+ di->vsel_min = 800000;
+ di->vsel_step = 10000;
+ break;
+ default:
+ dev_err(di->dev,
+ "Chip ID %d with rev %d not supported!\n",
+ di->chip_id, di->chip_rev);
+ return -EINVAL;
+ }
+ break;
case FAN53555_CHIP_ID_01:
case FAN53555_CHIP_ID_03:
case FAN53555_CHIP_ID_05:
OpenPOWER on IntegriCloud