aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/mc13xxx-regulator-core.c
Commit message (Collapse)AuthorAgeFilesLines
* regulator: Fix off-by-one value range checking for mc13xxx_regulator_get_voltageAxel Lin2011-05-271-1/+1
| | | | | | | | | We use val as array index, thus the valid value rangae for val should be 0 .. n_voltages-1. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
* regulator, mc13xxx: Remove pointless test for unsigned less than zeroJesper Juhl2011-02-251-1/+1
| | | | | | | | | | | | | The variable 'val' is a 'unsigned int', so it can never be less than zero. This fact makes the "val < 0" part of the test done in BUG_ON() in mc13xxx_regulator_get_voltage() rather pointles since it can never have any effect. This patch removes the pointless test. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Acked-by: Alberto Panizzo <maramaopercheseimorto@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
* regulator: Allow modular build of mc13xxx-coreMark Brown2011-01-121-0/+7
| | | | | | | | | | Since the MFD core for this device and the regulator drivers for these devices can be built modular we should also support modular build of the shared code for the regulator drivers, otherwise we try to link built in code against modular code with unfortunate results. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
* make mc13783 regulator code genericYong Shen2011-01-121-0/+234
move some common functions and micros of mc13783 regulaor driver to a seperate file, which makes it possible for mc13892 to share code. Signed-off-by: Yong Shen <yong.shen@linaro.org> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>