Applied "regulator: hi6421: Convert to use simplified DT parsing" to the regulator tree

2019-04-26 Thread Mark Brown
The patch

   regulator: hi6421: Convert to use simplified DT parsing

has been applied to the regulator tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 29dc269a85ef4e413fd03be295fba52a2eb93d7d Mon Sep 17 00:00:00 2001
From: Axel Lin 
Date: Thu, 11 Apr 2019 00:14:27 +0800
Subject: [PATCH] regulator: hi6421: Convert to use simplified DT parsing

Use regulator core's simplified DT parsing code to simply the driver
implementation.

Signed-off-by: Axel Lin 
Signed-off-by: Mark Brown 
---
 drivers/regulator/hi6421-regulator.c | 208 ++-
 1 file changed, 78 insertions(+), 130 deletions(-)

diff --git a/drivers/regulator/hi6421-regulator.c 
b/drivers/regulator/hi6421-regulator.c
index 259c3a865ac6..6c7ea4eb4bb0 100644
--- a/drivers/regulator/hi6421-regulator.c
+++ b/drivers/regulator/hi6421-regulator.c
@@ -78,43 +78,6 @@ enum hi6421_regulator_id {
HI6421_NUM_REGULATORS,
 };
 
-#define HI6421_REGULATOR_OF_MATCH(_name, id)   \
-{  \
-   .name = #_name, \
-   .driver_data = (void *) HI6421_##id,\
-}
-
-static struct of_regulator_match hi6421_regulator_match[] = {
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout0, LDO0),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout1, LDO1),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout2, LDO2),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout3, LDO3),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout4, LDO4),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout5, LDO5),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout6, LDO6),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout7, LDO7),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout8, LDO8),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout9, LDO9),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout10, LDO10),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout11, LDO11),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout12, LDO12),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout13, LDO13),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout14, LDO14),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout15, LDO15),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout16, LDO16),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout17, LDO17),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout18, LDO18),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout19, LDO19),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout20, LDO20),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout_audio, LDOAUDIO),
-   HI6421_REGULATOR_OF_MATCH(hi6421_buck0, BUCK0),
-   HI6421_REGULATOR_OF_MATCH(hi6421_buck1, BUCK1),
-   HI6421_REGULATOR_OF_MATCH(hi6421_buck2, BUCK2),
-   HI6421_REGULATOR_OF_MATCH(hi6421_buck3, BUCK3),
-   HI6421_REGULATOR_OF_MATCH(hi6421_buck4, BUCK4),
-   HI6421_REGULATOR_OF_MATCH(hi6421_buck5, BUCK5),
-};
-
 /* LDO 0, 4~7, 9~14, 16~20 have same voltage table. */
 static const unsigned int ldo_0_voltages[] = {
150, 180, 240, 250,
@@ -157,6 +120,7 @@ static const struct regulator_ops hi6421_buck345_ops;
 #define HI6421_LDO_ENABLE_TIME (350)
 /*
  * _id - LDO id name string
+ * _match - of match name string
  * v_table - voltage table
  * vreg - voltage select register
  * vmask - voltage select mask
@@ -166,11 +130,13 @@ static const struct regulator_ops hi6421_buck345_ops;
  * ecomask - eco mode mask
  * ecoamp - eco mode load uppler limit in uA
  */
-#define HI6421_LDO(_id, v_table, vreg, vmask, ereg, emask, \
+#define HI6421_LDO(_id, _match, v_table, vreg, vmask, ereg, emask, \
   odelay, ecomask, ecoamp) \
[HI6421_##_id] = {  \
.desc = {   \
.name   = #_id, \
+   .of_match= of_match_ptr(#_match),   \
+   .regulators_node = of_match_ptr("regulators"),  \
.ops= _ldo_ops,  \
.type   = REGULATOR_VOLTAGE,\
 

Applied "regulator: hi6421: Convert to use simplified DT parsing" to the regulator tree

2019-04-26 Thread Mark Brown
The patch

   regulator: hi6421: Convert to use simplified DT parsing

has been applied to the regulator tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 29dc269a85ef4e413fd03be295fba52a2eb93d7d Mon Sep 17 00:00:00 2001
From: Axel Lin 
Date: Thu, 11 Apr 2019 00:14:27 +0800
Subject: [PATCH] regulator: hi6421: Convert to use simplified DT parsing

Use regulator core's simplified DT parsing code to simply the driver
implementation.

Signed-off-by: Axel Lin 
Signed-off-by: Mark Brown 
---
 drivers/regulator/hi6421-regulator.c | 208 ++-
 1 file changed, 78 insertions(+), 130 deletions(-)

diff --git a/drivers/regulator/hi6421-regulator.c 
b/drivers/regulator/hi6421-regulator.c
index 259c3a865ac6..6c7ea4eb4bb0 100644
--- a/drivers/regulator/hi6421-regulator.c
+++ b/drivers/regulator/hi6421-regulator.c
@@ -78,43 +78,6 @@ enum hi6421_regulator_id {
HI6421_NUM_REGULATORS,
 };
 
-#define HI6421_REGULATOR_OF_MATCH(_name, id)   \
-{  \
-   .name = #_name, \
-   .driver_data = (void *) HI6421_##id,\
-}
-
-static struct of_regulator_match hi6421_regulator_match[] = {
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout0, LDO0),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout1, LDO1),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout2, LDO2),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout3, LDO3),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout4, LDO4),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout5, LDO5),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout6, LDO6),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout7, LDO7),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout8, LDO8),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout9, LDO9),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout10, LDO10),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout11, LDO11),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout12, LDO12),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout13, LDO13),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout14, LDO14),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout15, LDO15),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout16, LDO16),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout17, LDO17),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout18, LDO18),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout19, LDO19),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout20, LDO20),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout_audio, LDOAUDIO),
-   HI6421_REGULATOR_OF_MATCH(hi6421_buck0, BUCK0),
-   HI6421_REGULATOR_OF_MATCH(hi6421_buck1, BUCK1),
-   HI6421_REGULATOR_OF_MATCH(hi6421_buck2, BUCK2),
-   HI6421_REGULATOR_OF_MATCH(hi6421_buck3, BUCK3),
-   HI6421_REGULATOR_OF_MATCH(hi6421_buck4, BUCK4),
-   HI6421_REGULATOR_OF_MATCH(hi6421_buck5, BUCK5),
-};
-
 /* LDO 0, 4~7, 9~14, 16~20 have same voltage table. */
 static const unsigned int ldo_0_voltages[] = {
150, 180, 240, 250,
@@ -157,6 +120,7 @@ static const struct regulator_ops hi6421_buck345_ops;
 #define HI6421_LDO_ENABLE_TIME (350)
 /*
  * _id - LDO id name string
+ * _match - of match name string
  * v_table - voltage table
  * vreg - voltage select register
  * vmask - voltage select mask
@@ -166,11 +130,13 @@ static const struct regulator_ops hi6421_buck345_ops;
  * ecomask - eco mode mask
  * ecoamp - eco mode load uppler limit in uA
  */
-#define HI6421_LDO(_id, v_table, vreg, vmask, ereg, emask, \
+#define HI6421_LDO(_id, _match, v_table, vreg, vmask, ereg, emask, \
   odelay, ecomask, ecoamp) \
[HI6421_##_id] = {  \
.desc = {   \
.name   = #_id, \
+   .of_match= of_match_ptr(#_match),   \
+   .regulators_node = of_match_ptr("regulators"),  \
.ops= _ldo_ops,  \
.type   = REGULATOR_VOLTAGE,\
 

Applied "regulator: hi6421: Convert to use simplified DT parsing" to the regulator tree

2019-04-11 Thread Mark Brown
The patch

   regulator: hi6421: Convert to use simplified DT parsing

has been applied to the regulator tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-5.2

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 29dc269a85ef4e413fd03be295fba52a2eb93d7d Mon Sep 17 00:00:00 2001
From: Axel Lin 
Date: Thu, 11 Apr 2019 00:14:27 +0800
Subject: [PATCH] regulator: hi6421: Convert to use simplified DT parsing

Use regulator core's simplified DT parsing code to simply the driver
implementation.

Signed-off-by: Axel Lin 
Signed-off-by: Mark Brown 
---
 drivers/regulator/hi6421-regulator.c | 208 ++-
 1 file changed, 78 insertions(+), 130 deletions(-)

diff --git a/drivers/regulator/hi6421-regulator.c 
b/drivers/regulator/hi6421-regulator.c
index 259c3a865ac6..6c7ea4eb4bb0 100644
--- a/drivers/regulator/hi6421-regulator.c
+++ b/drivers/regulator/hi6421-regulator.c
@@ -78,43 +78,6 @@ enum hi6421_regulator_id {
HI6421_NUM_REGULATORS,
 };
 
-#define HI6421_REGULATOR_OF_MATCH(_name, id)   \
-{  \
-   .name = #_name, \
-   .driver_data = (void *) HI6421_##id,\
-}
-
-static struct of_regulator_match hi6421_regulator_match[] = {
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout0, LDO0),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout1, LDO1),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout2, LDO2),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout3, LDO3),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout4, LDO4),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout5, LDO5),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout6, LDO6),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout7, LDO7),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout8, LDO8),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout9, LDO9),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout10, LDO10),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout11, LDO11),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout12, LDO12),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout13, LDO13),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout14, LDO14),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout15, LDO15),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout16, LDO16),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout17, LDO17),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout18, LDO18),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout19, LDO19),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout20, LDO20),
-   HI6421_REGULATOR_OF_MATCH(hi6421_vout_audio, LDOAUDIO),
-   HI6421_REGULATOR_OF_MATCH(hi6421_buck0, BUCK0),
-   HI6421_REGULATOR_OF_MATCH(hi6421_buck1, BUCK1),
-   HI6421_REGULATOR_OF_MATCH(hi6421_buck2, BUCK2),
-   HI6421_REGULATOR_OF_MATCH(hi6421_buck3, BUCK3),
-   HI6421_REGULATOR_OF_MATCH(hi6421_buck4, BUCK4),
-   HI6421_REGULATOR_OF_MATCH(hi6421_buck5, BUCK5),
-};
-
 /* LDO 0, 4~7, 9~14, 16~20 have same voltage table. */
 static const unsigned int ldo_0_voltages[] = {
150, 180, 240, 250,
@@ -157,6 +120,7 @@ static const struct regulator_ops hi6421_buck345_ops;
 #define HI6421_LDO_ENABLE_TIME (350)
 /*
  * _id - LDO id name string
+ * _match - of match name string
  * v_table - voltage table
  * vreg - voltage select register
  * vmask - voltage select mask
@@ -166,11 +130,13 @@ static const struct regulator_ops hi6421_buck345_ops;
  * ecomask - eco mode mask
  * ecoamp - eco mode load uppler limit in uA
  */
-#define HI6421_LDO(_id, v_table, vreg, vmask, ereg, emask, \
+#define HI6421_LDO(_id, _match, v_table, vreg, vmask, ereg, emask, \
   odelay, ecomask, ecoamp) \
[HI6421_##_id] = {  \
.desc = {   \
.name   = #_id, \
+   .of_match= of_match_ptr(#_match),   \
+   .regulators_node = of_match_ptr("regulators"),  \
.ops= _ldo_ops,  \
.type   = REGULATOR_VOLTAGE,\