All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] regulator: as3711: Allow missing init_data for diagnostics
@ 2014-02-06  6:47 Axel Lin
  2014-02-06  6:49 ` [PATCH 2/2] regulator: rc5t583: " Axel Lin
  2014-02-11 12:26 ` [PATCH 1/2] regulator: as3711: " Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Axel Lin @ 2014-02-06  6:47 UTC (permalink / raw)
  To: Mark Brown; +Cc: Guennadi Liakhovetski, Liam Girdwood, linux-kernel

The regulator core supports this to allow the configuration to be inspected
at runtime even if no software management is enabled.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/regulator/as3711-regulator.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/regulator/as3711-regulator.c b/drivers/regulator/as3711-regulator.c
index c77a584..67fd548 100644
--- a/drivers/regulator/as3711-regulator.c
+++ b/drivers/regulator/as3711-regulator.c
@@ -221,7 +221,6 @@ static int as3711_regulator_probe(struct platform_device *pdev)
 {
 	struct as3711_regulator_pdata *pdata = dev_get_platdata(&pdev->dev);
 	struct as3711 *as3711 = dev_get_drvdata(pdev->dev.parent);
-	struct regulator_init_data *reg_data;
 	struct regulator_config config = {.dev = &pdev->dev,};
 	struct as3711_regulator *reg = NULL;
 	struct as3711_regulator *regs;
@@ -252,16 +251,10 @@ static int as3711_regulator_probe(struct platform_device *pdev)
 	}
 
 	for (id = 0, ri = as3711_reg_info; id < AS3711_REGULATOR_NUM; ++id, ri++) {
-		reg_data = pdata->init_data[id];
-
-		/* No need to register if there is no regulator data */
-		if (!reg_data)
-			continue;
-
 		reg = &regs[id];
 		reg->reg_info = ri;
 
-		config.init_data = reg_data;
+		config.init_data = pdata->init_data[id];
 		config.driver_data = reg;
 		config.regmap = as3711->regmap;
 		config.of_node = of_node[id];
-- 
1.8.1.2




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] regulator: rc5t583: Allow missing init_data for diagnostics
  2014-02-06  6:47 [PATCH 1/2] regulator: as3711: Allow missing init_data for diagnostics Axel Lin
@ 2014-02-06  6:49 ` Axel Lin
  2014-02-11 12:28   ` Mark Brown
  2014-02-11 12:26 ` [PATCH 1/2] regulator: as3711: " Mark Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Axel Lin @ 2014-02-06  6:49 UTC (permalink / raw)
  To: Mark Brown; +Cc: Laxman Dewangan, Liam Girdwood, linux-kernel

The regulator core supports this to allow the configuration to be inspected
at runtime even if no software management is enabled.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/regulator/rc5t583-regulator.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/regulator/rc5t583-regulator.c b/drivers/regulator/rc5t583-regulator.c
index b58affb..22d6fd1 100644
--- a/drivers/regulator/rc5t583-regulator.c
+++ b/drivers/regulator/rc5t583-regulator.c
@@ -119,7 +119,6 @@ static int rc5t583_regulator_probe(struct platform_device *pdev)
 {
 	struct rc5t583 *rc5t583 = dev_get_drvdata(pdev->dev.parent);
 	struct rc5t583_platform_data *pdata = dev_get_platdata(rc5t583->dev);
-	struct regulator_init_data *reg_data;
 	struct regulator_config config = { };
 	struct rc5t583_regulator *reg = NULL;
 	struct rc5t583_regulator *regs;
@@ -142,12 +141,6 @@ static int rc5t583_regulator_probe(struct platform_device *pdev)
 
 
 	for (id = 0; id < RC5T583_REGULATOR_MAX; ++id) {
-		reg_data = pdata->reg_init_data[id];
-
-		/* No need to register if there is no regulator data */
-		if (!reg_data)
-			continue;
-
 		reg = &regs[id];
 		ri = &rc5t583_reg_info[id];
 		reg->reg_info = ri;
@@ -169,7 +162,7 @@ static int rc5t583_regulator_probe(struct platform_device *pdev)
 
 skip_ext_pwr_config:
 		config.dev = &pdev->dev;
-		config.init_data = reg_data;
+		config.init_data = pdata->reg_init_data[id];
 		config.driver_data = reg;
 		config.regmap = rc5t583->regmap;
 
-- 
1.8.1.2




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] regulator: as3711: Allow missing init_data for diagnostics
  2014-02-06  6:47 [PATCH 1/2] regulator: as3711: Allow missing init_data for diagnostics Axel Lin
  2014-02-06  6:49 ` [PATCH 2/2] regulator: rc5t583: " Axel Lin
@ 2014-02-11 12:26 ` Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2014-02-11 12:26 UTC (permalink / raw)
  To: Axel Lin; +Cc: Guennadi Liakhovetski, Liam Girdwood, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 210 bytes --]

On Thu, Feb 06, 2014 at 02:47:41PM +0800, Axel Lin wrote:
> The regulator core supports this to allow the configuration to be inspected
> at runtime even if no software management is enabled.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] regulator: rc5t583: Allow missing init_data for diagnostics
  2014-02-06  6:49 ` [PATCH 2/2] regulator: rc5t583: " Axel Lin
@ 2014-02-11 12:28   ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2014-02-11 12:28 UTC (permalink / raw)
  To: Axel Lin; +Cc: Laxman Dewangan, Liam Girdwood, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 210 bytes --]

On Thu, Feb 06, 2014 at 02:49:11PM +0800, Axel Lin wrote:
> The regulator core supports this to allow the configuration to be inspected
> at runtime even if no software management is enabled.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-02-11 12:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-06  6:47 [PATCH 1/2] regulator: as3711: Allow missing init_data for diagnostics Axel Lin
2014-02-06  6:49 ` [PATCH 2/2] regulator: rc5t583: " Axel Lin
2014-02-11 12:28   ` Mark Brown
2014-02-11 12:26 ` [PATCH 1/2] regulator: as3711: " Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.