Skip to contentSkip to conversation

fix vendor prefix for arcxcnn driver and bindings

PATCH Superseded Brian Dodge 6 participants 15 messages Jun 25, 2019 – Jun 26, 2019

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover fix vendor prefix for arcxcnn driver and bindings

These two patches supercede the prior similar three-patch set submitted on 6 Mov 2018. Apologies for the confusion.

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.

Unlike the previous patch set which hasn't been applied, there there is no actual functionality change here.
_______________________________________________
dri-devel mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#1 lore raw

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

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

---
 .../bindings/leds/backlight/arcxcnn_bl.txt         | 24 +++++++++++++---------
 1 file changed, 14 insertions(+), 10 deletions(-)
Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt +14 -10
index 230abde..9cf4c44 100644
@@ -1,8 +1,12 @@
-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"
+
+- reg:		slave address
 
 Optional properties:
 - default-brightness:	brightness value on boot, value from: 0-4095
@@ -11,19 +15,19 @@ 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
 
 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";
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw

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

Quoted 14 lines · Brian Dodge

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

---
 .../bindings/leds/backlight/arcxcnn_bl.txt         | 24 +++++++++++++---------
 1 file changed, 14 insertions(+), 10 deletions(-)
Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt +0 -0
index 230abde..9cf4c44 100644

Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt line 7

Quoted 10 lines
Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt +5 -3
@@ -1,8 +1,12 @@
-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"

This is more a question for the DT folks than for Brian but...

AFAICT this patch is fixing the binding for the ArcticSand devices to use the correct value from vendor-prefixes.yaml and has been previously discussed here:
https://lkml.org/lkml/2018/9/25/726

Currently this patch series just updates the DT bindings but the implementation also honours the old values (since there is a Chromebook in the wild that uses the current bindings).

Hence I'm not clear whether the bindings should document the deprecated options too (e.g. make it easier to find the bindings doc with git grep and friends).

Daniel.

Quoted 35 lines
Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt +9 -7
+
+- reg:		slave address
 
 Optional properties:
 - default-brightness:	brightness value on boot, value from: 0-4095
@@ -11,19 +15,19 @@ 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
 
 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";
Signature · 1 line
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw

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

I would like to deprecate the old prefix in the future after communicating with all chip customers, which is why the old prefix is not documented in the new bindings.

Quoted 69 lines · Daniel Thompson
Quoted 7 lines · Brian Dodge

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

---
 .../bindings/leds/backlight/arcxcnn_bl.txt         | 24

+++++++++++++---------

Quoted 3 lines
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git

a/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt b/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt

Quoted 4 lines

index 230abde..9cf4c44 100644

Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt line 7

Quoted 10 lines
Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt +5 -3
@@ -1,8 +1,12 @@
-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"

This is more a question for the DT folks than for Brian but...

AFAICT this patch is fixing the binding for the ArcticSand devices to use the correct value from vendor-prefixes.yaml and has been previously discussed here:
https://lkml.org/lkml/2018/9/25/726

Currently this patch series just updates the DT bindings but the implementation also honours the old values (since there is a Chromebook in the wild that uses the current bindings).

Hence I'm not clear whether the bindings should document the deprecated options too (e.g. make it easier to find the bindings doc with git grep and friends).

Daniel.

Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt

Quoted 5 lines
Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt +2 -0
+
+- reg:               slave address
 
 Optional properties:
 - default-brightness:        brightness value on boot, value from:

0-4095

Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt Optional properties: · line 16

Quoted 3 lines
Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt +0 -0
@@ -11,19 +15,19 @@ Optional properties:
 - led-sources:               List of enabled channels from 0 to 5.
                      See

Documentation/devicetree/bindings/leds/common.txt

Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt Optional properties:

Quoted 4 lines
Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt +0 -3
-- 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)

Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt Optional properties:

Quoted 6 lines
Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt +3 -3
-- 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]
Quoted 20 lines

used)

Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt Optional properties:

Quoted 5 lines
Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt +3 -0
+- arctic,comp-config:        setting for register CONFIG_COMP
+- arctic,filter-config:      setting for register FILTER_CONFIG
+- arctic,trim-config:        setting for register IMAXTUNE
 
 Note: Optional properties not specified will default to values in IC

EPROM

Quoted 12 lines
Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt +1 -2
 Example:
 
 arc2c0608@30 {
-     compatible = "arc,arc2c0608";
+     compatible = "arctic,arc2c0608";
      reg = <0x30>;
      default-brightness = <500>;
      label = "lcd-backlight";
--

2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw

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

Quoted 3 lines · Brian Dodge

I would like to deprecate the old prefix in the future after communicating with all chip customers, which is why the old prefix is not documented in the new bindings.

Deprecation is fine (by me at least) it's just that I'm not sure that removing the documentation for the deprecated bindings is the right way to do it. What is the prior art here?

Daniel.

Quoted 84 lines
Quoted 79 lines · Daniel Thompson
Quoted 7 lines · Brian Dodge

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

---
 .../bindings/leds/backlight/arcxcnn_bl.txt         | 24

+++++++++++++---------

Quoted 3 lines
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git

a/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt b/Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt

Quoted 4 lines

index 230abde..9cf4c44 100644

Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt line 7

Quoted 10 lines
Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt +5 -3
@@ -1,8 +1,12 @@
-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"

This is more a question for the DT folks than for Brian but...

AFAICT this patch is fixing the binding for the ArcticSand devices to use the correct value from vendor-prefixes.yaml and has been previously discussed here:
https://lkml.org/lkml/2018/9/25/726

Currently this patch series just updates the DT bindings but the implementation also honours the old values (since there is a Chromebook in the wild that uses the current bindings).

Hence I'm not clear whether the bindings should document the deprecated options too (e.g. make it easier to find the bindings doc with git grep and friends).

Daniel.

Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt

Quoted 5 lines
Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt +2 -0
+
+- reg:               slave address
 
 Optional properties:
 - default-brightness:        brightness value on boot, value from:

0-4095

Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt Optional properties: · line 16

Quoted 3 lines
Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt +0 -0
@@ -11,19 +15,19 @@ Optional properties:
 - led-sources:               List of enabled channels from 0 to 5.
                      See

Documentation/devicetree/bindings/leds/common.txt

Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt Optional properties:

Quoted 4 lines
Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt +0 -3
-- 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)

Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt Optional properties:

Quoted 6 lines
Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt +3 -3
-- 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)

Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt Optional properties:

Quoted 5 lines
Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt +3 -0
+- arctic,comp-config:        setting for register CONFIG_COMP
+- arctic,filter-config:      setting for register FILTER_CONFIG
+- arctic,trim-config:        setting for register IMAXTUNE
 
 Note: Optional properties not specified will default to values in IC

EPROM

Quoted 3 lines
Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt +0 -0
 Example:
 
Quoted 10 lines
Quoted 10 lines
Quoted 9 lines
Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt +1 -2
 arc2c0608@30 {
-     compatible = "arc,arc2c0608";
+     compatible = "arctic,arc2c0608";
      reg = <0x30>;
      default-brightness = <500>;
      label = "lcd-backlight";
--

2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw

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

Quoted 8 lines · Daniel Thompson
Quoted 3 lines · Brian Dodge

I would like to deprecate the old prefix in the future after communicating with all chip customers, which is why the old prefix is not documented in the new bindings.

Deprecation is fine (by me at least) it's just that I'm not sure that removing the documentation for the deprecated bindings is the right way to do it. What is the prior art here?

I'd let Rob et al. make the final decision.

Signature · 8 lines
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#6 lore raw

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

In reply to Daniel Thompson
Quoted 9 lines · Daniel Thompson
Quoted 3 lines · Brian Dodge

I would like to deprecate the old prefix in the future after communicating with all chip customers, which is why the old prefix is not documented in the new bindings.

Deprecation is fine (by me at least) it's just that I'm not sure that removing the documentation for the deprecated bindings is the right way to do it. What is the prior art here?

Kind of depends on how widely used something is and we've done both ways generally. If there are not any upstream dts files, removal is fine IMO.

With schema, there's a 'deprecated' keyword coming in draft8. So we'll have a defined way to keep things documented as needed and also warn about their use.

Rob
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#7 lore raw

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

In reply to Daniel Thompson
Quoted 8 lines · Daniel Thompson
Quoted 3 lines · Brian Dodge

I would like to deprecate the old prefix in the future after communicating with all chip customers, which is why the old prefix is not documented in the new bindings.

Deprecation is fine (by me at least) it's just that I'm not sure that removing the documentation for the deprecated bindings is the right way to do it. What is the prior art here?

I believe we should keep the docs.

Pavel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#8 lore raw

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

Is there a standard way to format to-be-deprecated items in the bindings?

Quoted 8 lines · Pavel Machek
Quoted 2 lines · Daniel Thompson
Quoted 1 line · Brian Dodge

I would like to deprecate the old prefix in the future after

communicating

Quoted 1 line
Quoted 1 line

with all chip customers, which is why the old prefix is not documented

in

Quoted 2 lines
Quoted 1 line

the new bindings.

Quoted 8 lines
Quoted 3 lines

Deprecation is fine (by me at least) it's just that I'm not sure that removing the documentation for the deprecated bindings is the right way to do it. What is the prior art here?

I believe we should keep the docs.

Pavel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#9 lore raw

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

In reply to Pavel Machek
Quoted 9 lines · Pavel Machek
Quoted 7 lines · Daniel Thompson
Quoted 3 lines · Brian Dodge

I would like to deprecate the old prefix in the future after communicating with all chip customers, which is why the old prefix is not documented in the new bindings.

Deprecation is fine (by me at least) it's just that I'm not sure that removing the documentation for the deprecated bindings is the right way to do it. What is the prior art here?

I believe we should keep the docs.

I agree with Pavel on keeping the docs.

Keep the doc but mark the properties as deprecated since they are not removed from

the code

Dan

Quoted 1 line

Pavel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#10 lore raw

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

In reply to Daniel Thompson

Hello

Quoted 53 lines · Daniel Thompson
Quoted 14 lines · Brian Dodge

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

---
  .../bindings/leds/backlight/arcxcnn_bl.txt         | 24 +++++++++++++---------
  1 file changed, 14 insertions(+), 10 deletions(-)
Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt +0 -0
index 230abde..9cf4c44 100644

Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt line 7

Quoted 10 lines
Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt +5 -3
@@ -1,8 +1,12 @@
-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"

This is more a question for the DT folks than for Brian but...

AFAICT this patch is fixing the binding for the ArcticSand devices to use the correct value from vendor-prefixes.yaml and has been previously discussed here:
https://lkml.org/lkml/2018/9/25/726

Currently this patch series just updates the DT bindings but the implementation also honours the old values (since there is a Chromebook in the wild that uses the current bindings).

Hence I'm not clear whether the bindings should document the deprecated options too (e.g. make it easier to find the bindings doc with git grep and friends).

Daniel.

Quoted 9 lines
Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt +2 -0
+
+- reg:		slave address
 
  Optional properties:
  - default-brightness:	brightness value on boot, value from: 0-4095
@@ -11,19 +15,19 @@ Optional properties:
  - led-sources:		List of enabled channels from 0 to 5.
  			See Documentation/devicetree/bindings/leds/common.txt
 
Quoted 6 lines

Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt Optional properties: · line 19

Quoted 6 lines
Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt +0 -6
-- 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

IMO I would prefer to keep these and mark them as deprecated since the driver will still

honor these properties.

Maybe in a Optional Deprecated Properties section in the DT binding.

Dan

Quoted 11 lines
Quoted 11 lines
Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt +6 -0
+- 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
 
  Note: Optional properties not specified will default to values in IC EPROM
 
  Example:
 
Quoted 9 lines
Quoted 9 lines
Documentation/devicetree/bindings/leds/backlight/arcxcnn_bl.txt +1 -1
  arc2c0608@30 {
-	compatible = "arc,arc2c0608";
+	compatible = "arctic,arc2c0608";
  	reg = <0x30>;
  	default-brightness = <500>;
  	label = "lcd-backlight";
Signature · 1 line
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#11 lore raw

PATCH 2/2 backlight: arcxcnn: add "arctic" vendor prefix

In reply to Brian Dodge

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)

---
 drivers/video/backlight/arcxcnn_bl.c | 35 +++++++++++++++++++++++++----------
 1 file changed, 25 insertions(+), 10 deletions(-)
drivers/video/backlight/arcxcnn_bl.c +25 -10
index 7b1c0a0..14c67f2 100644
@@ -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 <[email protected]>
+ * Copyright 2016-2019  pSemi, Inc.
+ * Author : Brian Dodge <[email protected]>
  */
 
 #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 <[email protected]>");
+MODULE_AUTHOR("Brian Dodge <[email protected]>");
 MODULE_DESCRIPTION("ARCXCNN Backlight driver");
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Acked-by on v1 2/2
#12 lore raw

Re: [PATCH 2/2] backlight: arcxcnn: add "arctic" vendor prefix

Quoted 7 lines · Brian Dodge

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)

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

Daniel.

Quoted 87 lines
---
 drivers/video/backlight/arcxcnn_bl.c | 35 +++++++++++++++++++++++++----------
 1 file changed, 25 insertions(+), 10 deletions(-)
drivers/video/backlight/arcxcnn_bl.c +25 -10
index 7b1c0a0..14c67f2 100644
@@ -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 <[email protected]>
+ * Copyright 2016-2019  pSemi, Inc.
+ * Author : Brian Dodge <[email protected]>
  */
 
 #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 <[email protected]>");
+MODULE_AUTHOR("Brian Dodge <[email protected]>");
 MODULE_DESCRIPTION("ARCXCNN Backlight driver");
Signature · 1 line
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#13 lore raw

Re: [PATCH 2/2] backlight: arcxcnn: add "arctic" vendor prefix

In reply to Brian Dodge

Hello

Quoted 29 lines · Brian Dodge

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)

---
  drivers/video/backlight/arcxcnn_bl.c | 35 +++++++++++++++++++++++++----------
  1 file changed, 25 insertions(+), 10 deletions(-)
drivers/video/backlight/arcxcnn_bl.c +3 -3
index 7b1c0a0..14c67f2 100644
@@ -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 <[email protected]>
+ * Copyright 2016-2019  pSemi, Inc.
+ * Author : Brian Dodge <[email protected]>
   */
 
  #include <linux/backlight.h>

drivers/video/backlight/arcxcnn_bl.c static void arcxcnn_parse_dt(struct arcxcnn *lp) · line 196

Quoted 7 lines
drivers/video/backlight/arcxcnn_bl.c +3 -1
@@ -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

Quoted 40 lines
drivers/video/backlight/arcxcnn_bl.c +16 -5
  	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;
 

drivers/video/backlight/arcxcnn_bl.c static int arcxcnn_remove(struct i2c_client *cl) · line 398

Quoted 5 lines
drivers/video/backlight/arcxcnn_bl.c +2 -0
@@ -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

drivers/video/backlight/arcxcnn_bl.c static struct i2c_driver arcxcnn_driver = { · line 423

Quoted 10 lines
drivers/video/backlight/arcxcnn_bl.c +1 -1
  	{ .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 <[email protected]>");
+MODULE_AUTHOR("Brian Dodge <[email protected]>");
  MODULE_DESCRIPTION("ARCXCNN Backlight driver");

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#14 lore raw

Re: [PATCH 2/2] backlight: arcxcnn: add "arctic" vendor prefix

Hello

One other thing

Quoted 33 lines · Dan Murphy

Hello

Quoted 30 lines · Brian Dodge

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)

---
  drivers/video/backlight/arcxcnn_bl.c | 35
+++++++++++++++++++++++++----------

  1 file changed, 25 insertions(+), 10 deletions(-)
drivers/video/backlight/arcxcnn_bl.c +1 -1
index 7b1c0a0..14c67f2 100644
@@ -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 <[email protected]>
+ * Copyright 2016-2019  pSemi, Inc.
+ * Author : Brian Dodge <[email protected]>
   */
    #include <linux/backlight.h>

drivers/video/backlight/arcxcnn_bl.c +0 -0
@@ -191,27 +191,40 @@ static void arcxcnn_parse_dt(struct arcxcnn *lp)
Quoted 8 lines

drivers/video/backlight/arcxcnn_bl.c static void arcxcnn_parse_dt(struct arcxcnn *lp)

Quoted 7 lines
drivers/video/backlight/arcxcnn_bl.c +3 -0
       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

Quoted 44 lines
Quoted 33 lines
drivers/video/backlight/arcxcnn_bl.c +16 -0
       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);
Quoted 7 lines

      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

Quoted 9 lines

drivers/video/backlight/arcxcnn_bl.c static struct i2c_driver arcxcnn_driver = { · line 422

Quoted 9 lines

      { .compatible = "arc,arc2c0608" },
      { }
  };

drivers/video/backlight/arcxcnn_bl.c +1 -1
@@ -404,5 +419,5 @@ static struct i2c_driver arcxcnn_driver = {
   module_i2c_driver(arcxcnn_driver);
     MODULE_LICENSE("GPL v2");
-MODULE_AUTHOR("Brian Dodge <[email protected]>");
+MODULE_AUTHOR("Brian Dodge <[email protected]>");
   MODULE_DESCRIPTION("ARCXCNN Backlight driver");

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel