Skip to contentSkip to conversation

Add input supplies to rk808 regulator

PATCH In review Doug Anderson 3 participants 7 messages Sep 2, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover Add input supplies to rk808 regulator

We want to specify the input supplies to the rk808 regulator. This patch series adds them to the driver. Note that the bindings are based atop Chris's most recent version at
<https://patchwork.kernel.org/patch/4817931/>. If the regulator patch is applied before Chris sends out his next version then I think Chris could squash my bindings change (patch 2) into his next version.

Doug Anderson (2):
regulator: RK808: Add proper input supplies for rk808
dt-bindings: Add input supplies to rk808 bindings

 Documentation/devicetree/bindings/mfd/rk808.txt | 11 +++++++++++
 drivers/regulator/rk808-regulator.c             | 15 ++++++++++++++-
 2 files changed, 25 insertions(+), 1 deletion(-)
Signature · 1 line
2.1.0.rc2.206.gedb03e5
#1 lore raw

PATCH 1/2 regulator: RK808: Add proper input supplies for rk808

The original RK808 regulator driver didn't setup input supplies properly. Add them.

---
 drivers/regulator/rk808-regulator.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
drivers/regulator/rk808-regulator.c +14 -1
index 0d11df1..44f5a8d 100644
@@ -108,6 +108,7 @@ static struct regulator_ops rk808_switch_ops = {
 static const struct regulator_desc rk808_reg[] = {
 	{
 		.name = "DCDC_REG1",
+		.supply_name = "vcc1",
 		.id = RK808_ID_DCDC1,
 		.ops = &rk808_reg_ops,
 		.type = REGULATOR_VOLTAGE,
@@ -121,6 +122,7 @@ static const struct regulator_desc rk808_reg[] = {
 		.owner = THIS_MODULE,
 	}, {
 		.name = "DCDC_REG2",
+		.supply_name = "vcc2",
 		.id = RK808_ID_DCDC2,
 		.ops = &rk808_reg_ops,
 		.type = REGULATOR_VOLTAGE,
@@ -134,6 +136,7 @@ static const struct regulator_desc rk808_reg[] = {
 		.owner = THIS_MODULE,
 	}, {
 		.name = "DCDC_REG3",
+		.supply_name = "vcc3",
 		.id = RK808_ID_DCDC3,
 		.ops = &rk808_switch_ops,
 		.type = REGULATOR_VOLTAGE,
@@ -143,6 +146,7 @@ static const struct regulator_desc rk808_reg[] = {
 		.owner = THIS_MODULE,
 	}, {
 		.name = "DCDC_REG4",
+		.supply_name = "vcc4",
 		.id = RK808_ID_DCDC4,
 		.ops = &rk808_reg_ops,
 		.type = REGULATOR_VOLTAGE,
@@ -156,6 +160,7 @@ static const struct regulator_desc rk808_reg[] = {
 		.owner = THIS_MODULE,
 	}, {
 		.name = "LDO_REG1",
+		.supply_name = "vcc6",
 		.id = RK808_ID_LDO1,
 		.ops = &rk808_reg_ops,
 		.type = REGULATOR_VOLTAGE,
@@ -169,6 +174,7 @@ static const struct regulator_desc rk808_reg[] = {
 		.owner = THIS_MODULE,
 	}, {
 		.name = "LDO_REG2",
+		.supply_name = "vcc6",
 		.id = RK808_ID_LDO2,
 		.ops = &rk808_reg_ops,
 		.type = REGULATOR_VOLTAGE,
@@ -182,6 +188,7 @@ static const struct regulator_desc rk808_reg[] = {
 		.owner = THIS_MODULE,
 	}, {
 		.name = "LDO_REG3",
+		.supply_name = "vcc7",
 		.id = RK808_ID_LDO3,
 		.ops = &rk808_reg_ops,
 		.type = REGULATOR_VOLTAGE,
@@ -195,6 +202,7 @@ static const struct regulator_desc rk808_reg[] = {
 		.owner = THIS_MODULE,
 	}, {
 		.name = "LDO_REG4",
+		.supply_name = "vcc9",
 		.id = RK808_ID_LDO4,
 		.ops = &rk808_reg_ops,
 		.type = REGULATOR_VOLTAGE,
@@ -208,6 +216,7 @@ static const struct regulator_desc rk808_reg[] = {
 		.owner = THIS_MODULE,
 	}, {
 		.name = "LDO_REG5",
+		.supply_name = "vcc9",
 		.id = RK808_ID_LDO5,
 		.ops = &rk808_reg_ops,
 		.type = REGULATOR_VOLTAGE,
@@ -221,6 +230,7 @@ static const struct regulator_desc rk808_reg[] = {
 		.owner = THIS_MODULE,
 	}, {
 		.name = "LDO_REG6",
+		.supply_name = "vcc10",
 		.id = RK808_ID_LDO6,
 		.ops = &rk808_reg_ops,
 		.type = REGULATOR_VOLTAGE,
@@ -234,6 +244,7 @@ static const struct regulator_desc rk808_reg[] = {
 		.owner = THIS_MODULE,
 	}, {
 		.name = "LDO_REG7",
+		.supply_name = "vcc7",
 		.id = RK808_ID_LDO7,
 		.ops = &rk808_reg_ops,
 		.type = REGULATOR_VOLTAGE,
@@ -247,6 +258,7 @@ static const struct regulator_desc rk808_reg[] = {
 		.owner = THIS_MODULE,
 	}, {
 		.name = "LDO_REG8",
+		.supply_name = "vcc11",
 		.id = RK808_ID_LDO8,
 		.ops = &rk808_reg_ops,
 		.type = REGULATOR_VOLTAGE,
@@ -260,6 +272,7 @@ static const struct regulator_desc rk808_reg[] = {
 		.owner = THIS_MODULE,
 	}, {
 		.name = "SWITCH_REG1",
+		.supply_name = "vcc8",
 		.id = RK808_ID_SWITCH1,
 		.ops = &rk808_switch_ops,
 		.type = REGULATOR_VOLTAGE,
@@ -268,6 +281,7 @@ static const struct regulator_desc rk808_reg[] = {
 		.owner = THIS_MODULE,
 	}, {
 		.name = "SWITCH_REG2",
+		.supply_name = "vcc12",
 		.id = RK808_ID_SWITCH2,
 		.ops = &rk808_switch_ops,
 		.type = REGULATOR_VOLTAGE,
@@ -364,7 +378,6 @@ static int rk808_regulator_probe(struct platform_device *pdev)
 		if (client->dev.of_node)
 			config.of_node = pdata->of_node[i];
 
-		reg_data->supply_regulator = rk808_reg[i].name;
 		config.init_data = reg_data;
 
 		rk808_rdev = devm_regulator_register(&pdev->dev,
Signature · 1 line
2.1.0.rc2.206.gedb03e5
#2 lore raw

PATCH 2/2 dt-bindings: Add input supplies to rk808 bindings

In reply to Doug Anderson

The original bindings for rk808 didn't include input supplies. Add them.

---
 Documentation/devicetree/bindings/mfd/rk808.txt | 11 +++++++++++
 1 file changed, 11 insertions(+)
Documentation/devicetree/bindings/mfd/rk808.txt +11 -0
index f8932ac..283a906 100644
@@ -13,6 +13,17 @@ Optional properties:
   default output clock name
 - rockchip,system-power-controller: Telling whether or not this pmic is controlling
   the system power.
+- vcc1-supply:  The input supply for DCDC_REG1
+- vcc2-supply:  The input supply for DCDC_REG2
+- vcc3-supply:  The input supply for DCDC_REG3
+- vcc4-supply:  The input supply for DCDC_REG4
+- vcc6-supply:  The input supply for LDO_REG1 and LDO_REG2
+- vcc7-supply:  The input supply for LDO_REG3 and LDO_REG7
+- vcc8-supply:  The input supply for SWITCH_REG1
+- vcc9-supply:  The input supply for LDO_REG4 and LDO_REG5
+- vcc10-supply: The input supply for LDO_REG6
+- vcc11-supply: The input supply for LDO_REG8
+- vcc12-supply: The input supply for SWITCH_REG2
 
 Regulators: All the regulators of RK808 to be instantiated shall be
 listed in a child node named 'regulators'. Each regulator is represented
Signature · 1 line
2.1.0.rc2.206.gedb03e5
maintainer Acked-by on v1 2/2
#3 lore raw

Re: [PATCH 2/2] dt-bindings: Add input supplies to rk808 bindings

Quoted 2 lines · Doug Anderson

The original bindings for rk808 didn't include input supplies. Add them.

You probably want to send this to Lee...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140902/c4c95151/attachment.sig>

#4 lore raw

Re: [PATCH 2/2] dt-bindings: Add input supplies to rk808 bindings

Mark,

Quoted 7 lines · Mark Brown
Quoted 2 lines · Doug Anderson

The original bindings for rk808 didn't include input supplies. Add them.

You probably want to send this to Lee...

Good point. I think it might actually be better for Chris to just squash my bindings patch into his bindings patch since he still has to send out another version. If you haven't applied the regulator patch by the time he sends his next version he can include my patch in his series (with your Ack).

Chris did get an Ack for the MFD patch from Lee but I requested some changes to the regulator patch. When things look good Chris will add you back to the CC list for the regulator part of his series.

Thanks!

-Doug

Tested-by on the v1 series
#5 lore raw
In reply to Doug Anderson

Am Dienstag, 2. September 2014, 09:14:27 schrieb Doug Anderson:

Quoted 10 lines

We want to specify the input supplies to the rk808 regulator. This patch series adds them to the driver. Note that the bindings are based atop Chris's most recent version at
<https://patchwork.kernel.org/patch/4817931/>. If the regulator patch is applied before Chris sends out his next version then I think Chris could squash my bindings change (patch 2) into his next version.

Doug Anderson (2):
regulator: RK808: Add proper input supplies for rk808

Patch 1 didn't apply, as it didn't take the recent pdata removal Chris posted. After fixing this [0], it sucessfully solved the missing supplies I've seen on the weekend, so

Quoted 5 lines

dt-bindings: Add input supplies to rk808 bindings

 Documentation/devicetree/bindings/mfd/rk808.txt | 11 +++++++++++
 drivers/regulator/rk808-regulator.c             | 15 ++++++++++++++-
 2 files changed, 25 insertions(+), 1 deletion(-)

[0]

[PATCH 1_2] regulator_RK808_Add proper input supplies for rk808.mbox renamed from [PATCH 1_2] regulator_RK808_Add proper input supplies for rk808.mbox.orig +1 -1
@@ -203,7 +203,7 @@
  		.type = REGULATOR_VOLTAGE,
 @@ -364,7 +378,6 @@ static int rk808_regulator_probe(struct platform_device *pdev)
  		if (client->dev.of_node)
- 			config.of_node = pdata->of_node[i];
+ 			config.of_node = rk808_regulator->of_node[i];
  
 -		reg_data->supply_regulator = rk808_reg[i].name;
  		config.init_data = reg_data;

As Chris is supposed to merge these changes into his series, this doesn't really matter though.

#6 lore raw

Heiko,

Quoted 9 lines · Heiko St?bner

Am Dienstag, 2. September 2014, 09:14:27 schrieb Doug Anderson:

Quoted 8 lines

We want to specify the input supplies to the rk808 regulator. This patch series adds them to the driver. Note that the bindings are based atop Chris's most recent version at
<https://patchwork.kernel.org/patch/4817931/>. If the regulator patch is applied before Chris sends out his next version then I think Chris could squash my bindings change (patch 2) into his next version.

Quoted 8 lines
Quoted 2 lines

Doug Anderson (2):
regulator: RK808: Add proper input supplies for rk808

Patch 1 didn't apply, as it didn't take the recent pdata removal Chris posted. After fixing this [0], it sucessfully solved the missing supplies I've seen on the weekend, so

Thanks! ...ah, I guess I usually apply things with "git am -3" and it didn't complain about applying my patch atop Chris's or not atop Chris's. Sorry for not making it clear.