]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/regulator/fan53555.c
Merge tag 'usb-ci-v4.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/peter...
[karo-tx-linux.git] / drivers / regulator / fan53555.c
index 2cb5cc311610a12c467d518336dbdde814665667..d7da81a875cf612bf367d08f174f66f18aed4341 100644 (file)
@@ -65,6 +65,13 @@ enum {
        FAN53555_CHIP_ID_03,
        FAN53555_CHIP_ID_04,
        FAN53555_CHIP_ID_05,
+       FAN53555_CHIP_ID_08 = 8,
+};
+
+/* IC mask revision */
+enum {
+       FAN53555_CHIP_REV_00 = 0x3,
+       FAN53555_CHIP_REV_13 = 0xf,
 };
 
 enum {
@@ -217,9 +224,26 @@ 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:
+       case FAN53555_CHIP_ID_08:
                di->vsel_min = 600000;
                di->vsel_step = 10000;
                break;