regulator: Fixes for 3.5
One small bug fix, plus a rename of all the ST Ericsson regulators in the device tree since all the device trees had been written with different names and some infelicities in the test proceedures meant that the device tree code had apparently never actually been run against the upstream device tree. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAABAgAGBQJP3hQ6AAoJEBus8iNuMP3dbToP/iFWsPR14SRqtmv5N0AEftyD SdDYZRdWAlwSunRkZhE12Kk1+q2wpxYmG2rJgYHJWw2Mk4biaW6XHKKGYjKxJ0C6 WdskxhAs+Pl0KFqq0Z2+zrWEjSFMqkFHQrt3zfSHFb/ju3Us6jn8VaxR0i+WlWSJ IIZRvHPRU0et+BXuVUwcF6JOPNnoWlsFVugCBH7r56mCgPkU78NTKycUD6oprQvy BIMrHek5TWK39a6oHICWGLgQBxMKDNz+91yq9+4mIjxE84XcsAGuZcoDcbpNHtbA YmusSqKHQ0ShZVDvGj58xntbmh0SjqC/8CnVrzgXGOHaHisHiErZ/1y4sEiLrPnL o/6/42wyO+DKfftAOYOydks4AfOFPUJsfpvR/wDFvVSwwCSYJCwxP0ZxfQ9GGGcl IH8oLb84F3uHqg7De/zCW5+Qsw+EUxq76K+lnKx8vab5mJWtwxl9kMOsttYjr/f0 8/q5ndln0C3rnAoB6hPMqE7bCswDkk3dXuAbln3OIkbhNglpSsyU5R+b2h5hugTG oENPkMTYFf8dRJ1hZsWrKM9HZaHWgxUe5KcEMyYEel3qdiYHWjmprnOeNHNo/u/o uG4tVlHO0rvOZpRbuvzc72Uonyri/oTfJ3b5Z9ZkRhmd/9pV83jJx12HlXxQoIae nvHtEhp2dKYVBIXfc+0s =NS0T -----END PGP SIGNATURE----- Merge tag 'regulator-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "One small bug fix, plus a rename of all the ST Ericsson regulators in the device tree since all the device trees had been written with different names and some infelicities in the test proceedures meant that the device tree code had apparently never actually been run against the upstream device tree." * tag 'regulator-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: Change db8500-prcmu match names to reflect Device Tree regulator: Change ab8500 match names to reflect Device Tree regulator: Fix the s5m8767a problem of the division by null
This commit is contained in:
commit
2fe8ac608b
|
@ -794,17 +794,17 @@ static __devinit int ab8500_regulator_register(struct platform_device *pdev,
|
|||
}
|
||||
|
||||
static struct of_regulator_match ab8500_regulator_matches[] = {
|
||||
{ .name = "LDO-AUX1", .driver_data = (void *) AB8500_LDO_AUX1, },
|
||||
{ .name = "LDO-AUX2", .driver_data = (void *) AB8500_LDO_AUX2, },
|
||||
{ .name = "LDO-AUX3", .driver_data = (void *) AB8500_LDO_AUX3, },
|
||||
{ .name = "LDO-INTCORE", .driver_data = (void *) AB8500_LDO_INTCORE, },
|
||||
{ .name = "LDO-TVOUT", .driver_data = (void *) AB8500_LDO_TVOUT, },
|
||||
{ .name = "LDO-USB", .driver_data = (void *) AB8500_LDO_USB, },
|
||||
{ .name = "LDO-AUDIO", .driver_data = (void *) AB8500_LDO_AUDIO, },
|
||||
{ .name = "LDO-ANAMIC1", .driver_data = (void *) AB8500_LDO_ANAMIC1, },
|
||||
{ .name = "LDO-ANAMIC2", .driver_data = (void *) AB8500_LDO_ANAMIC2, },
|
||||
{ .name = "LDO-DMIC", .driver_data = (void *) AB8500_LDO_DMIC, },
|
||||
{ .name = "LDO-ANA", .driver_data = (void *) AB8500_LDO_ANA, },
|
||||
{ .name = "ab8500_ldo_aux1", .driver_data = (void *) AB8500_LDO_AUX1, },
|
||||
{ .name = "ab8500_ldo_aux2", .driver_data = (void *) AB8500_LDO_AUX2, },
|
||||
{ .name = "ab8500_ldo_aux3", .driver_data = (void *) AB8500_LDO_AUX3, },
|
||||
{ .name = "ab8500_ldo_intcore", .driver_data = (void *) AB8500_LDO_INTCORE, },
|
||||
{ .name = "ab8500_ldo_tvout", .driver_data = (void *) AB8500_LDO_TVOUT, },
|
||||
{ .name = "ab8500_ldo_usb", .driver_data = (void *) AB8500_LDO_USB, },
|
||||
{ .name = "ab8500_ldo_audio", .driver_data = (void *) AB8500_LDO_AUDIO, },
|
||||
{ .name = "ab8500_ldo_anamic1", .driver_data = (void *) AB8500_LDO_ANAMIC1, },
|
||||
{ .name = "ab8500_ldo_amamic2", .driver_data = (void *) AB8500_LDO_ANAMIC2, },
|
||||
{ .name = "ab8500_ldo_dmic", .driver_data = (void *) AB8500_LDO_DMIC, },
|
||||
{ .name = "ab8500_ldo_ana", .driver_data = (void *) AB8500_LDO_ANA, },
|
||||
};
|
||||
|
||||
static __devinit int
|
||||
|
|
|
@ -452,26 +452,26 @@ static __devinit int db8500_regulator_register(struct platform_device *pdev,
|
|||
}
|
||||
|
||||
static struct of_regulator_match db8500_regulator_matches[] = {
|
||||
{ .name = "db8500-vape", .driver_data = (void *) DB8500_REGULATOR_VAPE, },
|
||||
{ .name = "db8500-varm", .driver_data = (void *) DB8500_REGULATOR_VARM, },
|
||||
{ .name = "db8500-vmodem", .driver_data = (void *) DB8500_REGULATOR_VMODEM, },
|
||||
{ .name = "db8500-vpll", .driver_data = (void *) DB8500_REGULATOR_VPLL, },
|
||||
{ .name = "db8500-vsmps1", .driver_data = (void *) DB8500_REGULATOR_VSMPS1, },
|
||||
{ .name = "db8500-vsmps2", .driver_data = (void *) DB8500_REGULATOR_VSMPS2, },
|
||||
{ .name = "db8500-vsmps3", .driver_data = (void *) DB8500_REGULATOR_VSMPS3, },
|
||||
{ .name = "db8500-vrf1", .driver_data = (void *) DB8500_REGULATOR_VRF1, },
|
||||
{ .name = "db8500-sva-mmdsp", .driver_data = (void *) DB8500_REGULATOR_SWITCH_SVAMMDSP, },
|
||||
{ .name = "db8500-sva-mmdsp-ret", .driver_data = (void *) DB8500_REGULATOR_SWITCH_SVAMMDSPRET, },
|
||||
{ .name = "db8500-sva-pipe", .driver_data = (void *) DB8500_REGULATOR_SWITCH_SVAPIPE, },
|
||||
{ .name = "db8500-sia-mmdsp", .driver_data = (void *) DB8500_REGULATOR_SWITCH_SIAMMDSP, },
|
||||
{ .name = "db8500-sia-mmdsp-ret", .driver_data = (void *) DB8500_REGULATOR_SWITCH_SIAMMDSPRET, },
|
||||
{ .name = "db8500-sia-pipe", .driver_data = (void *) DB8500_REGULATOR_SWITCH_SIAPIPE, },
|
||||
{ .name = "db8500-sga", .driver_data = (void *) DB8500_REGULATOR_SWITCH_SGA, },
|
||||
{ .name = "db8500-b2r2-mcde", .driver_data = (void *) DB8500_REGULATOR_SWITCH_B2R2_MCDE, },
|
||||
{ .name = "db8500-esram12", .driver_data = (void *) DB8500_REGULATOR_SWITCH_ESRAM12, },
|
||||
{ .name = "db8500-esram12-ret", .driver_data = (void *) DB8500_REGULATOR_SWITCH_ESRAM12RET, },
|
||||
{ .name = "db8500-esram34", .driver_data = (void *) DB8500_REGULATOR_SWITCH_ESRAM34, },
|
||||
{ .name = "db8500-esram34-ret", .driver_data = (void *) DB8500_REGULATOR_SWITCH_ESRAM34RET, },
|
||||
{ .name = "db8500_vape", .driver_data = (void *) DB8500_REGULATOR_VAPE, },
|
||||
{ .name = "db8500_varm", .driver_data = (void *) DB8500_REGULATOR_VARM, },
|
||||
{ .name = "db8500_vmodem", .driver_data = (void *) DB8500_REGULATOR_VMODEM, },
|
||||
{ .name = "db8500_vpll", .driver_data = (void *) DB8500_REGULATOR_VPLL, },
|
||||
{ .name = "db8500_vsmps1", .driver_data = (void *) DB8500_REGULATOR_VSMPS1, },
|
||||
{ .name = "db8500_vsmps2", .driver_data = (void *) DB8500_REGULATOR_VSMPS2, },
|
||||
{ .name = "db8500_vsmps3", .driver_data = (void *) DB8500_REGULATOR_VSMPS3, },
|
||||
{ .name = "db8500_vrf1", .driver_data = (void *) DB8500_REGULATOR_VRF1, },
|
||||
{ .name = "db8500_sva_mmdsp", .driver_data = (void *) DB8500_REGULATOR_SWITCH_SVAMMDSP, },
|
||||
{ .name = "db8500_sva_mmdsp_ret", .driver_data = (void *) DB8500_REGULATOR_SWITCH_SVAMMDSPRET, },
|
||||
{ .name = "db8500_sva_pipe", .driver_data = (void *) DB8500_REGULATOR_SWITCH_SVAPIPE, },
|
||||
{ .name = "db8500_sia_mmdsp", .driver_data = (void *) DB8500_REGULATOR_SWITCH_SIAMMDSP, },
|
||||
{ .name = "db8500_sia_mmdsp_ret", .driver_data = (void *) DB8500_REGULATOR_SWITCH_SIAMMDSPRET, },
|
||||
{ .name = "db8500_sia_pipe", .driver_data = (void *) DB8500_REGULATOR_SWITCH_SIAPIPE, },
|
||||
{ .name = "db8500_sga", .driver_data = (void *) DB8500_REGULATOR_SWITCH_SGA, },
|
||||
{ .name = "db8500_b2r2_mcde", .driver_data = (void *) DB8500_REGULATOR_SWITCH_B2R2_MCDE, },
|
||||
{ .name = "db8500_esram12", .driver_data = (void *) DB8500_REGULATOR_SWITCH_ESRAM12, },
|
||||
{ .name = "db8500_esram12_ret", .driver_data = (void *) DB8500_REGULATOR_SWITCH_ESRAM12RET, },
|
||||
{ .name = "db8500_esram34", .driver_data = (void *) DB8500_REGULATOR_SWITCH_ESRAM34, },
|
||||
{ .name = "db8500_esram34_ret", .driver_data = (void *) DB8500_REGULATOR_SWITCH_ESRAM34RET, },
|
||||
};
|
||||
|
||||
static __devinit int
|
||||
|
|
|
@ -451,7 +451,7 @@ static int s5m8767_set_voltage_time_sel(struct regulator_dev *rdev,
|
|||
|
||||
desc = reg_voltage_map[reg_id];
|
||||
|
||||
if (old_sel < new_sel)
|
||||
if ((old_sel < new_sel) && s5m8767->ramp_delay)
|
||||
return DIV_ROUND_UP(desc->step * (new_sel - old_sel),
|
||||
s5m8767->ramp_delay * 1000);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue