aboutsummaryrefslogtreecommitdiff
path: root/drivers/regulator/max77693.c
AgeCommit message (Collapse)Author
2014-11-14regulator: max77693: Fix use of uninitialized regulator configKrzysztof Kozlowski
commit ca0c37a0b489bb14bf3e1549e7a8d0c9a17f4919 upstream. Driver allocated on stack struct regulator_config but didn't initialize it fully. Few fields (driver_data, ena_gpio) were left untouched. This lead to using random ena_gpio values as GPIOs for max77693 regulators. On occasion these values could match real GPIO numbers leading to interfering with other drivers and to unsuccessful enable/disable of regulator. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Fixes: 80b022e29bfd ("regulator: max77693: Add max77693 regualtor driver.") Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-24regulator: max77693: Add missing .owner field in regulator_descAxel Lin
Add missing .owner field in regulator_desc, which is used for refcounting. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17regulator: Remove redundant NULL assignmentSachin Kamat
NULL assignment corrupts the error pointer and is not necessary. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17regulator: max77693: Use devm_regulator_registerSachin Kamat
devm_* simplifies the code. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-01regulator: max77693: Remove NULL test for rmatch[i].init_dataAxel Lin
The implementation in of_regulator_match() already ensures match->init_data is not NULL for all matched cases if the return value of of_regulator_match() > 0. Thus remove NULL test for rmatch[i].init_data. This patch also fixes the condition for loop iteration. The for loop should iterate "matched" times rather than ARRAY_SIZE(regulators) because we only allocate "matched" number of entries for rdata. Though in most cases, "matched" == ARRAY_SIZE(regulators). Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Jonghwa Lee <jonghwa3.lee@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-01regulator: max77693: Fix trivial typoAxel Lin
Fix trivial typo in the equation to check upper bound of current setting. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Jonghwa Lee <jonghwa3.lee@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-25regulator: max77693: Add max77693 regualtor driver.Jonghwa Lee
This patch adds new regulator driver to support max77693 chip's regulators. max77693 has two linear voltage regulators and one current regulator which can be controlled through I2C bus. This driver also supports device tree. Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>