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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'regulator-fix-v5.3-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fixes from Mark Brown:
"This is obviouly very late, containing three small and simple driver
specific fixes.

The main one is the TWL fix, this fixes issues with cpufreq on the
PMICs used with BeagleBoard generation OMAP SoCs which had been broken
due to changes in the generic OPP code exposing a bug in the regulator
driver for these devices causing them to think that OPPs weren't
supported on the system.

Sorry about sending this so late, I hadn't registered that the TWL
issue manifested in cpufreq"

* tag 'regulator-fix-v5.3-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
regulator: twl: voltage lists for vdd1/2 on twl4030
regulator: act8945a-regulator: fix ldo register addresses in set_mode hook
regulator: slg51000: Fix a couple NULL vs IS_ERR() checks

+26 -9
+4 -4
drivers/regulator/act8945a-regulator.c
··· 169 169 reg = ACT8945A_DCDC3_CTRL; 170 170 break; 171 171 case ACT8945A_ID_LDO1: 172 - reg = ACT8945A_LDO1_SUS; 172 + reg = ACT8945A_LDO1_CTRL; 173 173 break; 174 174 case ACT8945A_ID_LDO2: 175 - reg = ACT8945A_LDO2_SUS; 175 + reg = ACT8945A_LDO2_CTRL; 176 176 break; 177 177 case ACT8945A_ID_LDO3: 178 - reg = ACT8945A_LDO3_SUS; 178 + reg = ACT8945A_LDO3_CTRL; 179 179 break; 180 180 case ACT8945A_ID_LDO4: 181 - reg = ACT8945A_LDO4_SUS; 181 + reg = ACT8945A_LDO4_CTRL; 182 182 break; 183 183 default: 184 184 return -EINVAL;
+2 -2
drivers/regulator/slg51000-regulator.c
··· 205 205 ena_gpiod = devm_gpiod_get_from_of_node(chip->dev, np, 206 206 "enable-gpios", 0, 207 207 gflags, "gpio-en-ldo"); 208 - if (ena_gpiod) { 208 + if (!IS_ERR(ena_gpiod)) { 209 209 config->ena_gpiod = ena_gpiod; 210 210 devm_gpiod_unhinge(chip->dev, config->ena_gpiod); 211 211 } ··· 459 459 GPIOD_OUT_HIGH 460 460 | GPIOD_FLAGS_BIT_NONEXCLUSIVE, 461 461 "slg51000-cs"); 462 - if (cs_gpiod) { 462 + if (!IS_ERR(cs_gpiod)) { 463 463 dev_info(dev, "Found chip selector property\n"); 464 464 chip->cs_gpiod = cs_gpiod; 465 465 }
+20 -3
drivers/regulator/twl-regulator.c
··· 359 359 2500, 2750, 360 360 }; 361 361 362 + /* 600mV to 1450mV in 12.5 mV steps */ 363 + static const struct regulator_linear_range VDD1_ranges[] = { 364 + REGULATOR_LINEAR_RANGE(600000, 0, 68, 12500) 365 + }; 366 + 367 + /* 600mV to 1450mV in 12.5 mV steps, everything above = 1500mV */ 368 + static const struct regulator_linear_range VDD2_ranges[] = { 369 + REGULATOR_LINEAR_RANGE(600000, 0, 68, 12500), 370 + REGULATOR_LINEAR_RANGE(1500000, 69, 69, 12500) 371 + }; 372 + 362 373 static int twl4030ldo_list_voltage(struct regulator_dev *rdev, unsigned index) 363 374 { 364 375 struct twlreg_info *info = rdev_get_drvdata(rdev); ··· 438 427 } 439 428 440 429 static const struct regulator_ops twl4030smps_ops = { 430 + .list_voltage = regulator_list_voltage_linear_range, 431 + 441 432 .set_voltage = twl4030smps_set_voltage, 442 433 .get_voltage = twl4030smps_get_voltage, 443 434 }; ··· 479 466 }, \ 480 467 } 481 468 482 - #define TWL4030_ADJUSTABLE_SMPS(label, offset, num, turnon_delay, remap_conf) \ 469 + #define TWL4030_ADJUSTABLE_SMPS(label, offset, num, turnon_delay, remap_conf, \ 470 + n_volt) \ 483 471 static const struct twlreg_info TWL4030_INFO_##label = { \ 484 472 .base = offset, \ 485 473 .id = num, \ ··· 493 479 .owner = THIS_MODULE, \ 494 480 .enable_time = turnon_delay, \ 495 481 .of_map_mode = twl4030reg_map_mode, \ 482 + .n_voltages = n_volt, \ 483 + .n_linear_ranges = ARRAY_SIZE(label ## _ranges), \ 484 + .linear_ranges = label ## _ranges, \ 496 485 }, \ 497 486 } 498 487 ··· 535 518 TWL4030_ADJUSTABLE_LDO(VDAC, 0x3b, 10, 100, 0x08); 536 519 TWL4030_ADJUSTABLE_LDO(VINTANA2, 0x43, 12, 100, 0x08); 537 520 TWL4030_ADJUSTABLE_LDO(VIO, 0x4b, 14, 1000, 0x08); 538 - TWL4030_ADJUSTABLE_SMPS(VDD1, 0x55, 15, 1000, 0x08); 539 - TWL4030_ADJUSTABLE_SMPS(VDD2, 0x63, 16, 1000, 0x08); 521 + TWL4030_ADJUSTABLE_SMPS(VDD1, 0x55, 15, 1000, 0x08, 68); 522 + TWL4030_ADJUSTABLE_SMPS(VDD2, 0x63, 16, 1000, 0x08, 69); 540 523 /* VUSBCP is managed *only* by the USB subchip */ 541 524 TWL4030_FIXED_LDO(VINTANA1, 0x3f, 1500, 11, 100, 0x08); 542 525 TWL4030_FIXED_LDO(VINTDIG, 0x47, 1500, 13, 100, 0x08);