linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] regulator: rt5033-regulator: Use regulator_nodes/of_match in the descriptor
@ 2014-12-18 11:13 Beomho Seo
  2014-12-22 15:10 ` Mark Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Beomho Seo @ 2014-12-18 11:13 UTC (permalink / raw)
  To: linux-kernel, linux-pm
  Cc: lgirdwood, broonie, beomho.seo, cw00.choi, inki.dae, sw0312.kim

This patch is add regulator_nodes/of_match in the regulator descriptor
for using information from DT instead of sppecific codes.

Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
---
 drivers/regulator/rt5033-regulator.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/regulator/rt5033-regulator.c b/drivers/regulator/rt5033-regulator.c
index 870cc49..96d2c18 100644
--- a/drivers/regulator/rt5033-regulator.c
+++ b/drivers/regulator/rt5033-regulator.c
@@ -36,6 +36,8 @@ static struct regulator_ops rt5033_buck_ops = {
 static const struct regulator_desc rt5033_supported_regulators[] = {
 	[RT5033_BUCK] = {
 		.name		= "BUCK",
+		.of_match	= of_match_ptr("BUCK"),
+		.regulators_node = of_match_ptr("regulators"),
 		.id		= RT5033_BUCK,
 		.ops		= &rt5033_buck_ops,
 		.type		= REGULATOR_VOLTAGE,
@@ -50,6 +52,8 @@ static const struct regulator_desc rt5033_supported_regulators[] = {
 	},
 	[RT5033_LDO] = {
 		.name		= "LDO",
+		.of_match	= of_match_ptr("LDO"),
+		.regulators_node = of_match_ptr("regulators"),
 		.id		= RT5033_LDO,
 		.ops		= &rt5033_buck_ops,
 		.type		= REGULATOR_VOLTAGE,
@@ -64,6 +68,8 @@ static const struct regulator_desc rt5033_supported_regulators[] = {
 	},
 	[RT5033_SAFE_LDO] = {
 		.name		= "SAFE_LDO",
+		.of_match	= of_match_ptr("SAFE_LDO"),
+		.regulators_node = of_match_ptr("regulators"),
 		.id		= RT5033_SAFE_LDO,
 		.ops		= &rt5033_safe_ldo_ops,
 		.type		= REGULATOR_VOLTAGE,
@@ -81,7 +87,7 @@ static int rt5033_regulator_probe(struct platform_device *pdev)
 	int ret, i;
 	struct regulator_config config = {};
 
-	config.dev = &pdev->dev;
+	config.dev = rt5033->dev;
 	config.driver_data = rt5033;
 
 	for (i = 0; i < ARRAY_SIZE(rt5033_supported_regulators); i++) {
-- 
1.7.9.5


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

* Re: [PATCH] regulator: rt5033-regulator: Use regulator_nodes/of_match in the descriptor
  2014-12-18 11:13 [PATCH] regulator: rt5033-regulator: Use regulator_nodes/of_match in the descriptor Beomho Seo
@ 2014-12-22 15:10 ` Mark Brown
  2014-12-23  8:04   ` Beomho Seo
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2014-12-22 15:10 UTC (permalink / raw)
  To: Beomho Seo
  Cc: linux-kernel, linux-pm, lgirdwood, cw00.choi, inki.dae,
	sw0312.kim

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

On Thu, Dec 18, 2014 at 08:13:36PM +0900, Beomho Seo wrote:
> This patch is add regulator_nodes/of_match in the regulator descriptor
> for using information from DT instead of sppecific codes.

>  drivers/regulator/rt5033-regulator.c |    8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)

This isn't replacing existing code with use of the framework, it's
adding new bindings where there were none before so it needs to add a
binding document too.

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

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

* Re: [PATCH] regulator: rt5033-regulator: Use regulator_nodes/of_match in the descriptor
  2014-12-22 15:10 ` Mark Brown
@ 2014-12-23  8:04   ` Beomho Seo
  2014-12-24 12:56     ` Mark Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Beomho Seo @ 2014-12-23  8:04 UTC (permalink / raw)
  To: Mark Brown
  Cc: linux-kernel, linux-pm, lgirdwood, cw00.choi, inki.dae,
	sw0312.kim

On 12/23/2014 12:10 AM, Mark Brown wrote:
> On Thu, Dec 18, 2014 at 08:13:36PM +0900, Beomho Seo wrote:
>> This patch is add regulator_nodes/of_match in the regulator descriptor
>> for using information from DT instead of sppecific codes.
> 
>>  drivers/regulator/rt5033-regulator.c |    8 +++++++-
>>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> This isn't replacing existing code with use of the framework, it's
> adding new bindings where there were none before so it needs to add a
> binding document too.
> 

Actually, RT5033 device tree binding document sent at mainling list already.
link is below,
http://marc.info/?l=linux-pm&m=141890859525642&w=2
It include regulator device node but above patch not applied yet.
If you want, I will revise dt binding document patch and send to mailing list.

Best regards,
Beomho Seo


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

* Re: [PATCH] regulator: rt5033-regulator: Use regulator_nodes/of_match in the descriptor
  2014-12-23  8:04   ` Beomho Seo
@ 2014-12-24 12:56     ` Mark Brown
  2014-12-26  0:09       ` Beomho Seo
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2014-12-24 12:56 UTC (permalink / raw)
  To: Beomho Seo
  Cc: linux-kernel, linux-pm, lgirdwood, cw00.choi, inki.dae,
	sw0312.kim

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

On Tue, Dec 23, 2014 at 05:04:34PM +0900, Beomho Seo wrote:
> On 12/23/2014 12:10 AM, Mark Brown wrote:

> > This isn't replacing existing code with use of the framework, it's
> > adding new bindings where there were none before so it needs to add a
> > binding document too.

> Actually, RT5033 device tree binding document sent at mainling list already.
> link is below,
> http://marc.info/?l=linux-pm&m=141890859525642&w=2
> It include regulator device node but above patch not applied yet.
> If you want, I will revise dt binding document patch and send to mailing list.

OK, I've applied this but please in future send the code and binding
documentation together to avoid such confusion.

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

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

* Re: [PATCH] regulator: rt5033-regulator: Use regulator_nodes/of_match in the descriptor
  2014-12-24 12:56     ` Mark Brown
@ 2014-12-26  0:09       ` Beomho Seo
  0 siblings, 0 replies; 5+ messages in thread
From: Beomho Seo @ 2014-12-26  0:09 UTC (permalink / raw)
  To: Mark Brown
  Cc: linux-kernel, linux-pm, lgirdwood, cw00.choi, inki.dae,
	sw0312.kim

On 12/24/2014 09:56 PM, Mark Brown wrote:
> On Tue, Dec 23, 2014 at 05:04:34PM +0900, Beomho Seo wrote:
>> On 12/23/2014 12:10 AM, Mark Brown wrote:
> 
>>> This isn't replacing existing code with use of the framework, it's
>>> adding new bindings where there were none before so it needs to add a
>>> binding document too.
> 
>> Actually, RT5033 device tree binding document sent at mainling list already.
>> link is below,
>> http://marc.info/?l=linux-pm&m=141890859525642&w=2
>> It include regulator device node but above patch not applied yet.
>> If you want, I will revise dt binding document patch and send to mailing list.
> 
> OK, I've applied this but please in future send the code and binding
> documentation together to avoid such confusion.
> 

Thank you for response.
I will send code and binding documentation together at early date.

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

end of thread, other threads:[~2014-12-26  0:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-18 11:13 [PATCH] regulator: rt5033-regulator: Use regulator_nodes/of_match in the descriptor Beomho Seo
2014-12-22 15:10 ` Mark Brown
2014-12-23  8:04   ` Beomho Seo
2014-12-24 12:56     ` Mark Brown
2014-12-26  0:09       ` Beomho Seo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).