Commit Graph

11 Commits

Author SHA1 Message Date
Doug Anderson 8af252272a regulator: rk808: Add function for ramp delay for buck1/buck2
On rk808 buck1 and buck2 have programmable ramp delays.  Let's add a
function to allow a client of rk808 to set them.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-16 11:27:53 -07:00
Axel Lin 1ed3f8ce83 regulator: rk808: Fix missing of_node_put
1. Pass &pdev->dev rather than &client->dev to of_regulator_match, the *dev
   argument is used for devres to ensure devm_of_regulator_put_matches() will
   be called when unload the module.

2. of_get_child_by_name() returns a node pointer with refcount incremented.
   Thus add missing of_node_put(reg_np).

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-12 14:53:09 +01:00
Axel Lin 1f0c01621a regulator: rk808: Remove unused variables
Also remove non-informative comment.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-12 14:53:09 +01:00
Chris Zhong 571a401084 regulator: rk808: Remove pdata from the regulator
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-10 11:50:43 +01:00
Doug Anderson b8074eba2a regulator: RK808: Add proper input supplies for rk808
The original RK808 regulator driver didn't setup input supplies
properly.  Add them.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-02 17:30:31 +01:00
Axel Lin 5a82067f01 regulator: rk808: Fix n_voltages for DCDC4
The min_sel is 0, max_sel is 15, so n_voltages should be 16.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-02 12:08:05 +01:00
Axel Lin c61519fd9a regulator: rk808: Fix memory leak
The memory allocated in rk808_regulator_probe() needs to be freed when the
module is unloaded. Thus pass &pdev->dev rather than &client->dev to
devm_kzalloc.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-28 16:01:25 +01:00
Chris Zhong 2a8d1303c6 regulator: rk808: remove redundant code
remove the redundant code, since pdata has been removed from stuct rk808

Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-27 10:00:46 +01:00
Chris Zhong d76c333e9f regulator: RK808: modify for struct rk808 change
The "dev" has been deleted from "struct rk808" in rk808 mfd driver
so rk808->dev should be replaced by &client->dev here.

Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-26 08:30:23 +01:00
Doug Anderson 462004f121 regulator: rk808: Fix uninitialized value
The RK808 regulator driver was putting its config on the stack but not
initting it.  That means that you got a semi-random config.  Fix this.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-21 21:19:13 -05:00
Chris Zhong 2cd64ae3d5 regulator: RK808: Add regulator driver for RK808
The regulator module consists of 4 DCDCs, 8 LDOs and 2 switches.
The output voltages are configurable and are meant to supply power
to the main processor and other components

Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-20 11:28:15 -05:00