diff options
author | Wadim Egorov <w.egorov@phytec.de> | 2016-04-20 04:01:08 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-04-20 05:57:26 -0400 |
commit | e57cbb70b7b3773f78fc6b8b70ab1eb3367e5350 (patch) | |
tree | 5c8aeeb6437bf892de5d77f902a14112d8591812 | |
parent | 5e39cf49729b910795daa0b86052463d23c0a18d (diff) |
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>
-rw-r--r-- | drivers/regulator/fan53555.c | 22 |
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 { | |||
68 | FAN53555_CHIP_ID_08 = 8, | 68 | FAN53555_CHIP_ID_08 = 8, |
69 | }; | 69 | }; |
70 | 70 | ||
71 | /* IC mask revision */ | ||
72 | enum { | ||
73 | FAN53555_CHIP_REV_00 = 0x3, | ||
74 | FAN53555_CHIP_REV_13 = 0xf, | ||
75 | }; | ||
76 | |||
71 | enum { | 77 | enum { |
72 | SILERGY_SYR82X = 8, | 78 | SILERGY_SYR82X = 8, |
73 | }; | 79 | }; |
@@ -218,6 +224,22 @@ static int fan53555_voltages_setup_fairchild(struct fan53555_device_info *di) | |||
218 | /* Init voltage range and step */ | 224 | /* Init voltage range and step */ |
219 | switch (di->chip_id) { | 225 | switch (di->chip_id) { |
220 | case FAN53555_CHIP_ID_00: | 226 | case FAN53555_CHIP_ID_00: |
227 | switch (di->chip_rev) { | ||
228 | case FAN53555_CHIP_REV_00: | ||
229 | di->vsel_min = 600000; | ||
230 | di->vsel_step = 10000; | ||
231 | break; | ||
232 | case FAN53555_CHIP_REV_13: | ||
233 | di->vsel_min = 800000; | ||
234 | di->vsel_step = 10000; | ||
235 | break; | ||
236 | default: | ||
237 | dev_err(di->dev, | ||
238 | "Chip ID %d with rev %d not supported!\n", | ||
239 | di->chip_id, di->chip_rev); | ||
240 | return -EINVAL; | ||
241 | } | ||
242 | break; | ||
221 | case FAN53555_CHIP_ID_01: | 243 | case FAN53555_CHIP_ID_01: |
222 | case FAN53555_CHIP_ID_03: | 244 | case FAN53555_CHIP_ID_03: |
223 | case FAN53555_CHIP_ID_05: | 245 | case FAN53555_CHIP_ID_05: |