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-v7.0-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fixes from Mark Brown:
"A few driver specific fixes, plus a patch from Bjorn which removes a
fixed limit on regulator names that was breaking some Qualcomm
systems"

* tag 'regulator-fix-v7.0-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
regulator: s2mps11: fix pctrlsel macro usage in s2mpg10_of_parse_cb()
regulator: s2mps11: drop redundant sanity checks in s2mpg10_of_parse_cb()
regulator: core: Remove regulator supply_name length limit
regulator: mt6363: Fix interrmittent timeout

+18 -25
+1 -11
drivers/regulator/core.c
··· 1965 1965 #endif 1966 1966 }; 1967 1967 1968 - #define REG_STR_SIZE 64 1969 - 1970 1968 static void link_and_create_debugfs(struct regulator *regulator, struct regulator_dev *rdev, 1971 1969 struct device *dev) 1972 1970 { ··· 2012 2014 lockdep_assert_held_once(&rdev->mutex.base); 2013 2015 2014 2016 if (dev) { 2015 - char buf[REG_STR_SIZE]; 2016 - int size; 2017 - 2018 - size = snprintf(buf, REG_STR_SIZE, "%s-%s", 2019 - dev->kobj.name, supply_name); 2020 - if (size >= REG_STR_SIZE) 2021 - return NULL; 2022 - 2023 - supply_name = kstrdup(buf, GFP_KERNEL); 2017 + supply_name = kasprintf(GFP_KERNEL, "%s-%s", dev->kobj.name, supply_name); 2024 2018 if (supply_name == NULL) 2025 2019 return NULL; 2026 2020 } else {
+8 -1
drivers/regulator/mt6363-regulator.c
··· 861 861 struct irq_domain *domain; 862 862 struct irq_fwspec fwspec; 863 863 struct spmi_device *sdev; 864 - int i, ret; 864 + int i, ret, val; 865 865 866 866 config.regmap = mt6363_spmi_register_regmap(dev); 867 867 if (IS_ERR(config.regmap)) ··· 869 869 "Cannot get regmap\n"); 870 870 config.dev = dev; 871 871 sdev = to_spmi_device(dev->parent); 872 + 873 + /* 874 + * The first read may fail if the bootloader sets sleep mode: wake up 875 + * this PMIC with W/R on the SPMI bus and ignore the first result. 876 + * This matches the MT6373 driver behavior. 877 + */ 878 + regmap_read(config.regmap, MT6363_TOP_TRAP, &val); 872 879 873 880 interrupt_parent = of_irq_find_parent(dev->of_node); 874 881 if (!interrupt_parent)
+9 -13
drivers/regulator/s2mps11.c
··· 440 440 [S2MPG10_EXTCTRL_LDO20M_EN] = S2MPG10_PCTRLSEL_LDO20M_EN, 441 441 }; 442 442 static const u32 ext_control_s2mpg11[] = { 443 - [S2MPG11_EXTCTRL_PWREN] = S2MPG10_PCTRLSEL_PWREN, 444 - [S2MPG11_EXTCTRL_PWREN_MIF] = S2MPG10_PCTRLSEL_PWREN_MIF, 445 - [S2MPG11_EXTCTRL_AP_ACTIVE_N] = S2MPG10_PCTRLSEL_AP_ACTIVE_N, 446 - [S2MPG11_EXTCTRL_G3D_EN] = S2MPG10_PCTRLSEL_CPUCL1_EN, 447 - [S2MPG11_EXTCTRL_G3D_EN2] = S2MPG10_PCTRLSEL_CPUCL1_EN2, 448 - [S2MPG11_EXTCTRL_AOC_VDD] = S2MPG10_PCTRLSEL_CPUCL2_EN, 449 - [S2MPG11_EXTCTRL_AOC_RET] = S2MPG10_PCTRLSEL_CPUCL2_EN2, 450 - [S2MPG11_EXTCTRL_UFS_EN] = S2MPG10_PCTRLSEL_TPU_EN, 451 - [S2MPG11_EXTCTRL_LDO13S_EN] = S2MPG10_PCTRLSEL_TPU_EN2, 443 + [S2MPG11_EXTCTRL_PWREN] = S2MPG11_PCTRLSEL_PWREN, 444 + [S2MPG11_EXTCTRL_PWREN_MIF] = S2MPG11_PCTRLSEL_PWREN_MIF, 445 + [S2MPG11_EXTCTRL_AP_ACTIVE_N] = S2MPG11_PCTRLSEL_AP_ACTIVE_N, 446 + [S2MPG11_EXTCTRL_G3D_EN] = S2MPG11_PCTRLSEL_G3D_EN, 447 + [S2MPG11_EXTCTRL_G3D_EN2] = S2MPG11_PCTRLSEL_G3D_EN2, 448 + [S2MPG11_EXTCTRL_AOC_VDD] = S2MPG11_PCTRLSEL_AOC_VDD, 449 + [S2MPG11_EXTCTRL_AOC_RET] = S2MPG11_PCTRLSEL_AOC_RET, 450 + [S2MPG11_EXTCTRL_UFS_EN] = S2MPG11_PCTRLSEL_UFS_EN, 451 + [S2MPG11_EXTCTRL_LDO13S_EN] = S2MPG11_PCTRLSEL_LDO13S_EN, 452 452 }; 453 453 u32 ext_control; 454 454 ··· 478 478 return -EINVAL; 479 479 } 480 480 481 - if (ext_control > ARRAY_SIZE(ext_control_s2mpg10)) 482 - return -EINVAL; 483 481 ext_control = ext_control_s2mpg10[ext_control]; 484 482 break; 485 483 ··· 501 503 return -EINVAL; 502 504 } 503 505 504 - if (ext_control > ARRAY_SIZE(ext_control_s2mpg11)) 505 - return -EINVAL; 506 506 ext_control = ext_control_s2mpg11[ext_control]; 507 507 break; 508 508