mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
regulator: Updates for v4.1
Another release, another set of regulator updates. Not much of it is
showing up in the code yet but there's been a lot of discussion going on
about how to enhance the regulator API to work better with modern SoCs
which have a microcontroller sitting between Linux and the hardware.
I'm hopeful that'll start to come through into mainline for v4.2 but
it's not quite there for v4.1 - what we do have (along with the usual
small updates is) is:
- Work from Bjorn Andersson on refactoring the configuration of
regulator loading interfaces to be useful for use with
microcontrollers, the existing interfaces were never actually useful
for anything as-is since nobody was willing to put enough data into
public code.
- A summary tree display in debugfs from Heiko Stübner.
- Support for act6000 regulators.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQEcBAABAgAGBQJVK+w1AAoJECTWi3JdVIfQeg0H/2ckXZEQWH/yzAz7JgAoSmVr
+y8pvfNLOyOVVulFI0QBOaCAoyJNXNPNqDrkYaTykMIwX4y+weoDqfH/LMiGpnXl
D3aAgdLPSWLTUMteCs9KIHesnOdjKclZUjnbskJgnmeMCW23WcX9T1lBVoLBVdlo
p+oe287rhEwF6j2t63aLwFv8QGpamgVQ/8mXXs8EK7L5E3OO262SwLaXRBAtWk30
Eb68qXrbbkrDunEL6Hjggj5pFi93M4eNfQHpzVmjidvwz1g4JpLtWHW4XpQlXoHJ
G2rlVwNFsyedT1MX2ByKhrIPu5kq5pt0/rjear34G3vuEnQm7vR3aW/38AOxffs=
=t8gT
-----END PGP SIGNATURE-----
Merge tag 'regulator-v4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator updates from Mark Brown:
"Another release, another set of regulator updates. Not much of it is
showing up in the code yet but there's been a lot of discussion going
on about how to enhance the regulator API to work better with modern
SoCs which have a microcontroller sitting between Linux and the
hardware.
I'm hopeful that'll start to come through into mainline for v4.2 but
it's not quite there for v4.1 - what we do have (along with the usual
small updates is) is:
- work from Bjorn Andersson on refactoring the configuration of
regulator loading interfaces to be useful for use with
microcontrollers, the existing interfaces were never actually
useful for anything as-is since nobody was willing to put enough
data into public code.
- a summary tree display in debugfs from Heiko Stübner.
- support for act6000 regulators"
* tag 'regulator-v4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (34 commits)
regulator: max8660: Handle empty regulator data
regulator: output current-limit for all regulators in summary
regulator: add a summary tree in debugfs
regulator: qcom: Tidy up probe()
regulator: qcom: Rework to single platform device
regulator: qcom: Refactor of-parsing code
regulator: qcom: Don't enable DRMS in driver
regulator: max8660: fix assignment of pdata to data that becomes dead
regulator: Defer lookup of supply to regulator_get
mfd: max77693: Remove unused structures
regulator: max77693: Let core parse DT and drop board files support
regulator: Ensure unique regulator debugfs directory names
regulator: stw481x: Remove unused fields from struct stw481x
regulator: palmas: Add has_regen3 check for TPS659038
regulator: constify of_device_id array
regulator: fixes for regulator_set_optimum_mode name change
regulator: Drop temporary regulator_set_optimum_mode wrapper
usb: phy: phy-msm-usb: Rename regulator_set_optimum_mode
usb: phy: ab8500-usb: Rename regulator_set_optimum_mode
ufs: Rename of regulator_set_optimum_mode
...
This commit is contained in:
commit
d700b05671
26 changed files with 778 additions and 358 deletions
|
|
@ -4225,22 +4225,15 @@ static struct scsi_host_template ufshcd_driver_template = {
|
|||
static int ufshcd_config_vreg_load(struct device *dev, struct ufs_vreg *vreg,
|
||||
int ua)
|
||||
{
|
||||
int ret = 0;
|
||||
struct regulator *reg = vreg->reg;
|
||||
const char *name = vreg->name;
|
||||
int ret;
|
||||
|
||||
BUG_ON(!vreg);
|
||||
if (!vreg)
|
||||
return 0;
|
||||
|
||||
ret = regulator_set_optimum_mode(reg, ua);
|
||||
if (ret >= 0) {
|
||||
/*
|
||||
* regulator_set_optimum_mode() returns new regulator
|
||||
* mode upon success.
|
||||
*/
|
||||
ret = 0;
|
||||
} else {
|
||||
dev_err(dev, "%s: %s set optimum mode(ua=%d) failed, err=%d\n",
|
||||
__func__, name, ua, ret);
|
||||
ret = regulator_set_load(vreg->reg, ua);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "%s: %s set load (ua=%d) failed, err=%d\n",
|
||||
__func__, vreg->name, ua, ret);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
@ -4249,18 +4242,12 @@ static int ufshcd_config_vreg_load(struct device *dev, struct ufs_vreg *vreg,
|
|||
static inline int ufshcd_config_vreg_lpm(struct ufs_hba *hba,
|
||||
struct ufs_vreg *vreg)
|
||||
{
|
||||
if (!vreg)
|
||||
return 0;
|
||||
|
||||
return ufshcd_config_vreg_load(hba->dev, vreg, UFS_VREG_LPM_LOAD_UA);
|
||||
}
|
||||
|
||||
static inline int ufshcd_config_vreg_hpm(struct ufs_hba *hba,
|
||||
struct ufs_vreg *vreg)
|
||||
{
|
||||
if (!vreg)
|
||||
return 0;
|
||||
|
||||
return ufshcd_config_vreg_load(hba->dev, vreg, vreg->max_uA);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue