Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Wadim Egorov and committed by
Mark Brown
e57cbb70 5e39cf49

+22
+22
drivers/regulator/fan53555.c
··· 68 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 77 enum { 72 78 SILERGY_SYR82X = 8, 73 79 }; ··· 224 218 /* Init voltage range and step */ 225 219 switch (di->chip_id) { 226 220 case FAN53555_CHIP_ID_00: 221 + switch (di->chip_rev) { 222 + case FAN53555_CHIP_REV_00: 223 + di->vsel_min = 600000; 224 + di->vsel_step = 10000; 225 + break; 226 + case FAN53555_CHIP_REV_13: 227 + di->vsel_min = 800000; 228 + di->vsel_step = 10000; 229 + break; 230 + default: 231 + dev_err(di->dev, 232 + "Chip ID %d with rev %d not supported!\n", 233 + di->chip_id, di->chip_rev); 234 + return -EINVAL; 235 + } 236 + break; 227 237 case FAN53555_CHIP_ID_01: 228 238 case FAN53555_CHIP_ID_03: 229 239 case FAN53555_CHIP_ID_05: