summaryrefslogtreecommitdiff
path: root/drivers/regulator/s5m8767.c
AgeCommit message (Collapse)Author
2012-03-31regulator: Fix setting new voltage in s5m8767_set_voltageAxel Lin
Current code does not really update the register with new value, fix it. I rename the variable i to sel for better readability. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Sangbeom Kim <sbkim73@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-14regulator: Make s5m8767_get_voltage_register always return correct registerAxel Lin
Check s5m8767->buck[2|3|4]_gpiodvs status in s5m8767_get_voltage_register and return correct register accordingly. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Sangbeom Kim <sbkim73@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-14regulator: s5m8767: Check pdata->buck[2|3|4]_gpiodvs earlierAxel Lin
If we need to ensure only one of the buck[2|3|4]_gpiodvs can be specificed, check them earlier. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Sangbeom Kim <sbkim73@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-11regulator: Rename s5m8767_convert_voltage to s5m8767_convert_voltage_to_selAxel Lin
This function finds the smallest voltage that falls within the specified range, and then returns the selector. This rename makes the intention more clear. Also remove unneeded local variables min_vol and max_vol in s5m8767_set_voltage and s5m8767_set_voltage_buck. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Sangbeom Kim <sbkim73@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-11regulator: Fix s5m8767_set_voltage_time_sel calculation valueSangbeom Kim
In the s5m8767_set_voltage_time_sel function, divisor unit is wrong. ramp_delay is usec unit. So 1000 should be multiplied. Signed-off-by: Sangbeom Kim <sbkim73@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-11regulator: Remove unused i2c variable in s5m8767_pmic_probeAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Sangbeom Kim <sbkim73@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-11regulator: Fix the logic of s5m8767_set_voltage_time_selAxel Lin
This patch includes below fixes: 1. The mask variable is not used at all here, remove it. 2. We already have the new_sel and old_sel, simply returns the delay by: DIV_ROUND_UP(desc->step * (new_sel - old_sel), s5m8767->ramp_delay); Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-11regulator: s5m8767: Fix unused variable warning in probe()Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Sangbeom Kim <sbkim73@samsung.com>
2012-02-02regulator: Kill s5m8767_get_reg_id functionAxel Lin
Calling s5m8767_get_reg_id() is exactly the same as calling rdev_get_id(). It is pointless to add s5m8767_get_reg_id() function. Use rdev_get_id() directly and remove s5m8767_get_reg_id() function. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20regulator: Update s5m8767 for device tree API changesMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20regulator: s5m8767: Remove redundant MODULE_ALIASAxel Lin
The MODULE_DEVICE_TABLE will setup the modalias, thus adding a MODULE_ALIAS for an entry already in s5m8767_pmic_id is redundant. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Sangbeom Kim <sbkim73@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20regulator: s5m8767: Add missing breaksAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Sangbeom Kim <sbkim73@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20regulator: Add S5M8767A regulator driverSangbeom Kim
S5M8767A is a cost-effective PMIC which is designed for mobile applications. It includes high efficient 9 Buck converters, 28 LDOs. Especially, S5M8767A is optimized for Multi-core SOCs. And during DVFS operation, S5M8767A output stable voltage. This patch implement regulator driver for S5M8767A. Signed-off-by: Sangbeom Kim <sbkim73@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>