mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:44:45 +01:00
regulator: Fixes from the v7.0 merge window
A few driver specific fixes, plus a patch from Bjorn which removes a fixed limit on regulator names that was breaking some Qualcomm systems. -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmmXWBIACgkQJNaLcl1U h9CoxQf8DsYn6llEoqxUjeeEK6emLKMxceJIoGq/Ubmx0wM6ihjFouui7YxfpmLl //+twiBTgLD8fgNog/5ARDKLTpzp+4l3ujIRpFQKbVIdEO5E4EVKEJiCsKTF1GGV qR4wH7WSi5fTnCWRseBd9fWwN6rHuJ3MejW/PgBaTYunKPGxQSJQdWiNFhQ9PSH2 q4E9RUr6SMlKgAOtG1n9uePwUzmd1K4tLUbL8HwwvNTXkFmMSbnAarGBFd+9Yn6i E4lnXU1LUs9jR4zk9IsVubCc7kZJQxrQQcMPFxANPamL/WAFottDrL7q0i1bxO3a KtbID2B9YFOFCnDpwk6vVNFSuqwRlg== =8vd/ -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
0de6219fd7
3 changed files with 18 additions and 25 deletions
|
|
@ -1965,8 +1965,6 @@ static const struct file_operations constraint_flags_fops = {
|
|||
#endif
|
||||
};
|
||||
|
||||
#define REG_STR_SIZE 64
|
||||
|
||||
static void link_and_create_debugfs(struct regulator *regulator, struct regulator_dev *rdev,
|
||||
struct device *dev)
|
||||
{
|
||||
|
|
@ -2014,15 +2012,7 @@ static struct regulator *create_regulator(struct regulator_dev *rdev,
|
|||
lockdep_assert_held_once(&rdev->mutex.base);
|
||||
|
||||
if (dev) {
|
||||
char buf[REG_STR_SIZE];
|
||||
int size;
|
||||
|
||||
size = snprintf(buf, REG_STR_SIZE, "%s-%s",
|
||||
dev->kobj.name, supply_name);
|
||||
if (size >= REG_STR_SIZE)
|
||||
return NULL;
|
||||
|
||||
supply_name = kstrdup(buf, GFP_KERNEL);
|
||||
supply_name = kasprintf(GFP_KERNEL, "%s-%s", dev->kobj.name, supply_name);
|
||||
if (supply_name == NULL)
|
||||
return NULL;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -861,7 +861,7 @@ static int mt6363_regulator_probe(struct platform_device *pdev)
|
|||
struct irq_domain *domain;
|
||||
struct irq_fwspec fwspec;
|
||||
struct spmi_device *sdev;
|
||||
int i, ret;
|
||||
int i, ret, val;
|
||||
|
||||
config.regmap = mt6363_spmi_register_regmap(dev);
|
||||
if (IS_ERR(config.regmap))
|
||||
|
|
@ -870,6 +870,13 @@ static int mt6363_regulator_probe(struct platform_device *pdev)
|
|||
config.dev = dev;
|
||||
sdev = to_spmi_device(dev->parent);
|
||||
|
||||
/*
|
||||
* The first read may fail if the bootloader sets sleep mode: wake up
|
||||
* this PMIC with W/R on the SPMI bus and ignore the first result.
|
||||
* This matches the MT6373 driver behavior.
|
||||
*/
|
||||
regmap_read(config.regmap, MT6363_TOP_TRAP, &val);
|
||||
|
||||
interrupt_parent = of_irq_find_parent(dev->of_node);
|
||||
if (!interrupt_parent)
|
||||
return dev_err_probe(dev, -EINVAL, "Cannot find IRQ parent\n");
|
||||
|
|
|
|||
|
|
@ -440,15 +440,15 @@ static int s2mpg10_of_parse_cb(struct device_node *np,
|
|||
[S2MPG10_EXTCTRL_LDO20M_EN] = S2MPG10_PCTRLSEL_LDO20M_EN,
|
||||
};
|
||||
static const u32 ext_control_s2mpg11[] = {
|
||||
[S2MPG11_EXTCTRL_PWREN] = S2MPG10_PCTRLSEL_PWREN,
|
||||
[S2MPG11_EXTCTRL_PWREN_MIF] = S2MPG10_PCTRLSEL_PWREN_MIF,
|
||||
[S2MPG11_EXTCTRL_AP_ACTIVE_N] = S2MPG10_PCTRLSEL_AP_ACTIVE_N,
|
||||
[S2MPG11_EXTCTRL_G3D_EN] = S2MPG10_PCTRLSEL_CPUCL1_EN,
|
||||
[S2MPG11_EXTCTRL_G3D_EN2] = S2MPG10_PCTRLSEL_CPUCL1_EN2,
|
||||
[S2MPG11_EXTCTRL_AOC_VDD] = S2MPG10_PCTRLSEL_CPUCL2_EN,
|
||||
[S2MPG11_EXTCTRL_AOC_RET] = S2MPG10_PCTRLSEL_CPUCL2_EN2,
|
||||
[S2MPG11_EXTCTRL_UFS_EN] = S2MPG10_PCTRLSEL_TPU_EN,
|
||||
[S2MPG11_EXTCTRL_LDO13S_EN] = S2MPG10_PCTRLSEL_TPU_EN2,
|
||||
[S2MPG11_EXTCTRL_PWREN] = S2MPG11_PCTRLSEL_PWREN,
|
||||
[S2MPG11_EXTCTRL_PWREN_MIF] = S2MPG11_PCTRLSEL_PWREN_MIF,
|
||||
[S2MPG11_EXTCTRL_AP_ACTIVE_N] = S2MPG11_PCTRLSEL_AP_ACTIVE_N,
|
||||
[S2MPG11_EXTCTRL_G3D_EN] = S2MPG11_PCTRLSEL_G3D_EN,
|
||||
[S2MPG11_EXTCTRL_G3D_EN2] = S2MPG11_PCTRLSEL_G3D_EN2,
|
||||
[S2MPG11_EXTCTRL_AOC_VDD] = S2MPG11_PCTRLSEL_AOC_VDD,
|
||||
[S2MPG11_EXTCTRL_AOC_RET] = S2MPG11_PCTRLSEL_AOC_RET,
|
||||
[S2MPG11_EXTCTRL_UFS_EN] = S2MPG11_PCTRLSEL_UFS_EN,
|
||||
[S2MPG11_EXTCTRL_LDO13S_EN] = S2MPG11_PCTRLSEL_LDO13S_EN,
|
||||
};
|
||||
u32 ext_control;
|
||||
|
||||
|
|
@ -478,8 +478,6 @@ static int s2mpg10_of_parse_cb(struct device_node *np,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (ext_control > ARRAY_SIZE(ext_control_s2mpg10))
|
||||
return -EINVAL;
|
||||
ext_control = ext_control_s2mpg10[ext_control];
|
||||
break;
|
||||
|
||||
|
|
@ -503,8 +501,6 @@ static int s2mpg10_of_parse_cb(struct device_node *np,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (ext_control > ARRAY_SIZE(ext_control_s2mpg11))
|
||||
return -EINVAL;
|
||||
ext_control = ext_control_s2mpg11[ext_control];
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue