diff mbox

[2/2] regulator: twl: use platform data in the DT based boot also

Message ID 1412948442-19896-3-git-send-email-t-kristo@ti.com
State New
Headers show

Commit Message

Tero Kristo Oct. 10, 2014, 1:40 p.m. UTC
This allows to pass platform information during a DT boot also, currently
this is completely ignored. Needed for supporting the platform specific
regulator set_voltage / get_voltage ops for the SMPS regulators.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
To: Liam Girdwood <lgirdwood@gmail.com>
To: Mark Brown <broonie@kernel.org>
---
 drivers/regulator/twl-regulator.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Nishanth Menon Oct. 10, 2014, 1:43 p.m. UTC | #1
On 16:40-20141010, Tero Kristo wrote:
> This allows to pass platform information during a DT boot also, currently
> this is completely ignored. Needed for supporting the platform specific
> regulator set_voltage / get_voltage ops for the SMPS regulators.
> 
> Signed-off-by: Tero Kristo <t-kristo@ti.com>
> To: Liam Girdwood <lgirdwood@gmail.com>
> To: Mark Brown <broonie@kernel.org>
> ---
>  drivers/regulator/twl-regulator.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c
> index 0b4f866..2c4fa06 100644
> --- a/drivers/regulator/twl-regulator.c
> +++ b/drivers/regulator/twl-regulator.c
> @@ -1103,9 +1103,9 @@ static int twlreg_probe(struct platform_device *pdev)
>  	if (match) {
>  		template = match->data;
>  		id = template->desc.id;
> +		drvdata = dev_get_platdata(&pdev->dev);
>  		initdata = of_get_regulator_init_data(&pdev->dev,
>  						      pdev->dev.of_node);
> -		drvdata = NULL;
>  	} else {
>  		id = pdev->id;
>  		initdata = dev_get_platdata(&pdev->dev);
> -- 
> 1.7.9.5
> 

please post this separately and liam, mark need to be in cc.
Unfortunately, I think we might be pushed back with pdata should'nt be
in of boot.

So a slightly longer commit message might be necessary.
Tero Kristo Oct. 10, 2014, 1:43 p.m. UTC | #2
On 10/10/2014 04:40 PM, Tero Kristo wrote:
> This allows to pass platform information during a DT boot also, currently
> this is completely ignored. Needed for supporting the platform specific
> regulator set_voltage / get_voltage ops for the SMPS regulators.
>
> Signed-off-by: Tero Kristo <t-kristo@ti.com>
> To: Liam Girdwood <lgirdwood@gmail.com>
> To: Mark Brown <broonie@kernel.org>

Ok that "To:" didn't really work too well, added manually. Can repost if 
needed.

-Tero

> ---
>   drivers/regulator/twl-regulator.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c
> index 0b4f866..2c4fa06 100644
> --- a/drivers/regulator/twl-regulator.c
> +++ b/drivers/regulator/twl-regulator.c
> @@ -1103,9 +1103,9 @@ static int twlreg_probe(struct platform_device *pdev)
>   	if (match) {
>   		template = match->data;
>   		id = template->desc.id;
> +		drvdata = dev_get_platdata(&pdev->dev);
>   		initdata = of_get_regulator_init_data(&pdev->dev,
>   						      pdev->dev.of_node);
> -		drvdata = NULL;
>   	} else {
>   		id = pdev->id;
>   		initdata = dev_get_platdata(&pdev->dev);
>

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mark Brown Oct. 10, 2014, 1:48 p.m. UTC | #3
On Fri, Oct 10, 2014 at 04:43:42PM +0300, Tero Kristo wrote:
> On 10/10/2014 04:40 PM, Tero Kristo wrote:
> >This allows to pass platform information during a DT boot also, currently
> >this is completely ignored. Needed for supporting the platform specific
> >regulator set_voltage / get_voltage ops for the SMPS regulators.
> >
> >Signed-off-by: Tero Kristo <t-kristo@ti.com>
> >To: Liam Girdwood <lgirdwood@gmail.com>
> >To: Mark Brown <broonie@kernel.org>
> 
> Ok that "To:" didn't really work too well, added manually. Can repost if
> needed.

I can't apply a quoted reply so yes please.  I'm also not seeing patch
1.
diff mbox

Patch

diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c
index 0b4f866..2c4fa06 100644
--- a/drivers/regulator/twl-regulator.c
+++ b/drivers/regulator/twl-regulator.c
@@ -1103,9 +1103,9 @@  static int twlreg_probe(struct platform_device *pdev)
 	if (match) {
 		template = match->data;
 		id = template->desc.id;
+		drvdata = dev_get_platdata(&pdev->dev);
 		initdata = of_get_regulator_init_data(&pdev->dev,
 						      pdev->dev.of_node);
-		drvdata = NULL;
 	} else {
 		id = pdev->id;
 		initdata = dev_get_platdata(&pdev->dev);