Merge tag 'regulator-fix-v5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 25 Sep 2020 22:16:01 +0000 (15:16 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 25 Sep 2020 22:16:01 +0000 (15:16 -0700)
Pull regulator fix from Mark Brown:
 "A single fix for incorrect specification of some of the register
  fields on axp20x devices which would break voltage setting on affected
  systems"

* tag 'regulator-fix-v5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: axp20x: fix LDO2/4 description

1  2 
drivers/regulator/axp20x-regulator.c

@@@ -42,8 -42,9 +42,9 @@@
  
  #define AXP20X_DCDC2_V_OUT_MASK               GENMASK(5, 0)
  #define AXP20X_DCDC3_V_OUT_MASK               GENMASK(7, 0)
- #define AXP20X_LDO24_V_OUT_MASK               GENMASK(7, 4)
+ #define AXP20X_LDO2_V_OUT_MASK                GENMASK(7, 4)
  #define AXP20X_LDO3_V_OUT_MASK                GENMASK(6, 0)
+ #define AXP20X_LDO4_V_OUT_MASK                GENMASK(3, 0)
  #define AXP20X_LDO5_V_OUT_MASK                GENMASK(7, 4)
  
  #define AXP20X_PWR_OUT_EXTEN_MASK     BIT_MASK(0)
@@@ -399,7 -400,7 +400,7 @@@ static int axp20x_set_ramp_delay(struc
                if (rate_count > 0)
                        break;
  
 -              /* fall through */
 +              fallthrough;
        default:
                /* Not supported for this regulator */
                return -ENOTSUPP;
@@@ -542,14 -543,14 +543,14 @@@ static const struct regulator_desc axp2
                 AXP20X_PWR_OUT_CTRL, AXP20X_PWR_OUT_DCDC3_MASK),
        AXP_DESC_FIXED(AXP20X, LDO1, "ldo1", "acin", 1300),
        AXP_DESC(AXP20X, LDO2, "ldo2", "ldo24in", 1800, 3300, 100,
-                AXP20X_LDO24_V_OUT, AXP20X_LDO24_V_OUT_MASK,
+                AXP20X_LDO24_V_OUT, AXP20X_LDO2_V_OUT_MASK,
                 AXP20X_PWR_OUT_CTRL, AXP20X_PWR_OUT_LDO2_MASK),
        AXP_DESC(AXP20X, LDO3, "ldo3", "ldo3in", 700, 3500, 25,
                 AXP20X_LDO3_V_OUT, AXP20X_LDO3_V_OUT_MASK,
                 AXP20X_PWR_OUT_CTRL, AXP20X_PWR_OUT_LDO3_MASK),
        AXP_DESC_RANGES(AXP20X, LDO4, "ldo4", "ldo24in",
                        axp20x_ldo4_ranges, AXP20X_LDO4_V_OUT_NUM_VOLTAGES,
-                       AXP20X_LDO24_V_OUT, AXP20X_LDO24_V_OUT_MASK,
+                       AXP20X_LDO24_V_OUT, AXP20X_LDO4_V_OUT_MASK,
                        AXP20X_PWR_OUT_CTRL, AXP20X_PWR_OUT_LDO4_MASK),
        AXP_DESC_IO(AXP20X, LDO5, "ldo5", "ldo5in", 1800, 3300, 100,
                    AXP20X_LDO5_V_OUT, AXP20X_LDO5_V_OUT_MASK,
@@@ -1022,7 -1023,7 +1023,7 @@@ static int axp20x_set_dcdc_freq(struct 
                 * (See include/linux/mfd/axp20x.h)
                 */
                reg = AXP803_DCDC_FREQ_CTRL;
 -              /* Fall through - to the check below.*/
 +              fallthrough;    /* to the check below */
        case AXP806_ID:
                /*
                 * AXP806 also have DCDC work frequency setting register at a
                 */
                if (axp20x->variant == AXP806_ID)
                        reg = AXP806_DCDC_FREQ_CTRL;
 -              /* Fall through */
 +              fallthrough;
        case AXP221_ID:
        case AXP223_ID:
        case AXP809_ID:
@@@ -1118,7 -1119,7 +1119,7 @@@ static int axp20x_set_dcdc_workmode(str
                 * (See include/linux/mfd/axp20x.h)
                 */
                reg = AXP806_DCDC_MODE_CTRL2;
 -               /* Fall through - to the check below. */
 +              fallthrough;    /* to the check below */
        case AXP221_ID:
        case AXP223_ID:
        case AXP809_ID: