linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] fix vendor prefix for arcxcnn driver and bindings
@ 2019-07-01  0:28 Brian Dodge
  2019-07-01  0:28 ` [PATCH 1/2] dt-bindings: backlight: fix vendor prefix for ArcticSand arcxcnn driver bindings Brian Dodge
  2019-07-01  0:28 ` [PATCH 2/2] backlight: arcxcnn: add "arctic" vendor prefix Brian Dodge
  0 siblings, 2 replies; 19+ messages in thread
From: Brian Dodge @ 2019-07-01  0:28 UTC (permalink / raw)
  To: pavel
  Cc: devicetree, daniel.thompson, jingoohan1, dri-devel, robh+dt,
	jacek.anaszewski, pbacon, lee.jones, linux-leds

These v2 patches incorporate the following changes

1/2 dt-bindings: backlight:

The documentation for "arc" has been re-added but marked (deprecated)
to match the actual driver support for that

2/2 backlight: arcxcnn:

Added new-lines and fixed spelling as per feedback

Original patch description:

This patch is to update the arcxcnn backlight driver to use the
proper "arctic" vendor-prefix and document that in the device-
tree bindings.

There is at least one existing device using the old "arc"
vendor-prefix (Samsung Chromebook Plus), so support for that
remains in the driver source.

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 1/2] dt-bindings: backlight: fix vendor prefix for ArcticSand arcxcnn driver bindings
  2019-07-01  0:28 [PATCH v2 0/2] fix vendor prefix for arcxcnn driver and bindings Brian Dodge
@ 2019-07-01  0:28 ` Brian Dodge
  2019-07-02  9:26   ` Daniel Thompson
  2019-07-08 18:02   ` Dan Murphy
  2019-07-01  0:28 ` [PATCH 2/2] backlight: arcxcnn: add "arctic" vendor prefix Brian Dodge
  1 sibling, 2 replies; 19+ messages in thread
From: Brian Dodge @ 2019-07-01  0:28 UTC (permalink / raw)
  To: pavel
  Cc: devicetree, daniel.thompson, Brian Dodge, jingoohan1, dri-devel,
	robh+dt, jacek.anaszewski, pbacon, lee.jones, linux-leds

The vendor-prefixes.txt file properly refers to ArcticSand
as arctic but the driver bindings improperly abbreviated the
prefix to arc. This was a mistake in the original patch. This
patch adds "arctic" and retains "arc" (deprecated) bindings

Signed-off-by: Brian Dodge <bdodge09@gmail.com>
---
 .../bindings/leds/backlight/arcxcnn_bl.txt         | 31 +++++++++++++++-------
 1 file changed, 21 insertions(+), 10 deletions(-)

diff --git a/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt b/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt
index 230abde..4d98394 100644
--- a/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt
+++ b/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt
@@ -1,8 +1,13 @@
-Binding for ArcticSand arc2c0608 LED driver
+Binding for ArcticSand arc family LED drivers
 
 Required properties:
-- compatible:		should be "arc,arc2c0608"
-- reg:			slave address
+- compatible: one of
+	"arctic,arc1c0608"
+	"arctic,arc2c0608"
+	"arctic,arc3c0845"
+	"arc,arc2c0608" (deprecated)
+
+- reg:		slave address
 
 Optional properties:
 - default-brightness:	brightness value on boot, value from: 0-4095
@@ -11,19 +16,25 @@ Optional properties:
 - led-sources:		List of enabled channels from 0 to 5.
 			See Documentation/devicetree/bindings/leds/common.txt
 
-- arc,led-config-0:	setting for register ILED_CONFIG_0
-- arc,led-config-1:	setting for register ILED_CONFIG_1
-- arc,dim-freq:		PWM mode frequence setting (bits [3:0] used)
-- arc,comp-config:	setting for register CONFIG_COMP
-- arc,filter-config:	setting for register FILTER_CONFIG
-- arc,trim-config:	setting for register IMAXTUNE
+- arctic,led-config-0:	setting for register ILED_CONFIG_0
+- arctic,led-config-1:	setting for register ILED_CONFIG_1
+- arctic,dim-freq:	PWM mode frequence setting (bits [3:0] used)
+- arctic,comp-config:	setting for register CONFIG_COMP
+- arctic,filter-config:	setting for register FILTER_CONFIG
+- arctic,trim-config:	setting for register IMAXTUNE
+- arc,led-config-0:	setting for register ILED_CONFIG_0 (deprecated)
+- arc,led-config-1:	setting for register ILED_CONFIG_1 (deprecated)
+- arc,dim-freq:		PWM mode frequence setting (bits [3:0] used) (deprecated)
+- arc,comp-config:	setting for register CONFIG_COMP (deprecated)
+- arc,filter-config:	setting for register FILTER_CONFIG (deprecated)
+- arc,trim-config:	setting for register IMAXTUNE (deprecated)
 
 Note: Optional properties not specified will default to values in IC EPROM
 
 Example:
 
 arc2c0608@30 {
-	compatible = "arc,arc2c0608";
+	compatible = "arctic,arc2c0608";
 	reg = <0x30>;
 	default-brightness = <500>;
 	label = "lcd-backlight";
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 2/2] backlight: arcxcnn: add "arctic" vendor prefix
  2019-07-01  0:28 [PATCH v2 0/2] fix vendor prefix for arcxcnn driver and bindings Brian Dodge
  2019-07-01  0:28 ` [PATCH 1/2] dt-bindings: backlight: fix vendor prefix for ArcticSand arcxcnn driver bindings Brian Dodge
@ 2019-07-01  0:28 ` Brian Dodge
  2019-07-05  9:37   ` Pavel Machek
  2019-07-08 18:05   ` Dan Murphy
  1 sibling, 2 replies; 19+ messages in thread
From: Brian Dodge @ 2019-07-01  0:28 UTC (permalink / raw)
  To: pavel
  Cc: devicetree, daniel.thompson, Brian Dodge, jingoohan1, dri-devel,
	robh+dt, jacek.anaszewski, pbacon, lee.jones, linux-leds

The original patch adding this driver and DT bindings improperly
used "arc" as the vendor-prefix. This adds "arctic" which is the
proper prefix and retains "arc" to allow existing users of the
"arc" prefix to update to new kernels. There is at least one
(Samsung Chromebook Plus)

Signed-off-by: Brian Dodge <bdodge09@gmail.com>
Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
---
 drivers/video/backlight/arcxcnn_bl.c | 41 +++++++++++++++++++++++++++---------
 1 file changed, 31 insertions(+), 10 deletions(-)

diff --git a/drivers/video/backlight/arcxcnn_bl.c b/drivers/video/backlight/arcxcnn_bl.c
index 7b1c0a0..a419554 100644
--- a/drivers/video/backlight/arcxcnn_bl.c
+++ b/drivers/video/backlight/arcxcnn_bl.c
@@ -1,9 +1,9 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
- * Backlight driver for ArcticSand ARC_X_C_0N_0N Devices
+ * Backlight driver for pSemi (formerly ArcticSand) ARC_X_C_0N_0N Devices
  *
- * Copyright 2016 ArcticSand, Inc.
- * Author : Brian Dodge <bdodge@arcticsand.com>
+ * Copyright 2016-2019  pSemi, Inc.
+ * Author : Brian Dodge <bdodge@psemi.com>
  */
 
 #include <linux/backlight.h>
@@ -191,27 +191,46 @@ static void arcxcnn_parse_dt(struct arcxcnn *lp)
 	if (ret == 0)
 		lp->pdata->initial_brightness = prog_val;
 
-	ret = of_property_read_u32(node, "arc,led-config-0", &prog_val);
+	ret = of_property_read_u32(node, "arctic,led-config-0", &prog_val);
+	if (ret)
+		ret = of_property_read_u32(node, "arc,led-config-0", &prog_val);
+
 	if (ret == 0)
 		lp->pdata->led_config_0 = (u8)prog_val;
 
-	ret = of_property_read_u32(node, "arc,led-config-1", &prog_val);
+	ret = of_property_read_u32(node, "arctic,led-config-1", &prog_val);
+	if (ret)
+		ret = of_property_read_u32(node, "arc,led-config-1", &prog_val);
+
 	if (ret == 0)
 		lp->pdata->led_config_1 = (u8)prog_val;
 
-	ret = of_property_read_u32(node, "arc,dim-freq", &prog_val);
+	ret = of_property_read_u32(node, "arctic,dim-freq", &prog_val);
+	if (ret)
+		ret = of_property_read_u32(node, "arc,dim-freq", &prog_val);
+
 	if (ret == 0)
 		lp->pdata->dim_freq = (u8)prog_val;
 
-	ret = of_property_read_u32(node, "arc,comp-config", &prog_val);
+	ret = of_property_read_u32(node, "arctic,comp-config", &prog_val);
+	if (ret)
+		ret = of_property_read_u32(node, "arc,comp-config", &prog_val);
+
 	if (ret == 0)
 		lp->pdata->comp_config = (u8)prog_val;
 
-	ret = of_property_read_u32(node, "arc,filter-config", &prog_val);
+	ret = of_property_read_u32(node, "arctic,filter-config", &prog_val);
+	if (ret)
+		ret = of_property_read_u32(node,
+				"arc,filter-config", &prog_val);
+
 	if (ret == 0)
 		lp->pdata->filter_config = (u8)prog_val;
 
-	ret = of_property_read_u32(node, "arc,trim-config", &prog_val);
+	ret = of_property_read_u32(node, "arctic,trim-config", &prog_val);
+	if (ret)
+		ret = of_property_read_u32(node, "arc,trim-config", &prog_val);
+
 	if (ret == 0)
 		lp->pdata->trim_config = (u8)prog_val;
 
@@ -381,6 +400,8 @@ static int arcxcnn_remove(struct i2c_client *cl)
 }
 
 static const struct of_device_id arcxcnn_dt_ids[] = {
+	{ .compatible = "arctic,arc2c0608" },
+	/* here to remain compatible with an older binding, do not use */
 	{ .compatible = "arc,arc2c0608" },
 	{ }
 };
@@ -404,5 +425,5 @@ static struct i2c_driver arcxcnn_driver = {
 module_i2c_driver(arcxcnn_driver);
 
 MODULE_LICENSE("GPL v2");
-MODULE_AUTHOR("Brian Dodge <bdodge@arcticsand.com>");
+MODULE_AUTHOR("Brian Dodge <bdodge@psemi.com>");
 MODULE_DESCRIPTION("ARCXCNN Backlight driver");
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 1/2] dt-bindings: backlight: fix vendor prefix for ArcticSand arcxcnn driver bindings
  2019-07-01  0:28 ` [PATCH 1/2] dt-bindings: backlight: fix vendor prefix for ArcticSand arcxcnn driver bindings Brian Dodge
@ 2019-07-02  9:26   ` Daniel Thompson
  2019-07-02 11:21     ` Brian Dodge
  2019-07-08 18:02   ` Dan Murphy
  1 sibling, 1 reply; 19+ messages in thread
From: Daniel Thompson @ 2019-07-02  9:26 UTC (permalink / raw)
  To: Brian Dodge
  Cc: devicetree, jingoohan1, dri-devel, robh+dt, jacek.anaszewski,
	pavel, pbacon, lee.jones, linux-leds

> [PATCH 1/2] dt-bindings: backlight: fix vendor prefix for
> ArcticSand arcxcnn driver bindings

The "v2" is normally applied to the whole patchset (if you
prepare the patchset using git format-patch then you can use
the --subject-prefix argument for that).


On Sun, Jun 30, 2019 at 08:28:14PM -0400, Brian Dodge wrote:
> The vendor-prefixes.txt file properly refers to ArcticSand
> as arctic but the driver bindings improperly abbreviated the
> prefix to arc. This was a mistake in the original patch. This
> patch adds "arctic" and retains "arc" (deprecated) bindings
> 
> Signed-off-by: Brian Dodge <bdodge09@gmail.com>
> ---
>  .../bindings/leds/backlight/arcxcnn_bl.txt         | 31 +++++++++++++++-------
>  1 file changed, 21 insertions(+), 10 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt b/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt
> index 230abde..4d98394 100644
> --- a/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt
> +++ b/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt
> @@ -1,8 +1,13 @@
> -Binding for ArcticSand arc2c0608 LED driver
> +Binding for ArcticSand arc family LED drivers
>  
>  Required properties:
> -- compatible:		should be "arc,arc2c0608"
> -- reg:			slave address
> +- compatible: one of
> +	"arctic,arc1c0608"
> +	"arctic,arc2c0608"
> +	"arctic,arc3c0845"
> +	"arc,arc2c0608" (deprecated)

Nothing wrong with adding compatible strings for arc1 and arc3 but I
would expect it to be mentioned in the description to reassure reviewers
that the right depth of thought has been applied Something like "Also added
compatible strings for other family members, all the existing optional
properties work the same way for the new devices." (if you agree that it
is true) is good to show you were paying proper attention!

However this does perhaps verge a little towards nitpicking so maybe
wait to see what the DT folks say. From my point of view:
Acked-by: Daniel Thompson <daniel.thompson@linaro.org>


Daniel.


> +
> +- reg:		slave address
>  
>  Optional properties:
>  - default-brightness:	brightness value on boot, value from: 0-4095
> @@ -11,19 +16,25 @@ Optional properties:
>  - led-sources:		List of enabled channels from 0 to 5.
>  			See Documentation/devicetree/bindings/leds/common.txt
>  
> -- arc,led-config-0:	setting for register ILED_CONFIG_0
> -- arc,led-config-1:	setting for register ILED_CONFIG_1
> -- arc,dim-freq:		PWM mode frequence setting (bits [3:0] used)
> -- arc,comp-config:	setting for register CONFIG_COMP
> -- arc,filter-config:	setting for register FILTER_CONFIG
> -- arc,trim-config:	setting for register IMAXTUNE
> +- arctic,led-config-0:	setting for register ILED_CONFIG_0
> +- arctic,led-config-1:	setting for register ILED_CONFIG_1
> +- arctic,dim-freq:	PWM mode frequence setting (bits [3:0] used)
> +- arctic,comp-config:	setting for register CONFIG_COMP
> +- arctic,filter-config:	setting for register FILTER_CONFIG
> +- arctic,trim-config:	setting for register IMAXTUNE
> +- arc,led-config-0:	setting for register ILED_CONFIG_0 (deprecated)
> +- arc,led-config-1:	setting for register ILED_CONFIG_1 (deprecated)
> +- arc,dim-freq:		PWM mode frequence setting (bits [3:0] used) (deprecated)
> +- arc,comp-config:	setting for register CONFIG_COMP (deprecated)
> +- arc,filter-config:	setting for register FILTER_CONFIG (deprecated)
> +- arc,trim-config:	setting for register IMAXTUNE (deprecated)
>  
>  Note: Optional properties not specified will default to values in IC EPROM
>  
>  Example:
>  
>  arc2c0608@30 {
> -	compatible = "arc,arc2c0608";
> +	compatible = "arctic,arc2c0608";
>  	reg = <0x30>;
>  	default-brightness = <500>;
>  	label = "lcd-backlight";
> -- 
> 2.7.4
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 1/2] dt-bindings: backlight: fix vendor prefix for ArcticSand arcxcnn driver bindings
  2019-07-02  9:26   ` Daniel Thompson
@ 2019-07-02 11:21     ` Brian Dodge
  2019-07-02 13:11       ` Daniel Thompson
  0 siblings, 1 reply; 19+ messages in thread
From: Brian Dodge @ 2019-07-02 11:21 UTC (permalink / raw)
  To: Daniel Thompson
  Cc: devicetree, jingoohan1, dri-devel, robh+dt, jacek.anaszewski,
	pavel, pbacon, lee.jones, linux-leds


On 7/2/19 5:26 AM, Daniel Thompson wrote:
>> [PATCH 1/2] dt-bindings: backlight: fix vendor prefix for
>> ArcticSand arcxcnn driver bindings
> The "v2" is normally applied to the whole patchset (if you
> prepare the patchset using git format-patch then you can use
> the --subject-prefix argument for that).
Sorry and noted
>
> On Sun, Jun 30, 2019 at 08:28:14PM -0400, Brian Dodge wrote:
>> The vendor-prefixes.txt file properly refers to ArcticSand
>> as arctic but the driver bindings improperly abbreviated the
>> prefix to arc. This was a mistake in the original patch. This
>> patch adds "arctic" and retains "arc" (deprecated) bindings
>>
>> Signed-off-by: Brian Dodge <bdodge09@gmail.com>
>> ---
>>   .../bindings/leds/backlight/arcxcnn_bl.txt         | 31 +++++++++++++++-------
>>   1 file changed, 21 insertions(+), 10 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt b/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt
>> index 230abde..4d98394 100644
>> --- a/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt
>> +++ b/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt
>> @@ -1,8 +1,13 @@
>> -Binding for ArcticSand arc2c0608 LED driver
>> +Binding for ArcticSand arc family LED drivers
>>   
>>   Required properties:
>> -- compatible:		should be "arc,arc2c0608"
>> -- reg:			slave address
>> +- compatible: one of
>> +	"arctic,arc1c0608"
>> +	"arctic,arc2c0608"
>> +	"arctic,arc3c0845"
>> +	"arc,arc2c0608" (deprecated)
> Nothing wrong with adding compatible strings for arc1 and arc3 but I
> would expect it to be mentioned in the description to reassure reviewers
> that the right depth of thought has been applied Something like "Also added
> compatible strings for other family members, all the existing optional
> properties work the same way for the new devices." (if you agree that it
> is true) is good to show you were paying proper attention!
>
> However this does perhaps verge a little towards nitpicking so maybe
> wait to see what the DT folks say. From my point of view:
> Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
>
>
> Daniel.

Good point. I did actually think about this a bit. The *only* chip 
available at the time of the original driver was the arc2c0608 and that 
is the chip that is currently in use in the Samsung Chromebook Plus, and 
the only use I know of using the "arc" prefix. There will be no reason 
to ever support "arc,arc1.." or "arc,arc3..." in the bindings for past 
or future use.

The new two chips are just basically supported by this driver. There is 
more functionality to them which will be enabled in my next patch. I 
wanted to separate the move to "arctic" from the move to fully support 
the other chips for clarity (you guys are all rightly picky!) I did put 
the new chip bindings in the driver/bindings in this patch though so I 
could test this patch against the actual h/w instances: I have three 
boards, one with each chip type and each has a dtb with the "arctic,.." 
type binding onboard.

>> +
>> +- reg:		slave address
>>   
>>   Optional properties:
>>   - default-brightness:	brightness value on boot, value from: 0-4095
>> @@ -11,19 +16,25 @@ Optional properties:
>>   - led-sources:		List of enabled channels from 0 to 5.
>>   			See Documentation/devicetree/bindings/leds/common.txt
>>   
>> -- arc,led-config-0:	setting for register ILED_CONFIG_0
>> -- arc,led-config-1:	setting for register ILED_CONFIG_1
>> -- arc,dim-freq:		PWM mode frequence setting (bits [3:0] used)
>> -- arc,comp-config:	setting for register CONFIG_COMP
>> -- arc,filter-config:	setting for register FILTER_CONFIG
>> -- arc,trim-config:	setting for register IMAXTUNE
>> +- arctic,led-config-0:	setting for register ILED_CONFIG_0
>> +- arctic,led-config-1:	setting for register ILED_CONFIG_1
>> +- arctic,dim-freq:	PWM mode frequence setting (bits [3:0] used)
>> +- arctic,comp-config:	setting for register CONFIG_COMP
>> +- arctic,filter-config:	setting for register FILTER_CONFIG
>> +- arctic,trim-config:	setting for register IMAXTUNE
>> +- arc,led-config-0:	setting for register ILED_CONFIG_0 (deprecated)
>> +- arc,led-config-1:	setting for register ILED_CONFIG_1 (deprecated)
>> +- arc,dim-freq:		PWM mode frequence setting (bits [3:0] used) (deprecated)
>> +- arc,comp-config:	setting for register CONFIG_COMP (deprecated)
>> +- arc,filter-config:	setting for register FILTER_CONFIG (deprecated)
>> +- arc,trim-config:	setting for register IMAXTUNE (deprecated)
>>   
>>   Note: Optional properties not specified will default to values in IC EPROM
>>   
>>   Example:
>>   
>>   arc2c0608@30 {
>> -	compatible = "arc,arc2c0608";
>> +	compatible = "arctic,arc2c0608";
>>   	reg = <0x30>;
>>   	default-brightness = <500>;
>>   	label = "lcd-backlight";
>> -- 
>> 2.7.4
>>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 1/2] dt-bindings: backlight: fix vendor prefix for ArcticSand arcxcnn driver bindings
  2019-07-02 11:21     ` Brian Dodge
@ 2019-07-02 13:11       ` Daniel Thompson
  0 siblings, 0 replies; 19+ messages in thread
From: Daniel Thompson @ 2019-07-02 13:11 UTC (permalink / raw)
  To: Brian Dodge
  Cc: devicetree, jingoohan1, dri-devel, robh+dt, jacek.anaszewski,
	pavel, pbacon, lee.jones, linux-leds

On Tue, Jul 02, 2019 at 07:21:29AM -0400, Brian Dodge wrote:
> 
> On 7/2/19 5:26 AM, Daniel Thompson wrote:
> > > [PATCH 1/2] dt-bindings: backlight: fix vendor prefix for
> > > ArcticSand arcxcnn driver bindings
> > The "v2" is normally applied to the whole patchset (if you
> > prepare the patchset using git format-patch then you can use
> > the --subject-prefix argument for that).
> Sorry and noted
> > 
> > On Sun, Jun 30, 2019 at 08:28:14PM -0400, Brian Dodge wrote:
> > > The vendor-prefixes.txt file properly refers to ArcticSand
> > > as arctic but the driver bindings improperly abbreviated the
> > > prefix to arc. This was a mistake in the original patch. This
> > > patch adds "arctic" and retains "arc" (deprecated) bindings
> > > 
> > > Signed-off-by: Brian Dodge <bdodge09@gmail.com>
> > > ---
> > >   .../bindings/leds/backlight/arcxcnn_bl.txt         | 31 +++++++++++++++-------
> > >   1 file changed, 21 insertions(+), 10 deletions(-)
> > > 
> > > diff --git a/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt b/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt
> > > index 230abde..4d98394 100644
> > > --- a/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt
> > > +++ b/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt
> > > @@ -1,8 +1,13 @@
> > > -Binding for ArcticSand arc2c0608 LED driver
> > > +Binding for ArcticSand arc family LED drivers
> > >   Required properties:
> > > -- compatible:		should be "arc,arc2c0608"
> > > -- reg:			slave address
> > > +- compatible: one of
> > > +	"arctic,arc1c0608"
> > > +	"arctic,arc2c0608"
> > > +	"arctic,arc3c0845"
> > > +	"arc,arc2c0608" (deprecated)
> > Nothing wrong with adding compatible strings for arc1 and arc3 but I
> > would expect it to be mentioned in the description to reassure reviewers
> > that the right depth of thought has been applied Something like "Also added
> > compatible strings for other family members, all the existing optional
> > properties work the same way for the new devices." (if you agree that it
> > is true) is good to show you were paying proper attention!
> > 
> > However this does perhaps verge a little towards nitpicking so maybe
> > wait to see what the DT folks say. From my point of view:
> > Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
> > 
> > 
> > Daniel.
> 
> Good point. I did actually think about this a bit. The *only* chip available
> at the time of the original driver was the arc2c0608 and that is the chip
> that is currently in use in the Samsung Chromebook Plus, and the only use I
> know of using the "arc" prefix. There will be no reason to ever support
> "arc,arc1.." or "arc,arc3..." in the bindings for past or future use.
> 
> The new two chips are just basically supported by this driver. There is more
> functionality to them which will be enabled in my next patch. I wanted to
> separate the move to "arctic" from the move to fully support the other chips
> for clarity (you guys are all rightly picky!) I did put the new chip
> bindings in the driver/bindings in this patch though so I could test this
> patch against the actual h/w instances: I have three boards, one with each
> chip type and each has a dtb with the "arctic,.." type binding onboard.

I think you have misunderstood. I've got no problem with renaming the
properties as well.

What I was bringing up is that you have extended the scope of the
bindings to cover the arc1 and arc3 devices. It would be good for you
to explicitly confirm that the existing properties all still apply
to arc1 and arc3 devices, and that no new properties are needed to
model them properly.

As it happens I *did* glance at your old arc1/arc3 patch to check it for
myself before I offered you the Acked-by and didn't see anything that
offended me. However a good patch description would have spared me that
work...


Daniel.


> 
> > > +
> > > +- reg:		slave address
> > >   Optional properties:
> > >   - default-brightness:	brightness value on boot, value from: 0-4095
> > > @@ -11,19 +16,25 @@ Optional properties:
> > >   - led-sources:		List of enabled channels from 0 to 5.
> > >   			See Documentation/devicetree/bindings/leds/common.txt
> > > -- arc,led-config-0:	setting for register ILED_CONFIG_0
> > > -- arc,led-config-1:	setting for register ILED_CONFIG_1
> > > -- arc,dim-freq:		PWM mode frequence setting (bits [3:0] used)
> > > -- arc,comp-config:	setting for register CONFIG_COMP
> > > -- arc,filter-config:	setting for register FILTER_CONFIG
> > > -- arc,trim-config:	setting for register IMAXTUNE
> > > +- arctic,led-config-0:	setting for register ILED_CONFIG_0
> > > +- arctic,led-config-1:	setting for register ILED_CONFIG_1
> > > +- arctic,dim-freq:	PWM mode frequence setting (bits [3:0] used)
> > > +- arctic,comp-config:	setting for register CONFIG_COMP
> > > +- arctic,filter-config:	setting for register FILTER_CONFIG
> > > +- arctic,trim-config:	setting for register IMAXTUNE
> > > +- arc,led-config-0:	setting for register ILED_CONFIG_0 (deprecated)
> > > +- arc,led-config-1:	setting for register ILED_CONFIG_1 (deprecated)
> > > +- arc,dim-freq:		PWM mode frequence setting (bits [3:0] used) (deprecated)
> > > +- arc,comp-config:	setting for register CONFIG_COMP (deprecated)
> > > +- arc,filter-config:	setting for register FILTER_CONFIG (deprecated)
> > > +- arc,trim-config:	setting for register IMAXTUNE (deprecated)
> > >   Note: Optional properties not specified will default to values in IC EPROM
> > >   Example:
> > >   arc2c0608@30 {
> > > -	compatible = "arc,arc2c0608";
> > > +	compatible = "arctic,arc2c0608";
> > >   	reg = <0x30>;
> > >   	default-brightness = <500>;
> > >   	label = "lcd-backlight";
> > > -- 
> > > 2.7.4
> > > 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 2/2] backlight: arcxcnn: add "arctic" vendor prefix
  2019-07-01  0:28 ` [PATCH 2/2] backlight: arcxcnn: add "arctic" vendor prefix Brian Dodge
@ 2019-07-05  9:37   ` Pavel Machek
  2019-07-05  9:37     ` Pavel Machek
  2019-07-08 18:05   ` Dan Murphy
  1 sibling, 1 reply; 19+ messages in thread
From: Pavel Machek @ 2019-07-05  9:37 UTC (permalink / raw)
  To: Brian Dodge
  Cc: devicetree, daniel.thompson, jingoohan1, dri-devel, robh+dt,
	jacek.anaszewski, pbacon, lee.jones, linux-leds

On Sun 2019-06-30 20:28:15, Brian Dodge wrote:
> The original patch adding this driver and DT bindings improperly
> used "arc" as the vendor-prefix. This adds "arctic" which is the
> proper prefix and retains "arc" to allow existing users of the
> "arc" prefix to update to new kernels. There is at least one
> (Samsung Chromebook Plus)
> 
> Signed-off-by: Brian Dodge <bdodge09@gmail.com>
> Acked-by: Daniel Thompson <daniel.thompson@linaro.org>

ack.

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 2/2] backlight: arcxcnn: add "arctic" vendor prefix
  2019-07-05  9:37   ` Pavel Machek
@ 2019-07-05  9:37     ` Pavel Machek
  0 siblings, 0 replies; 19+ messages in thread
From: Pavel Machek @ 2019-07-05  9:37 UTC (permalink / raw)
  To: Brian Dodge
  Cc: daniel.thompson, lee.jones, jingoohan1, jacek.anaszewski,
	robh+dt, dri-devel, linux-leds, devicetree, pbacon

On Sun 2019-06-30 20:28:15, Brian Dodge wrote:
> The original patch adding this driver and DT bindings improperly
> used "arc" as the vendor-prefix. This adds "arctic" which is the
> proper prefix and retains "arc" to allow existing users of the
> "arc" prefix to update to new kernels. There is at least one
> (Samsung Chromebook Plus)
> 
> Signed-off-by: Brian Dodge <bdodge09@gmail.com>
> Acked-by: Daniel Thompson <daniel.thompson@linaro.org>

ack.

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

* Re: [PATCH 1/2] dt-bindings: backlight: fix vendor prefix for ArcticSand arcxcnn driver bindings
  2019-07-01  0:28 ` [PATCH 1/2] dt-bindings: backlight: fix vendor prefix for ArcticSand arcxcnn driver bindings Brian Dodge
  2019-07-02  9:26   ` Daniel Thompson
@ 2019-07-08 18:02   ` Dan Murphy
  2019-07-08 18:02     ` Dan Murphy
  2019-07-09 17:48     ` Brian Dodge
  1 sibling, 2 replies; 19+ messages in thread
From: Dan Murphy @ 2019-07-08 18:02 UTC (permalink / raw)
  To: Brian Dodge, pavel
  Cc: devicetree, daniel.thompson, jingoohan1, dri-devel, robh+dt,
	jacek.anaszewski, pbacon, lee.jones, linux-leds

Brian

On 6/30/19 7:28 PM, Brian Dodge wrote:
> The vendor-prefixes.txt file properly refers to ArcticSand
> as arctic but the driver bindings improperly abbreviated the
> prefix to arc. This was a mistake in the original patch. This
> patch adds "arctic" and retains "arc" (deprecated) bindings
>
> Signed-off-by: Brian Dodge <bdodge09@gmail.com>
> ---
>   .../bindings/leds/backlight/arcxcnn_bl.txt         | 31 +++++++++++++++-------
>   1 file changed, 21 insertions(+), 10 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt b/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt
> index 230abde..4d98394 100644
> --- a/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt
> +++ b/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt
> @@ -1,8 +1,13 @@
> -Binding for ArcticSand arc2c0608 LED driver
> +Binding for ArcticSand arc family LED drivers
>   
>   Required properties:
> -- compatible:		should be "arc,arc2c0608"
> -- reg:			slave address
> +- compatible: one of
> +	"arctic,arc1c0608"
> +	"arctic,arc2c0608"
> +	"arctic,arc3c0845"
> +	"arc,arc2c0608" (deprecated)
> +
> +- reg:		slave address
>   
>   Optional properties:
>   - default-brightness:	brightness value on boot, value from: 0-4095
> @@ -11,19 +16,25 @@ Optional properties:
>   - led-sources:		List of enabled channels from 0 to 5.
>   			See Documentation/devicetree/bindings/leds/common.txt
>   
> -- arc,led-config-0:	setting for register ILED_CONFIG_0
> -- arc,led-config-1:	setting for register ILED_CONFIG_1
> -- arc,dim-freq:		PWM mode frequence setting (bits [3:0] used)
> -- arc,comp-config:	setting for register CONFIG_COMP
> -- arc,filter-config:	setting for register FILTER_CONFIG
> -- arc,trim-config:	setting for register IMAXTUNE
> +- arctic,led-config-0:	setting for register ILED_CONFIG_0
> +- arctic,led-config-1:	setting for register ILED_CONFIG_1
> +- arctic,dim-freq:	PWM mode frequence setting (bits [3:0] used)
> +- arctic,comp-config:	setting for register CONFIG_COMP
> +- arctic,filter-config:	setting for register FILTER_CONFIG
> +- arctic,trim-config:	setting for register IMAXTUNE
> +- arc,led-config-0:	setting for register ILED_CONFIG_0 (deprecated)
> +- arc,led-config-1:	setting for register ILED_CONFIG_1 (deprecated)
> +- arc,dim-freq:		PWM mode frequence setting (bits [3:0] used) (deprecated)
> +- arc,comp-config:	setting for register CONFIG_COMP (deprecated)
> +- arc,filter-config:	setting for register FILTER_CONFIG (deprecated)
> +- arc,trim-config:	setting for register IMAXTUNE (deprecated)
>   
>   Note: Optional properties not specified will default to values in IC EPROM
>   
>   Example:
>   
>   arc2c0608@30 {
> -	compatible = "arc,arc2c0608";
> +	compatible = "arctic,arc2c0608";
>   	reg = <0x30>;
>   	default-brightness = <500>;
>   	label = "lcd-backlight";


Reviewed-by: Dan Murphy <dmurphy@ti.com>

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 1/2] dt-bindings: backlight: fix vendor prefix for ArcticSand arcxcnn driver bindings
  2019-07-08 18:02   ` Dan Murphy
@ 2019-07-08 18:02     ` Dan Murphy
  2019-07-09 17:48     ` Brian Dodge
  1 sibling, 0 replies; 19+ messages in thread
From: Dan Murphy @ 2019-07-08 18:02 UTC (permalink / raw)
  To: Brian Dodge, pavel
  Cc: daniel.thompson, lee.jones, jingoohan1, jacek.anaszewski,
	robh+dt, dri-devel, linux-leds, devicetree, pbacon

Brian

On 6/30/19 7:28 PM, Brian Dodge wrote:
> The vendor-prefixes.txt file properly refers to ArcticSand
> as arctic but the driver bindings improperly abbreviated the
> prefix to arc. This was a mistake in the original patch. This
> patch adds "arctic" and retains "arc" (deprecated) bindings
>
> Signed-off-by: Brian Dodge <bdodge09@gmail.com>
> ---
>   .../bindings/leds/backlight/arcxcnn_bl.txt         | 31 +++++++++++++++-------
>   1 file changed, 21 insertions(+), 10 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt b/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt
> index 230abde..4d98394 100644
> --- a/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt
> +++ b/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt
> @@ -1,8 +1,13 @@
> -Binding for ArcticSand arc2c0608 LED driver
> +Binding for ArcticSand arc family LED drivers
>   
>   Required properties:
> -- compatible:		should be "arc,arc2c0608"
> -- reg:			slave address
> +- compatible: one of
> +	"arctic,arc1c0608"
> +	"arctic,arc2c0608"
> +	"arctic,arc3c0845"
> +	"arc,arc2c0608" (deprecated)
> +
> +- reg:		slave address
>   
>   Optional properties:
>   - default-brightness:	brightness value on boot, value from: 0-4095
> @@ -11,19 +16,25 @@ Optional properties:
>   - led-sources:		List of enabled channels from 0 to 5.
>   			See Documentation/devicetree/bindings/leds/common.txt
>   
> -- arc,led-config-0:	setting for register ILED_CONFIG_0
> -- arc,led-config-1:	setting for register ILED_CONFIG_1
> -- arc,dim-freq:		PWM mode frequence setting (bits [3:0] used)
> -- arc,comp-config:	setting for register CONFIG_COMP
> -- arc,filter-config:	setting for register FILTER_CONFIG
> -- arc,trim-config:	setting for register IMAXTUNE
> +- arctic,led-config-0:	setting for register ILED_CONFIG_0
> +- arctic,led-config-1:	setting for register ILED_CONFIG_1
> +- arctic,dim-freq:	PWM mode frequence setting (bits [3:0] used)
> +- arctic,comp-config:	setting for register CONFIG_COMP
> +- arctic,filter-config:	setting for register FILTER_CONFIG
> +- arctic,trim-config:	setting for register IMAXTUNE
> +- arc,led-config-0:	setting for register ILED_CONFIG_0 (deprecated)
> +- arc,led-config-1:	setting for register ILED_CONFIG_1 (deprecated)
> +- arc,dim-freq:		PWM mode frequence setting (bits [3:0] used) (deprecated)
> +- arc,comp-config:	setting for register CONFIG_COMP (deprecated)
> +- arc,filter-config:	setting for register FILTER_CONFIG (deprecated)
> +- arc,trim-config:	setting for register IMAXTUNE (deprecated)
>   
>   Note: Optional properties not specified will default to values in IC EPROM
>   
>   Example:
>   
>   arc2c0608@30 {
> -	compatible = "arc,arc2c0608";
> +	compatible = "arctic,arc2c0608";
>   	reg = <0x30>;
>   	default-brightness = <500>;
>   	label = "lcd-backlight";


Reviewed-by: Dan Murphy <dmurphy@ti.com>


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

* Re: [PATCH 2/2] backlight: arcxcnn: add "arctic" vendor prefix
  2019-07-01  0:28 ` [PATCH 2/2] backlight: arcxcnn: add "arctic" vendor prefix Brian Dodge
  2019-07-05  9:37   ` Pavel Machek
@ 2019-07-08 18:05   ` Dan Murphy
  2019-07-08 18:05     ` Dan Murphy
  2019-07-08 19:05     ` Brian Dodge
  1 sibling, 2 replies; 19+ messages in thread
From: Dan Murphy @ 2019-07-08 18:05 UTC (permalink / raw)
  To: Brian Dodge, pavel
  Cc: devicetree, daniel.thompson, jingoohan1, dri-devel, robh+dt,
	jacek.anaszewski, pbacon, lee.jones, linux-leds

Brian

On 6/30/19 7:28 PM, Brian Dodge wrote:
> The original patch adding this driver and DT bindings improperly
> used "arc" as the vendor-prefix. This adds "arctic" which is the
> proper prefix and retains "arc" to allow existing users of the
> "arc" prefix to update to new kernels. There is at least one
> (Samsung Chromebook Plus)
>
> Signed-off-by: Brian Dodge <bdodge09@gmail.com>
> Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
> ---
>   drivers/video/backlight/arcxcnn_bl.c | 41 +++++++++++++++++++++++++++---------
>   1 file changed, 31 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/video/backlight/arcxcnn_bl.c b/drivers/video/backlight/arcxcnn_bl.c
> index 7b1c0a0..a419554 100644
> --- a/drivers/video/backlight/arcxcnn_bl.c
> +++ b/drivers/video/backlight/arcxcnn_bl.c
> @@ -1,9 +1,9 @@
>   // SPDX-License-Identifier: GPL-2.0-only
>   /*
> - * Backlight driver for ArcticSand ARC_X_C_0N_0N Devices
> + * Backlight driver for pSemi (formerly ArcticSand) ARC_X_C_0N_0N Devices
>    *
> - * Copyright 2016 ArcticSand, Inc.
> - * Author : Brian Dodge <bdodge@arcticsand.com>

I know you are the original author from ArcticSand but did pSemi 
actually own the copyright in 2016?

I don't think this is a big issue just wondering if we should retain the 
ArcticSand copyright as well.

Probably a question for your legal department.

Otherwise

Reviewed-by: Dan Murphy <dmurphy@ti.com>

> + * Copyright 2016-2019  pSemi, Inc.
> + * Author : Brian Dodge <bdodge@psemi.com>
>    */
>   
>   #include <linux/backlight.h>
> @@ -191,27 +191,46 @@ static void arcxcnn_parse_dt(struct arcxcnn *lp)
>   	if (ret == 0)
>   		lp->pdata->initial_brightness = prog_val;
>   
> -	ret = of_property_read_u32(node, "arc,led-config-0", &prog_val);
> +	ret = of_property_read_u32(node, "arctic,led-config-0", &prog_val);
> +	if (ret)
> +		ret = of_property_read_u32(node, "arc,led-config-0", &prog_val);
> +
>   	if (ret == 0)
>   		lp->pdata->led_config_0 = (u8)prog_val;
>   
> -	ret = of_property_read_u32(node, "arc,led-config-1", &prog_val);
> +	ret = of_property_read_u32(node, "arctic,led-config-1", &prog_val);
> +	if (ret)
> +		ret = of_property_read_u32(node, "arc,led-config-1", &prog_val);
> +
>   	if (ret == 0)
>   		lp->pdata->led_config_1 = (u8)prog_val;
>   
> -	ret = of_property_read_u32(node, "arc,dim-freq", &prog_val);
> +	ret = of_property_read_u32(node, "arctic,dim-freq", &prog_val);
> +	if (ret)
> +		ret = of_property_read_u32(node, "arc,dim-freq", &prog_val);
> +
>   	if (ret == 0)
>   		lp->pdata->dim_freq = (u8)prog_val;
>   
> -	ret = of_property_read_u32(node, "arc,comp-config", &prog_val);
> +	ret = of_property_read_u32(node, "arctic,comp-config", &prog_val);
> +	if (ret)
> +		ret = of_property_read_u32(node, "arc,comp-config", &prog_val);
> +
>   	if (ret == 0)
>   		lp->pdata->comp_config = (u8)prog_val;
>   
> -	ret = of_property_read_u32(node, "arc,filter-config", &prog_val);
> +	ret = of_property_read_u32(node, "arctic,filter-config", &prog_val);
> +	if (ret)
> +		ret = of_property_read_u32(node,
> +				"arc,filter-config", &prog_val);
> +
>   	if (ret == 0)
>   		lp->pdata->filter_config = (u8)prog_val;
>   
> -	ret = of_property_read_u32(node, "arc,trim-config", &prog_val);
> +	ret = of_property_read_u32(node, "arctic,trim-config", &prog_val);
> +	if (ret)
> +		ret = of_property_read_u32(node, "arc,trim-config", &prog_val);
> +
>   	if (ret == 0)
>   		lp->pdata->trim_config = (u8)prog_val;
>   
> @@ -381,6 +400,8 @@ static int arcxcnn_remove(struct i2c_client *cl)
>   }
>   
>   static const struct of_device_id arcxcnn_dt_ids[] = {
> +	{ .compatible = "arctic,arc2c0608" },
> +	/* here to remain compatible with an older binding, do not use */
>   	{ .compatible = "arc,arc2c0608" },
>   	{ }
>   };
> @@ -404,5 +425,5 @@ static struct i2c_driver arcxcnn_driver = {
>   module_i2c_driver(arcxcnn_driver);
>   
>   MODULE_LICENSE("GPL v2");
> -MODULE_AUTHOR("Brian Dodge <bdodge@arcticsand.com>");
> +MODULE_AUTHOR("Brian Dodge <bdodge@psemi.com>");
>   MODULE_DESCRIPTION("ARCXCNN Backlight driver");
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 2/2] backlight: arcxcnn: add "arctic" vendor prefix
  2019-07-08 18:05   ` Dan Murphy
@ 2019-07-08 18:05     ` Dan Murphy
  2019-07-08 19:05     ` Brian Dodge
  1 sibling, 0 replies; 19+ messages in thread
From: Dan Murphy @ 2019-07-08 18:05 UTC (permalink / raw)
  To: Brian Dodge, pavel
  Cc: daniel.thompson, lee.jones, jingoohan1, jacek.anaszewski,
	robh+dt, dri-devel, linux-leds, devicetree, pbacon

Brian

On 6/30/19 7:28 PM, Brian Dodge wrote:
> The original patch adding this driver and DT bindings improperly
> used "arc" as the vendor-prefix. This adds "arctic" which is the
> proper prefix and retains "arc" to allow existing users of the
> "arc" prefix to update to new kernels. There is at least one
> (Samsung Chromebook Plus)
>
> Signed-off-by: Brian Dodge <bdodge09@gmail.com>
> Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
> ---
>   drivers/video/backlight/arcxcnn_bl.c | 41 +++++++++++++++++++++++++++---------
>   1 file changed, 31 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/video/backlight/arcxcnn_bl.c b/drivers/video/backlight/arcxcnn_bl.c
> index 7b1c0a0..a419554 100644
> --- a/drivers/video/backlight/arcxcnn_bl.c
> +++ b/drivers/video/backlight/arcxcnn_bl.c
> @@ -1,9 +1,9 @@
>   // SPDX-License-Identifier: GPL-2.0-only
>   /*
> - * Backlight driver for ArcticSand ARC_X_C_0N_0N Devices
> + * Backlight driver for pSemi (formerly ArcticSand) ARC_X_C_0N_0N Devices
>    *
> - * Copyright 2016 ArcticSand, Inc.
> - * Author : Brian Dodge <bdodge@arcticsand.com>

I know you are the original author from ArcticSand but did pSemi 
actually own the copyright in 2016?

I don't think this is a big issue just wondering if we should retain the 
ArcticSand copyright as well.

Probably a question for your legal department.

Otherwise

Reviewed-by: Dan Murphy <dmurphy@ti.com>

> + * Copyright 2016-2019  pSemi, Inc.
> + * Author : Brian Dodge <bdodge@psemi.com>
>    */
>   
>   #include <linux/backlight.h>
> @@ -191,27 +191,46 @@ static void arcxcnn_parse_dt(struct arcxcnn *lp)
>   	if (ret == 0)
>   		lp->pdata->initial_brightness = prog_val;
>   
> -	ret = of_property_read_u32(node, "arc,led-config-0", &prog_val);
> +	ret = of_property_read_u32(node, "arctic,led-config-0", &prog_val);
> +	if (ret)
> +		ret = of_property_read_u32(node, "arc,led-config-0", &prog_val);
> +
>   	if (ret == 0)
>   		lp->pdata->led_config_0 = (u8)prog_val;
>   
> -	ret = of_property_read_u32(node, "arc,led-config-1", &prog_val);
> +	ret = of_property_read_u32(node, "arctic,led-config-1", &prog_val);
> +	if (ret)
> +		ret = of_property_read_u32(node, "arc,led-config-1", &prog_val);
> +
>   	if (ret == 0)
>   		lp->pdata->led_config_1 = (u8)prog_val;
>   
> -	ret = of_property_read_u32(node, "arc,dim-freq", &prog_val);
> +	ret = of_property_read_u32(node, "arctic,dim-freq", &prog_val);
> +	if (ret)
> +		ret = of_property_read_u32(node, "arc,dim-freq", &prog_val);
> +
>   	if (ret == 0)
>   		lp->pdata->dim_freq = (u8)prog_val;
>   
> -	ret = of_property_read_u32(node, "arc,comp-config", &prog_val);
> +	ret = of_property_read_u32(node, "arctic,comp-config", &prog_val);
> +	if (ret)
> +		ret = of_property_read_u32(node, "arc,comp-config", &prog_val);
> +
>   	if (ret == 0)
>   		lp->pdata->comp_config = (u8)prog_val;
>   
> -	ret = of_property_read_u32(node, "arc,filter-config", &prog_val);
> +	ret = of_property_read_u32(node, "arctic,filter-config", &prog_val);
> +	if (ret)
> +		ret = of_property_read_u32(node,
> +				"arc,filter-config", &prog_val);
> +
>   	if (ret == 0)
>   		lp->pdata->filter_config = (u8)prog_val;
>   
> -	ret = of_property_read_u32(node, "arc,trim-config", &prog_val);
> +	ret = of_property_read_u32(node, "arctic,trim-config", &prog_val);
> +	if (ret)
> +		ret = of_property_read_u32(node, "arc,trim-config", &prog_val);
> +
>   	if (ret == 0)
>   		lp->pdata->trim_config = (u8)prog_val;
>   
> @@ -381,6 +400,8 @@ static int arcxcnn_remove(struct i2c_client *cl)
>   }
>   
>   static const struct of_device_id arcxcnn_dt_ids[] = {
> +	{ .compatible = "arctic,arc2c0608" },
> +	/* here to remain compatible with an older binding, do not use */
>   	{ .compatible = "arc,arc2c0608" },
>   	{ }
>   };
> @@ -404,5 +425,5 @@ static struct i2c_driver arcxcnn_driver = {
>   module_i2c_driver(arcxcnn_driver);
>   
>   MODULE_LICENSE("GPL v2");
> -MODULE_AUTHOR("Brian Dodge <bdodge@arcticsand.com>");
> +MODULE_AUTHOR("Brian Dodge <bdodge@psemi.com>");
>   MODULE_DESCRIPTION("ARCXCNN Backlight driver");

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

* Re: [PATCH 2/2] backlight: arcxcnn: add "arctic" vendor prefix
  2019-07-08 18:05   ` Dan Murphy
  2019-07-08 18:05     ` Dan Murphy
@ 2019-07-08 19:05     ` Brian Dodge
  1 sibling, 0 replies; 19+ messages in thread
From: Brian Dodge @ 2019-07-08 19:05 UTC (permalink / raw)
  To: Dan Murphy
  Cc: devicetree, Daniel Thompson, jingoohan1, dri-devel, robh+dt,
	jacek.anaszewski, Pavel Machek, pbacon, lee.jones, linux-leds


[-- Attachment #1.1: Type: text/plain, Size: 4774 bytes --]

Thanks. pSemi purchased ArcticSand a few years ago so they are the same
legal entity. I will ask them if they want to retain the original copyright
notice

On Mon, Jul 8, 2019, 2:05 PM Dan Murphy <dmurphy@ti.com> wrote:

> Brian
>
> On 6/30/19 7:28 PM, Brian Dodge wrote:
> > The original patch adding this driver and DT bindings improperly
> > used "arc" as the vendor-prefix. This adds "arctic" which is the
> > proper prefix and retains "arc" to allow existing users of the
> > "arc" prefix to update to new kernels. There is at least one
> > (Samsung Chromebook Plus)
> >
> > Signed-off-by: Brian Dodge <bdodge09@gmail.com>
> > Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
> > ---
> >   drivers/video/backlight/arcxcnn_bl.c | 41
> +++++++++++++++++++++++++++---------
> >   1 file changed, 31 insertions(+), 10 deletions(-)
> >
> > diff --git a/drivers/video/backlight/arcxcnn_bl.c
> b/drivers/video/backlight/arcxcnn_bl.c
> > index 7b1c0a0..a419554 100644
> > --- a/drivers/video/backlight/arcxcnn_bl.c
> > +++ b/drivers/video/backlight/arcxcnn_bl.c
> > @@ -1,9 +1,9 @@
> >   // SPDX-License-Identifier: GPL-2.0-only
> >   /*
> > - * Backlight driver for ArcticSand ARC_X_C_0N_0N Devices
> > + * Backlight driver for pSemi (formerly ArcticSand) ARC_X_C_0N_0N
> Devices
> >    *
> > - * Copyright 2016 ArcticSand, Inc.
> > - * Author : Brian Dodge <bdodge@arcticsand.com>
>
> I know you are the original author from ArcticSand but did pSemi
> actually own the copyright in 2016?
>
> I don't think this is a big issue just wondering if we should retain the
> ArcticSand copyright as well.
>
> Probably a question for your legal department.
>
> Otherwise
>
> Reviewed-by: Dan Murphy <dmurphy@ti.com>
>
> > + * Copyright 2016-2019  pSemi, Inc.
> > + * Author : Brian Dodge <bdodge@psemi.com>
> >    */
> >
> >   #include <linux/backlight.h>
> > @@ -191,27 +191,46 @@ static void arcxcnn_parse_dt(struct arcxcnn *lp)
> >       if (ret == 0)
> >               lp->pdata->initial_brightness = prog_val;
> >
> > -     ret = of_property_read_u32(node, "arc,led-config-0", &prog_val);
> > +     ret = of_property_read_u32(node, "arctic,led-config-0", &prog_val);
> > +     if (ret)
> > +             ret = of_property_read_u32(node, "arc,led-config-0",
> &prog_val);
> > +
> >       if (ret == 0)
> >               lp->pdata->led_config_0 = (u8)prog_val;
> >
> > -     ret = of_property_read_u32(node, "arc,led-config-1", &prog_val);
> > +     ret = of_property_read_u32(node, "arctic,led-config-1", &prog_val);
> > +     if (ret)
> > +             ret = of_property_read_u32(node, "arc,led-config-1",
> &prog_val);
> > +
> >       if (ret == 0)
> >               lp->pdata->led_config_1 = (u8)prog_val;
> >
> > -     ret = of_property_read_u32(node, "arc,dim-freq", &prog_val);
> > +     ret = of_property_read_u32(node, "arctic,dim-freq", &prog_val);
> > +     if (ret)
> > +             ret = of_property_read_u32(node, "arc,dim-freq",
> &prog_val);
> > +
> >       if (ret == 0)
> >               lp->pdata->dim_freq = (u8)prog_val;
> >
> > -     ret = of_property_read_u32(node, "arc,comp-config", &prog_val);
> > +     ret = of_property_read_u32(node, "arctic,comp-config", &prog_val);
> > +     if (ret)
> > +             ret = of_property_read_u32(node, "arc,comp-config",
> &prog_val);
> > +
> >       if (ret == 0)
> >               lp->pdata->comp_config = (u8)prog_val;
> >
> > -     ret = of_property_read_u32(node, "arc,filter-config", &prog_val);
> > +     ret = of_property_read_u32(node, "arctic,filter-config",
> &prog_val);
> > +     if (ret)
> > +             ret = of_property_read_u32(node,
> > +                             "arc,filter-config", &prog_val);
> > +
> >       if (ret == 0)
> >               lp->pdata->filter_config = (u8)prog_val;
> >
> > -     ret = of_property_read_u32(node, "arc,trim-config", &prog_val);
> > +     ret = of_property_read_u32(node, "arctic,trim-config", &prog_val);
> > +     if (ret)
> > +             ret = of_property_read_u32(node, "arc,trim-config",
> &prog_val);
> > +
> >       if (ret == 0)
> >               lp->pdata->trim_config = (u8)prog_val;
> >
> > @@ -381,6 +400,8 @@ static int arcxcnn_remove(struct i2c_client *cl)
> >   }
> >
> >   static const struct of_device_id arcxcnn_dt_ids[] = {
> > +     { .compatible = "arctic,arc2c0608" },
> > +     /* here to remain compatible with an older binding, do not use */
> >       { .compatible = "arc,arc2c0608" },
> >       { }
> >   };
> > @@ -404,5 +425,5 @@ static struct i2c_driver arcxcnn_driver = {
> >   module_i2c_driver(arcxcnn_driver);
> >
> >   MODULE_LICENSE("GPL v2");
> > -MODULE_AUTHOR("Brian Dodge <bdodge@arcticsand.com>");
> > +MODULE_AUTHOR("Brian Dodge <bdodge@psemi.com>");
> >   MODULE_DESCRIPTION("ARCXCNN Backlight driver");
>

[-- Attachment #1.2: Type: text/html, Size: 6905 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 1/2] dt-bindings: backlight: fix vendor prefix for ArcticSand arcxcnn driver bindings
  2019-07-08 18:02   ` Dan Murphy
  2019-07-08 18:02     ` Dan Murphy
@ 2019-07-09 17:48     ` Brian Dodge
  2019-07-09 18:01       ` Dan Murphy
  1 sibling, 1 reply; 19+ messages in thread
From: Brian Dodge @ 2019-07-09 17:48 UTC (permalink / raw)
  To: Dan Murphy
  Cc: devicetree, Daniel Thompson, jingoohan1, dri-devel, robh+dt,
	jacek.anaszewski, Pavel Machek, Peter Bacon, Lee Jones,
	linux-leds


[-- Attachment #1.1: Type: text/plain, Size: 3473 bytes --]

FYI: please note that pSemi's legal department has informed me that they do
*not* want to keep the "ArcticSand" copyright notices and the single pSemi
line is appropriate.

On Mon, Jul 8, 2019 at 2:02 PM Dan Murphy <dmurphy@ti.com> wrote:

> Brian
>
> On 6/30/19 7:28 PM, Brian Dodge wrote:
> > The vendor-prefixes.txt file properly refers to ArcticSand
> > as arctic but the driver bindings improperly abbreviated the
> > prefix to arc. This was a mistake in the original patch. This
> > patch adds "arctic" and retains "arc" (deprecated) bindings
> >
> > Signed-off-by: Brian Dodge <bdodge09@gmail.com>
> > ---
> >   .../bindings/leds/backlight/arcxcnn_bl.txt         | 31
> +++++++++++++++-------
> >   1 file changed, 21 insertions(+), 10 deletions(-)
> >
> > diff --git
> a/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt
> b/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt
> > index 230abde..4d98394 100644
> > --- a/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt
> > +++ b/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt
> > @@ -1,8 +1,13 @@
> > -Binding for ArcticSand arc2c0608 LED driver
> > +Binding for ArcticSand arc family LED drivers
> >
> >   Required properties:
> > -- compatible:                should be "arc,arc2c0608"
> > -- reg:                       slave address
> > +- compatible: one of
> > +     "arctic,arc1c0608"
> > +     "arctic,arc2c0608"
> > +     "arctic,arc3c0845"
> > +     "arc,arc2c0608" (deprecated)
> > +
> > +- reg:               slave address
> >
> >   Optional properties:
> >   - default-brightness:       brightness value on boot, value from:
> 0-4095
> > @@ -11,19 +16,25 @@ Optional properties:
> >   - led-sources:              List of enabled channels from 0 to 5.
> >                       See
> Documentation/devicetree/bindings/leds/common.txt
> >
> > -- arc,led-config-0:  setting for register ILED_CONFIG_0
> > -- arc,led-config-1:  setting for register ILED_CONFIG_1
> > -- arc,dim-freq:              PWM mode frequence setting (bits [3:0]
> used)
> > -- arc,comp-config:   setting for register CONFIG_COMP
> > -- arc,filter-config: setting for register FILTER_CONFIG
> > -- arc,trim-config:   setting for register IMAXTUNE
> > +- arctic,led-config-0:       setting for register ILED_CONFIG_0
> > +- arctic,led-config-1:       setting for register ILED_CONFIG_1
> > +- arctic,dim-freq:   PWM mode frequence setting (bits [3:0] used)
> > +- arctic,comp-config:        setting for register CONFIG_COMP
> > +- arctic,filter-config:      setting for register FILTER_CONFIG
> > +- arctic,trim-config:        setting for register IMAXTUNE
> > +- arc,led-config-0:  setting for register ILED_CONFIG_0 (deprecated)
> > +- arc,led-config-1:  setting for register ILED_CONFIG_1 (deprecated)
> > +- arc,dim-freq:              PWM mode frequence setting (bits [3:0]
> used) (deprecated)
> > +- arc,comp-config:   setting for register CONFIG_COMP (deprecated)
> > +- arc,filter-config: setting for register FILTER_CONFIG (deprecated)
> > +- arc,trim-config:   setting for register IMAXTUNE (deprecated)
> >
> >   Note: Optional properties not specified will default to values in IC
> EPROM
> >
> >   Example:
> >
> >   arc2c0608@30 {
> > -     compatible = "arc,arc2c0608";
> > +     compatible = "arctic,arc2c0608";
> >       reg = <0x30>;
> >       default-brightness = <500>;
> >       label = "lcd-backlight";
>
>
> Reviewed-by: Dan Murphy <dmurphy@ti.com>
>
>

[-- Attachment #1.2: Type: text/html, Size: 4583 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 1/2] dt-bindings: backlight: fix vendor prefix for ArcticSand arcxcnn driver bindings
  2019-07-09 17:48     ` Brian Dodge
@ 2019-07-09 18:01       ` Dan Murphy
  0 siblings, 0 replies; 19+ messages in thread
From: Dan Murphy @ 2019-07-09 18:01 UTC (permalink / raw)
  To: Brian Dodge
  Cc: devicetree, Daniel Thompson, jingoohan1, dri-devel, robh+dt,
	jacek.anaszewski, Pavel Machek, Peter Bacon, Lee Jones,
	linux-leds


[-- Attachment #1.1: Type: text/plain, Size: 4165 bytes --]

Brian

On 7/9/19 12:48 PM, Brian Dodge wrote:
> FYI: please note that pSemi's legal department has informed me that 
> they do *not* want to keep the "ArcticSand" copyright notices and the 
> single pSemi line is appropriate.
>
Thanks for the follow up.  Lawyers can be fickle about this stuff.


> On Mon, Jul 8, 2019 at 2:02 PM Dan Murphy <dmurphy@ti.com 
> <mailto:dmurphy@ti.com>> wrote:
>
>     Brian
>
>     On 6/30/19 7:28 PM, Brian Dodge wrote:
>     > The vendor-prefixes.txt file properly refers to ArcticSand
>     > as arctic but the driver bindings improperly abbreviated the
>     > prefix to arc. This was a mistake in the original patch. This
>     > patch adds "arctic" and retains "arc" (deprecated) bindings
>     >
>     > Signed-off-by: Brian Dodge <bdodge09@gmail.com
>     <mailto:bdodge09@gmail.com>>
>     > ---
>     >   .../bindings/leds/backlight/arcxcnn_bl.txt         | 31
>     +++++++++++++++-------
>     >   1 file changed, 21 insertions(+), 10 deletions(-)
>     >
>     > diff --git
>     a/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt
>     b/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt
>     > index 230abde..4d98394 100644
>     > ---
>     a/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt
>     > +++
>     b/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt
>     > @@ -1,8 +1,13 @@
>     > -Binding for ArcticSand arc2c0608 LED driver
>     > +Binding for ArcticSand arc family LED drivers
>     >
>     >   Required properties:
>     > -- compatible:                should be "arc,arc2c0608"
>     > -- reg:                       slave address
>     > +- compatible: one of
>     > +     "arctic,arc1c0608"
>     > +     "arctic,arc2c0608"
>     > +     "arctic,arc3c0845"
>     > +     "arc,arc2c0608" (deprecated)
>     > +
>     > +- reg:               slave address
>     >
>     >   Optional properties:
>     >   - default-brightness:       brightness value on boot, value
>     from: 0-4095
>     > @@ -11,19 +16,25 @@ Optional properties:
>     >   - led-sources:              List of enabled channels from 0 to 5.
>     >                       See
>     Documentation/devicetree/bindings/leds/common.txt
>     >
>     > -- arc,led-config-0:  setting for register ILED_CONFIG_0
>     > -- arc,led-config-1:  setting for register ILED_CONFIG_1
>     > -- arc,dim-freq:              PWM mode frequence setting (bits
>     [3:0] used)
>     > -- arc,comp-config:   setting for register CONFIG_COMP
>     > -- arc,filter-config: setting for register FILTER_CONFIG
>     > -- arc,trim-config:   setting for register IMAXTUNE
>     > +- arctic,led-config-0:       setting for register ILED_CONFIG_0
>     > +- arctic,led-config-1:       setting for register ILED_CONFIG_1
>     > +- arctic,dim-freq:   PWM mode frequence setting (bits [3:0] used)
>     > +- arctic,comp-config:        setting for register CONFIG_COMP
>     > +- arctic,filter-config:      setting for register FILTER_CONFIG
>     > +- arctic,trim-config:        setting for register IMAXTUNE
>     > +- arc,led-config-0:  setting for register ILED_CONFIG_0
>     (deprecated)
>     > +- arc,led-config-1:  setting for register ILED_CONFIG_1
>     (deprecated)
>     > +- arc,dim-freq:              PWM mode frequence setting (bits
>     [3:0] used) (deprecated)
>     > +- arc,comp-config:   setting for register CONFIG_COMP (deprecated)
>     > +- arc,filter-config: setting for register FILTER_CONFIG
>     (deprecated)
>     > +- arc,trim-config:   setting for register IMAXTUNE (deprecated)
>     >
>     >   Note: Optional properties not specified will default to values
>     in IC EPROM
>     >
>     >   Example:
>     >
>     >   arc2c0608@30 {
>     > -     compatible = "arc,arc2c0608";
>     > +     compatible = "arctic,arc2c0608";
>     >       reg = <0x30>;
>     >       default-brightness = <500>;
>     >       label = "lcd-backlight";
>
>
>     Reviewed-by: Dan Murphy <dmurphy@ti.com <mailto:dmurphy@ti.com>>
>

[-- Attachment #1.2: Type: text/html, Size: 6272 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 2/2] backlight: arcxcnn: add "arctic" vendor prefix
  2019-06-26 11:42   ` Dan Murphy
@ 2019-06-26 11:45     ` Dan Murphy
  0 siblings, 0 replies; 19+ messages in thread
From: Dan Murphy @ 2019-06-26 11:45 UTC (permalink / raw)
  To: Brian Dodge, pavel
  Cc: devicetree, daniel.thompson, jingoohan1, dri-devel, robh+dt,
	jacek.anaszewski, pbacon, lee.jones, linux-leds

Hello

One other thing

On 6/26/19 6:42 AM, Dan Murphy wrote:
> Hello
>
> On 6/24/19 11:05 PM, Brian Dodge wrote:
>> The original patch adding this driver and DT bindings improperly
>> used "arc" as the vendor-prefix. This adds "arctic" which is the
>> proper prefix and retains "arc" to allow existing users of the
>> "arc" prefix to update to new kernels. There is at least one
>> (Samsung Chromebook Plus)
>>
>> Signed-off-by: Brian Dodge <bdodge09@gmail.com>
>> ---
>>   drivers/video/backlight/arcxcnn_bl.c | 35 
>> +++++++++++++++++++++++++----------
>>   1 file changed, 25 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/video/backlight/arcxcnn_bl.c 
>> b/drivers/video/backlight/arcxcnn_bl.c
>> index 7b1c0a0..14c67f2 100644
>> --- a/drivers/video/backlight/arcxcnn_bl.c
>> +++ b/drivers/video/backlight/arcxcnn_bl.c
>> @@ -1,9 +1,9 @@
>>   // SPDX-License-Identifier: GPL-2.0-only
>>   /*
>> - * Backlight driver for ArcticSand ARC_X_C_0N_0N Devices
>> + * Backlight driver for pSemi (formerly ArcticSand) ARC_X_C_0N_0N 
>> Devices
>>    *
>> - * Copyright 2016 ArcticSand, Inc.
>> - * Author : Brian Dodge <bdodge@arcticsand.com>
>> + * Copyright 2016-2019  pSemi, Inc.
>> + * Author : Brian Dodge <bdodge@psemi.com>
>>    */
>>     #include <linux/backlight.h>
>> @@ -191,27 +191,40 @@ static void arcxcnn_parse_dt(struct arcxcnn *lp)
>>       if (ret == 0)
>>           lp->pdata->initial_brightness = prog_val;
>>   -    ret = of_property_read_u32(node, "arc,led-config-0", &prog_val);
>> +    ret = of_property_read_u32(node, "arctic,led-config-0", &prog_val);
>> +    if (ret)
>> +        ret = of_property_read_u32(node, "arc,led-config-0", 
>> &prog_val);
> Can you add new lines between these and all below

Maybe add a dev_info here to indicate that this is being deprecated.

It will make the Chrome book console noisy but at least it won't go silent.

Dan


>>       if (ret == 0)
>>           lp->pdata->led_config_0 = (u8)prog_val;
>>   -    ret = of_property_read_u32(node, "arc,led-config-1", &prog_val);
>> +    ret = of_property_read_u32(node, "arctic,led-config-1", &prog_val);
>> +    if (ret)
>> +        ret = of_property_read_u32(node, "arc,led-config-1", 
>> &prog_val);
>>       if (ret == 0)
>>           lp->pdata->led_config_1 = (u8)prog_val;
>>   -    ret = of_property_read_u32(node, "arc,dim-freq", &prog_val);
>> +    ret = of_property_read_u32(node, "arctic,dim-freq", &prog_val);
>> +    if (ret)
>> +        ret = of_property_read_u32(node, "arc,dim-freq", &prog_val);
>>       if (ret == 0)
>>           lp->pdata->dim_freq = (u8)prog_val;
>>   -    ret = of_property_read_u32(node, "arc,comp-config", &prog_val);
>> +    ret = of_property_read_u32(node, "arctic,comp-config", &prog_val);
>> +    if (ret)
>> +        ret = of_property_read_u32(node, "arc,comp-config", &prog_val);
>>       if (ret == 0)
>>           lp->pdata->comp_config = (u8)prog_val;
>>   -    ret = of_property_read_u32(node, "arc,filter-config", &prog_val);
>> +    ret = of_property_read_u32(node, "arctic,filter-config", 
>> &prog_val);
>> +    if (ret)
>> +        ret = of_property_read_u32(node,
>> +                "arc,filter-config", &prog_val);
>>       if (ret == 0)
>>           lp->pdata->filter_config = (u8)prog_val;
>>   -    ret = of_property_read_u32(node, "arc,trim-config", &prog_val);
>> +    ret = of_property_read_u32(node, "arctic,trim-config", &prog_val);
>> +    if (ret)
>> +        ret = of_property_read_u32(node, "arc,trim-config", &prog_val);
>>       if (ret == 0)
>>           lp->pdata->trim_config = (u8)prog_val;
>>   @@ -381,6 +394,8 @@ static int arcxcnn_remove(struct i2c_client *cl)
>>   }
>>     static const struct of_device_id arcxcnn_dt_ids[] = {
>> +    { .compatible = "arctic,arc2c0608" },
>> +    /* here to remaim compatible with an older binding, do not use */
>
> s/remaim/remain
>
>
>>       { .compatible = "arc,arc2c0608" },
>>       { }
>>   };
>> @@ -404,5 +419,5 @@ static struct i2c_driver arcxcnn_driver = {
>>   module_i2c_driver(arcxcnn_driver);
>>     MODULE_LICENSE("GPL v2");
>> -MODULE_AUTHOR("Brian Dodge <bdodge@arcticsand.com>");
>> +MODULE_AUTHOR("Brian Dodge <bdodge@psemi.com>");
>>   MODULE_DESCRIPTION("ARCXCNN Backlight driver");
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 2/2] backlight: arcxcnn: add "arctic" vendor prefix
  2019-06-25  4:05 ` [PATCH 2/2] backlight: arcxcnn: add "arctic" vendor prefix Brian Dodge
  2019-06-26 10:53   ` Daniel Thompson
@ 2019-06-26 11:42   ` Dan Murphy
  2019-06-26 11:45     ` Dan Murphy
  1 sibling, 1 reply; 19+ messages in thread
From: Dan Murphy @ 2019-06-26 11:42 UTC (permalink / raw)
  To: Brian Dodge, pavel
  Cc: devicetree, daniel.thompson, jingoohan1, dri-devel, robh+dt,
	jacek.anaszewski, pbacon, lee.jones, linux-leds

Hello

On 6/24/19 11:05 PM, Brian Dodge wrote:
> The original patch adding this driver and DT bindings improperly
> used "arc" as the vendor-prefix. This adds "arctic" which is the
> proper prefix and retains "arc" to allow existing users of the
> "arc" prefix to update to new kernels. There is at least one
> (Samsung Chromebook Plus)
>
> Signed-off-by: Brian Dodge <bdodge09@gmail.com>
> ---
>   drivers/video/backlight/arcxcnn_bl.c | 35 +++++++++++++++++++++++++----------
>   1 file changed, 25 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/video/backlight/arcxcnn_bl.c b/drivers/video/backlight/arcxcnn_bl.c
> index 7b1c0a0..14c67f2 100644
> --- a/drivers/video/backlight/arcxcnn_bl.c
> +++ b/drivers/video/backlight/arcxcnn_bl.c
> @@ -1,9 +1,9 @@
>   // SPDX-License-Identifier: GPL-2.0-only
>   /*
> - * Backlight driver for ArcticSand ARC_X_C_0N_0N Devices
> + * Backlight driver for pSemi (formerly ArcticSand) ARC_X_C_0N_0N Devices
>    *
> - * Copyright 2016 ArcticSand, Inc.
> - * Author : Brian Dodge <bdodge@arcticsand.com>
> + * Copyright 2016-2019  pSemi, Inc.
> + * Author : Brian Dodge <bdodge@psemi.com>
>    */
>   
>   #include <linux/backlight.h>
> @@ -191,27 +191,40 @@ static void arcxcnn_parse_dt(struct arcxcnn *lp)
>   	if (ret == 0)
>   		lp->pdata->initial_brightness = prog_val;
>   
> -	ret = of_property_read_u32(node, "arc,led-config-0", &prog_val);
> +	ret = of_property_read_u32(node, "arctic,led-config-0", &prog_val);
> +	if (ret)
> +		ret = of_property_read_u32(node, "arc,led-config-0", &prog_val);
Can you add new lines between these and all below
>   	if (ret == 0)
>   		lp->pdata->led_config_0 = (u8)prog_val;
>   
> -	ret = of_property_read_u32(node, "arc,led-config-1", &prog_val);
> +	ret = of_property_read_u32(node, "arctic,led-config-1", &prog_val);
> +	if (ret)
> +		ret = of_property_read_u32(node, "arc,led-config-1", &prog_val);
>   	if (ret == 0)
>   		lp->pdata->led_config_1 = (u8)prog_val;
>   
> -	ret = of_property_read_u32(node, "arc,dim-freq", &prog_val);
> +	ret = of_property_read_u32(node, "arctic,dim-freq", &prog_val);
> +	if (ret)
> +		ret = of_property_read_u32(node, "arc,dim-freq", &prog_val);
>   	if (ret == 0)
>   		lp->pdata->dim_freq = (u8)prog_val;
>   
> -	ret = of_property_read_u32(node, "arc,comp-config", &prog_val);
> +	ret = of_property_read_u32(node, "arctic,comp-config", &prog_val);
> +	if (ret)
> +		ret = of_property_read_u32(node, "arc,comp-config", &prog_val);
>   	if (ret == 0)
>   		lp->pdata->comp_config = (u8)prog_val;
>   
> -	ret = of_property_read_u32(node, "arc,filter-config", &prog_val);
> +	ret = of_property_read_u32(node, "arctic,filter-config", &prog_val);
> +	if (ret)
> +		ret = of_property_read_u32(node,
> +				"arc,filter-config", &prog_val);
>   	if (ret == 0)
>   		lp->pdata->filter_config = (u8)prog_val;
>   
> -	ret = of_property_read_u32(node, "arc,trim-config", &prog_val);
> +	ret = of_property_read_u32(node, "arctic,trim-config", &prog_val);
> +	if (ret)
> +		ret = of_property_read_u32(node, "arc,trim-config", &prog_val);
>   	if (ret == 0)
>   		lp->pdata->trim_config = (u8)prog_val;
>   
> @@ -381,6 +394,8 @@ static int arcxcnn_remove(struct i2c_client *cl)
>   }
>   
>   static const struct of_device_id arcxcnn_dt_ids[] = {
> +	{ .compatible = "arctic,arc2c0608" },
> +	/* here to remaim compatible with an older binding, do not use */

s/remaim/remain


>   	{ .compatible = "arc,arc2c0608" },
>   	{ }
>   };
> @@ -404,5 +419,5 @@ static struct i2c_driver arcxcnn_driver = {
>   module_i2c_driver(arcxcnn_driver);
>   
>   MODULE_LICENSE("GPL v2");
> -MODULE_AUTHOR("Brian Dodge <bdodge@arcticsand.com>");
> +MODULE_AUTHOR("Brian Dodge <bdodge@psemi.com>");
>   MODULE_DESCRIPTION("ARCXCNN Backlight driver");
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 2/2] backlight: arcxcnn: add "arctic" vendor prefix
  2019-06-25  4:05 ` [PATCH 2/2] backlight: arcxcnn: add "arctic" vendor prefix Brian Dodge
@ 2019-06-26 10:53   ` Daniel Thompson
  2019-06-26 11:42   ` Dan Murphy
  1 sibling, 0 replies; 19+ messages in thread
From: Daniel Thompson @ 2019-06-26 10:53 UTC (permalink / raw)
  To: Brian Dodge
  Cc: devicetree, jingoohan1, dri-devel, robh+dt, jacek.anaszewski,
	pavel, pbacon, lee.jones, linux-leds

On Tue, Jun 25, 2019 at 12:05:29AM -0400, Brian Dodge wrote:
> The original patch adding this driver and DT bindings improperly
> used "arc" as the vendor-prefix. This adds "arctic" which is the
> proper prefix and retains "arc" to allow existing users of the
> "arc" prefix to update to new kernels. There is at least one
> (Samsung Chromebook Plus)
> 
> Signed-off-by: Brian Dodge <bdodge09@gmail.com>

Still needs consensus on the DT bindings but for any future resends
please add this (to this patch only):

Acked-by: Daniel Thompson <daniel.thompson@linaro.org>


Daniel.
> ---
>  drivers/video/backlight/arcxcnn_bl.c | 35 +++++++++++++++++++++++++----------
>  1 file changed, 25 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/video/backlight/arcxcnn_bl.c b/drivers/video/backlight/arcxcnn_bl.c
> index 7b1c0a0..14c67f2 100644
> --- a/drivers/video/backlight/arcxcnn_bl.c
> +++ b/drivers/video/backlight/arcxcnn_bl.c
> @@ -1,9 +1,9 @@
>  // SPDX-License-Identifier: GPL-2.0-only
>  /*
> - * Backlight driver for ArcticSand ARC_X_C_0N_0N Devices
> + * Backlight driver for pSemi (formerly ArcticSand) ARC_X_C_0N_0N Devices
>   *
> - * Copyright 2016 ArcticSand, Inc.
> - * Author : Brian Dodge <bdodge@arcticsand.com>
> + * Copyright 2016-2019  pSemi, Inc.
> + * Author : Brian Dodge <bdodge@psemi.com>
>   */
>  
>  #include <linux/backlight.h>
> @@ -191,27 +191,40 @@ static void arcxcnn_parse_dt(struct arcxcnn *lp)
>  	if (ret == 0)
>  		lp->pdata->initial_brightness = prog_val;
>  
> -	ret = of_property_read_u32(node, "arc,led-config-0", &prog_val);
> +	ret = of_property_read_u32(node, "arctic,led-config-0", &prog_val);
> +	if (ret)
> +		ret = of_property_read_u32(node, "arc,led-config-0", &prog_val);
>  	if (ret == 0)
>  		lp->pdata->led_config_0 = (u8)prog_val;
>  
> -	ret = of_property_read_u32(node, "arc,led-config-1", &prog_val);
> +	ret = of_property_read_u32(node, "arctic,led-config-1", &prog_val);
> +	if (ret)
> +		ret = of_property_read_u32(node, "arc,led-config-1", &prog_val);
>  	if (ret == 0)
>  		lp->pdata->led_config_1 = (u8)prog_val;
>  
> -	ret = of_property_read_u32(node, "arc,dim-freq", &prog_val);
> +	ret = of_property_read_u32(node, "arctic,dim-freq", &prog_val);
> +	if (ret)
> +		ret = of_property_read_u32(node, "arc,dim-freq", &prog_val);
>  	if (ret == 0)
>  		lp->pdata->dim_freq = (u8)prog_val;
>  
> -	ret = of_property_read_u32(node, "arc,comp-config", &prog_val);
> +	ret = of_property_read_u32(node, "arctic,comp-config", &prog_val);
> +	if (ret)
> +		ret = of_property_read_u32(node, "arc,comp-config", &prog_val);
>  	if (ret == 0)
>  		lp->pdata->comp_config = (u8)prog_val;
>  
> -	ret = of_property_read_u32(node, "arc,filter-config", &prog_val);
> +	ret = of_property_read_u32(node, "arctic,filter-config", &prog_val);
> +	if (ret)
> +		ret = of_property_read_u32(node,
> +				"arc,filter-config", &prog_val);
>  	if (ret == 0)
>  		lp->pdata->filter_config = (u8)prog_val;
>  
> -	ret = of_property_read_u32(node, "arc,trim-config", &prog_val);
> +	ret = of_property_read_u32(node, "arctic,trim-config", &prog_val);
> +	if (ret)
> +		ret = of_property_read_u32(node, "arc,trim-config", &prog_val);
>  	if (ret == 0)
>  		lp->pdata->trim_config = (u8)prog_val;
>  
> @@ -381,6 +394,8 @@ static int arcxcnn_remove(struct i2c_client *cl)
>  }
>  
>  static const struct of_device_id arcxcnn_dt_ids[] = {
> +	{ .compatible = "arctic,arc2c0608" },
> +	/* here to remaim compatible with an older binding, do not use */
>  	{ .compatible = "arc,arc2c0608" },
>  	{ }
>  };
> @@ -404,5 +419,5 @@ static struct i2c_driver arcxcnn_driver = {
>  module_i2c_driver(arcxcnn_driver);
>  
>  MODULE_LICENSE("GPL v2");
> -MODULE_AUTHOR("Brian Dodge <bdodge@arcticsand.com>");
> +MODULE_AUTHOR("Brian Dodge <bdodge@psemi.com>");
>  MODULE_DESCRIPTION("ARCXCNN Backlight driver");
> -- 
> 2.7.4
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 2/2] backlight: arcxcnn: add "arctic" vendor prefix
  2019-06-25  4:05 [PATCH 0/2] fix vendor prefix for arcxcnn driver and bindings Brian Dodge
@ 2019-06-25  4:05 ` Brian Dodge
  2019-06-26 10:53   ` Daniel Thompson
  2019-06-26 11:42   ` Dan Murphy
  0 siblings, 2 replies; 19+ messages in thread
From: Brian Dodge @ 2019-06-25  4:05 UTC (permalink / raw)
  To: pavel
  Cc: devicetree, daniel.thompson, Brian Dodge, jingoohan1, dri-devel,
	robh+dt, jacek.anaszewski, pbacon, lee.jones, linux-leds

The original patch adding this driver and DT bindings improperly
used "arc" as the vendor-prefix. This adds "arctic" which is the
proper prefix and retains "arc" to allow existing users of the
"arc" prefix to update to new kernels. There is at least one
(Samsung Chromebook Plus)

Signed-off-by: Brian Dodge <bdodge09@gmail.com>
---
 drivers/video/backlight/arcxcnn_bl.c | 35 +++++++++++++++++++++++++----------
 1 file changed, 25 insertions(+), 10 deletions(-)

diff --git a/drivers/video/backlight/arcxcnn_bl.c b/drivers/video/backlight/arcxcnn_bl.c
index 7b1c0a0..14c67f2 100644
--- a/drivers/video/backlight/arcxcnn_bl.c
+++ b/drivers/video/backlight/arcxcnn_bl.c
@@ -1,9 +1,9 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
- * Backlight driver for ArcticSand ARC_X_C_0N_0N Devices
+ * Backlight driver for pSemi (formerly ArcticSand) ARC_X_C_0N_0N Devices
  *
- * Copyright 2016 ArcticSand, Inc.
- * Author : Brian Dodge <bdodge@arcticsand.com>
+ * Copyright 2016-2019  pSemi, Inc.
+ * Author : Brian Dodge <bdodge@psemi.com>
  */
 
 #include <linux/backlight.h>
@@ -191,27 +191,40 @@ static void arcxcnn_parse_dt(struct arcxcnn *lp)
 	if (ret == 0)
 		lp->pdata->initial_brightness = prog_val;
 
-	ret = of_property_read_u32(node, "arc,led-config-0", &prog_val);
+	ret = of_property_read_u32(node, "arctic,led-config-0", &prog_val);
+	if (ret)
+		ret = of_property_read_u32(node, "arc,led-config-0", &prog_val);
 	if (ret == 0)
 		lp->pdata->led_config_0 = (u8)prog_val;
 
-	ret = of_property_read_u32(node, "arc,led-config-1", &prog_val);
+	ret = of_property_read_u32(node, "arctic,led-config-1", &prog_val);
+	if (ret)
+		ret = of_property_read_u32(node, "arc,led-config-1", &prog_val);
 	if (ret == 0)
 		lp->pdata->led_config_1 = (u8)prog_val;
 
-	ret = of_property_read_u32(node, "arc,dim-freq", &prog_val);
+	ret = of_property_read_u32(node, "arctic,dim-freq", &prog_val);
+	if (ret)
+		ret = of_property_read_u32(node, "arc,dim-freq", &prog_val);
 	if (ret == 0)
 		lp->pdata->dim_freq = (u8)prog_val;
 
-	ret = of_property_read_u32(node, "arc,comp-config", &prog_val);
+	ret = of_property_read_u32(node, "arctic,comp-config", &prog_val);
+	if (ret)
+		ret = of_property_read_u32(node, "arc,comp-config", &prog_val);
 	if (ret == 0)
 		lp->pdata->comp_config = (u8)prog_val;
 
-	ret = of_property_read_u32(node, "arc,filter-config", &prog_val);
+	ret = of_property_read_u32(node, "arctic,filter-config", &prog_val);
+	if (ret)
+		ret = of_property_read_u32(node,
+				"arc,filter-config", &prog_val);
 	if (ret == 0)
 		lp->pdata->filter_config = (u8)prog_val;
 
-	ret = of_property_read_u32(node, "arc,trim-config", &prog_val);
+	ret = of_property_read_u32(node, "arctic,trim-config", &prog_val);
+	if (ret)
+		ret = of_property_read_u32(node, "arc,trim-config", &prog_val);
 	if (ret == 0)
 		lp->pdata->trim_config = (u8)prog_val;
 
@@ -381,6 +394,8 @@ static int arcxcnn_remove(struct i2c_client *cl)
 }
 
 static const struct of_device_id arcxcnn_dt_ids[] = {
+	{ .compatible = "arctic,arc2c0608" },
+	/* here to remaim compatible with an older binding, do not use */
 	{ .compatible = "arc,arc2c0608" },
 	{ }
 };
@@ -404,5 +419,5 @@ static struct i2c_driver arcxcnn_driver = {
 module_i2c_driver(arcxcnn_driver);
 
 MODULE_LICENSE("GPL v2");
-MODULE_AUTHOR("Brian Dodge <bdodge@arcticsand.com>");
+MODULE_AUTHOR("Brian Dodge <bdodge@psemi.com>");
 MODULE_DESCRIPTION("ARCXCNN Backlight driver");
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2019-07-09 18:01 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-01  0:28 [PATCH v2 0/2] fix vendor prefix for arcxcnn driver and bindings Brian Dodge
2019-07-01  0:28 ` [PATCH 1/2] dt-bindings: backlight: fix vendor prefix for ArcticSand arcxcnn driver bindings Brian Dodge
2019-07-02  9:26   ` Daniel Thompson
2019-07-02 11:21     ` Brian Dodge
2019-07-02 13:11       ` Daniel Thompson
2019-07-08 18:02   ` Dan Murphy
2019-07-08 18:02     ` Dan Murphy
2019-07-09 17:48     ` Brian Dodge
2019-07-09 18:01       ` Dan Murphy
2019-07-01  0:28 ` [PATCH 2/2] backlight: arcxcnn: add "arctic" vendor prefix Brian Dodge
2019-07-05  9:37   ` Pavel Machek
2019-07-05  9:37     ` Pavel Machek
2019-07-08 18:05   ` Dan Murphy
2019-07-08 18:05     ` Dan Murphy
2019-07-08 19:05     ` Brian Dodge
  -- strict thread matches above, loose matches on Subject: below --
2019-06-25  4:05 [PATCH 0/2] fix vendor prefix for arcxcnn driver and bindings Brian Dodge
2019-06-25  4:05 ` [PATCH 2/2] backlight: arcxcnn: add "arctic" vendor prefix Brian Dodge
2019-06-26 10:53   ` Daniel Thompson
2019-06-26 11:42   ` Dan Murphy
2019-06-26 11:45     ` Dan Murphy

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