Commit Graph

10 Commits

Author SHA1 Message Date
Robert Baldyga d0540f91cf mfd: max77693: Remove unnecessary wrapper functions
This patch removes wrapper functions used to access regmap, and
make driver using regmap_*() functions instead.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Mark Brown <broonie@linaro.org>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-06-17 15:16:10 +01:00
Krzysztof Kozlowski 640c24a77b regulator: max77693: Remove state container as it is not needed
Don't store pointers to regulator_dev returned by
devm_regulator_register() in allocated memory in state container. They
aren't used anywhere outside of max77693_pmic_probe() function.

This change allows removing completely the 'struct max77693_pmic_dev'
state container as none of its fields are used outside of probe.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-10 09:31:56 +00:00
Sachin Kamat d9aa5c5631 regulator: max77693: Add missing of_node_put
Add of_node_put to decrement the ref count.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-18 11:01:15 +09:00
Sachin Kamat 4fa43a4a6f regulator: max77693: Use of_get_child_by_name
of_find_node_by_name walks the allnodes list, and can thus walk
outside of the parent node. Use of_get_child_by_name instead.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-14 21:08:31 +00:00
Axel Lin 52f48bf33d regulator: max77693: Add missing .owner field in regulator_desc
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-12-24 13:44:50 +00:00
Sachin Kamat cab87f062d regulator: Remove redundant NULL assignment
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-17 00:28:44 +01:00
Sachin Kamat 027a27545c regulator: max77693: Use devm_regulator_register
devm_* simplifies the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17 00:28:40 +01:00
Axel Lin 8c7e7ddf31 regulator: max77693: Remove NULL test for rmatch[i].init_data
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-01 11:16:15 +01:00
Axel Lin f3ecdd7bf6 regulator: max77693: Fix trivial typo
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-07-01 11:15:38 +01:00
Jonghwa Lee 80b022e29b regulator: max77693: Add max77693 regualtor driver.
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>
2013-06-25 11:31:29 +01:00