linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd: tps65217: add compatible string for subdevices
@ 2014-09-22 18:18 Johannes Pointner
  2014-09-24 11:06 ` Lee Jones
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Pointner @ 2014-09-22 18:18 UTC (permalink / raw)
  To: Samuel Ortiz, Lee Jones, AnilKumar Ch
  Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	devicetree, linux-kernel

The TPS65217 is missing of_compatible string in the mfd_cell for its
subdevices. This compatible string is necessary to use functions like
of_find_backlight_by_node in backlight.c.

Signed-off-by: Johannes Pointner <johannes.pointner@br-automation.com>
---
 Documentation/devicetree/bindings/regulator/tps65217.txt            | 5 ++++-
 .../devicetree/bindings/video/backlight/tps65217-backlight.txt      | 6 +++---
 drivers/mfd/tps65217.c                                              | 2 ++
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/regulator/tps65217.txt b/Documentation/devicetree/bindings/regulator/tps65217.txt
index 4f05d20..ba835e2 100644
--- a/Documentation/devicetree/bindings/regulator/tps65217.txt
+++ b/Documentation/devicetree/bindings/regulator/tps65217.txt
@@ -5,6 +5,7 @@ Required properties:
 - reg: I2C slave address
 - regulators: list of regulators provided by this controller, must be named
   after their hardware counterparts: dcdc[1-3] and ldo[1-4]
+- compatible: "ti,tps65217-pmic"
 - regulators: This is the list of child nodes that specify the regulator
   initialization data for defined regulators. Not all regulators for the given
   device need to be present. The definition for each of these nodes is defined
@@ -23,9 +24,11 @@ Example:
 
 	tps: tps@24 {
 		compatible = "ti,tps65217";
+		reg = <0x24>;
 		ti,pmic-shutdown-controller;
 
-		regulators {
+		tps_pmic: regulators {
+			compatible = "ti,tps65217-pmic";
 			dcdc1_reg: dcdc1 {
 				regulator-min-microvolt = <900000>;
 				regulator-max-microvolt = <1800000>;
diff --git a/Documentation/devicetree/bindings/video/backlight/tps65217-backlight.txt b/Documentation/devicetree/bindings/video/backlight/tps65217-backlight.txt
index 5fb9279..c3fb649 100644
--- a/Documentation/devicetree/bindings/video/backlight/tps65217-backlight.txt
+++ b/Documentation/devicetree/bindings/video/backlight/tps65217-backlight.txt
@@ -7,18 +7,18 @@ Required properties:
 - compatible: "ti,tps65217"
 - reg: I2C slave address
 - backlight: node for specifying WLED1 and WLED2 lines in TPS65217
+- compatible: "ti,tps65217-bl"
 - isel: selection bit, valid values: 1 for ISEL1 (low-level) and 2 for ISEL2 (high-level)
 - fdim: PWM dimming frequency, valid values: 100, 200, 500, 1000
 - default-brightness: valid values: 0-100
 
-Each regulator is defined using the standard binding for regulators.
-
 Example:
 
 	tps: tps@24 {
 		reg = <0x24>;
 		compatible = "ti,tps65217";
-		backlight {
+		tps_bl: backlight {
+			compatible = "ti,tps65217-bl";
 			isel = <1>;  /* 1 - ISET1, 2 ISET2 */
 			fdim = <100>; /* TPS65217_BL_FDIM_100HZ */
 			default-brightness = <50>;
diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c
index 3cc4c70..77708f9 100644
--- a/drivers/mfd/tps65217.c
+++ b/drivers/mfd/tps65217.c
@@ -33,9 +33,11 @@
 static const struct mfd_cell tps65217s[] = {
 	{
 		.name = "tps65217-pmic",
+		.of_compatible = "ti,tps65217-pmic",
 	},
 	{
 		.name = "tps65217-bl",
+		.of_compatible = "ti,tps65217-bl",
 	},
 };
 
-- 
2.1.0



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

* Re: [PATCH] mfd: tps65217: add compatible string for subdevices
  2014-09-22 18:18 [PATCH] mfd: tps65217: add compatible string for subdevices Johannes Pointner
@ 2014-09-24 11:06 ` Lee Jones
  2014-09-24 11:49   ` Johannes Pointner
  0 siblings, 1 reply; 3+ messages in thread
From: Lee Jones @ 2014-09-24 11:06 UTC (permalink / raw)
  To: Johannes Pointner
  Cc: Samuel Ortiz, AnilKumar Ch, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala, devicetree, linux-kernel

On Mon, 22 Sep 2014, Johannes Pointner wrote:

> The TPS65217 is missing of_compatible string in the mfd_cell for its
> subdevices. This compatible string is necessary to use functions like
> of_find_backlight_by_node in backlight.c.
> 
> Signed-off-by: Johannes Pointner <johannes.pointner@br-automation.com>
> ---
>  Documentation/devicetree/bindings/regulator/tps65217.txt            | 5 ++++-
>  .../devicetree/bindings/video/backlight/tps65217-backlight.txt      | 6 +++---
>  drivers/mfd/tps65217.c                                              | 2 ++
>  3 files changed, 9 insertions(+), 4 deletions(-)

[...]

> diff --git a/Documentation/devicetree/bindings/video/backlight/tps65217-backlight.txt b/Documentation/devicetree/bindings/video/backlight/tps65217-backlight.txt
> index 5fb9279..c3fb649 100644
> --- a/Documentation/devicetree/bindings/video/backlight/tps65217-backlight.txt
> +++ b/Documentation/devicetree/bindings/video/backlight/tps65217-backlight.txt
> @@ -7,18 +7,18 @@ Required properties:
>  - compatible: "ti,tps65217"
>  - reg: I2C slave address
>  - backlight: node for specifying WLED1 and WLED2 lines in TPS65217
> +- compatible: "ti,tps65217-bl"

This is now confusing.  Please make it clear that this part of the
documentation is now referencing the sub-node.

>  - isel: selection bit, valid values: 1 for ISEL1 (low-level) and 2 for ISEL2 (high-level)
>  - fdim: PWM dimming frequency, valid values: 100, 200, 500, 1000
>  - default-brightness: valid values: 0-100
>  
> -Each regulator is defined using the standard binding for regulators.
> -
>  Example:
>  
>  	tps: tps@24 {
>  		reg = <0x24>;
>  		compatible = "ti,tps65217";
> -		backlight {
> +		tps_bl: backlight {
> +			compatible = "ti,tps65217-bl";
>  			isel = <1>;  /* 1 - ISET1, 2 ISET2 */
>  			fdim = <100>; /* TPS65217_BL_FDIM_100HZ */
>  			default-brightness = <50>;
> diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c

This shouldn't be in this patch.

Please adhere to: Documentation/devicetree/bindings/submitting-patches.txt

> index 3cc4c70..77708f9 100644
> --- a/drivers/mfd/tps65217.c
> +++ b/drivers/mfd/tps65217.c
> @@ -33,9 +33,11 @@
>  static const struct mfd_cell tps65217s[] = {
>  	{
>  		.name = "tps65217-pmic",
> +		.of_compatible = "ti,tps65217-pmic",
>  	},
>  	{
>  		.name = "tps65217-bl",
> +		.of_compatible = "ti,tps65217-bl",
>  	},
>  };
>  

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH] mfd: tps65217: add compatible string for subdevices
  2014-09-24 11:06 ` Lee Jones
@ 2014-09-24 11:49   ` Johannes Pointner
  0 siblings, 0 replies; 3+ messages in thread
From: Johannes Pointner @ 2014-09-24 11:49 UTC (permalink / raw)
  To: Lee Jones
  Cc: Samuel Ortiz, AnilKumar Ch, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala, devicetree, linux-kernel

2014-09-24 13:06 GMT+02:00 Lee Jones <lee.jones@linaro.org>:
> On Mon, 22 Sep 2014, Johannes Pointner wrote:
>
>> The TPS65217 is missing of_compatible string in the mfd_cell for its
>> subdevices. This compatible string is necessary to use functions like
>> of_find_backlight_by_node in backlight.c.
>>
>> Signed-off-by: Johannes Pointner <johannes.pointner@br-automation.com>
>> ---
>>  Documentation/devicetree/bindings/regulator/tps65217.txt            | 5 ++++-
>>  .../devicetree/bindings/video/backlight/tps65217-backlight.txt      | 6 +++---
>>  drivers/mfd/tps65217.c                                              | 2 ++
>>  3 files changed, 9 insertions(+), 4 deletions(-)
>
> [...]
>
>> diff --git a/Documentation/devicetree/bindings/video/backlight/tps65217-backlight.txt b/Documentation/devicetree/bindings/video/backlight/tps65217-backlight.txt
>> index 5fb9279..c3fb649 100644
>> --- a/Documentation/devicetree/bindings/video/backlight/tps65217-backlight.txt
>> +++ b/Documentation/devicetree/bindings/video/backlight/tps65217-backlight.txt
>> @@ -7,18 +7,18 @@ Required properties:
>>  - compatible: "ti,tps65217"
>>  - reg: I2C slave address
>>  - backlight: node for specifying WLED1 and WLED2 lines in TPS65217
>> +- compatible: "ti,tps65217-bl"
>
> This is now confusing.  Please make it clear that this part of the
> documentation is now referencing the sub-node.

I will add a Subnode properties label, to make it clearer.

>
>>  - isel: selection bit, valid values: 1 for ISEL1 (low-level) and 2 for ISEL2 (high-level)
>>  - fdim: PWM dimming frequency, valid values: 100, 200, 500, 1000
>>  - default-brightness: valid values: 0-100
>>
>> -Each regulator is defined using the standard binding for regulators.
>> -
>>  Example:
>>
>>       tps: tps@24 {
>>               reg = <0x24>;
>>               compatible = "ti,tps65217";
>> -             backlight {
>> +             tps_bl: backlight {
>> +                     compatible = "ti,tps65217-bl";
>>                       isel = <1>;  /* 1 - ISET1, 2 ISET2 */
>>                       fdim = <100>; /* TPS65217_BL_FDIM_100HZ */
>>                       default-brightness = <50>;
>> diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c
>
> This shouldn't be in this patch.
>
> Please adhere to: Documentation/devicetree/bindings/submitting-patches.txt

I will split the patch.
>
>> index 3cc4c70..77708f9 100644
>> --- a/drivers/mfd/tps65217.c
>> +++ b/drivers/mfd/tps65217.c
>> @@ -33,9 +33,11 @@
>>  static const struct mfd_cell tps65217s[] = {
>>       {
>>               .name = "tps65217-pmic",
>> +             .of_compatible = "ti,tps65217-pmic",
>>       },
>>       {
>>               .name = "tps65217-bl",
>> +             .of_compatible = "ti,tps65217-bl",
>>       },
>>  };
>>
>
> --
> Lee Jones
> Linaro STMicroelectronics Landing Team Lead
> Linaro.org │ Open source software for ARM SoCs
> Follow Linaro: Facebook | Twitter | Blog

Thank you for your feedback. I'll resend the patches with the modifications.

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

end of thread, other threads:[~2014-09-24 11:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-22 18:18 [PATCH] mfd: tps65217: add compatible string for subdevices Johannes Pointner
2014-09-24 11:06 ` Lee Jones
2014-09-24 11:49   ` Johannes Pointner

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).