All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/1] dt-bindings: leds: Convert leds-tlc591xx.txt to yaml format
@ 2025-01-07 16:16 Frank Li
  2025-01-07 18:50 ` Rob Herring (Arm)
  2025-02-11 15:07 ` (subset) " Lee Jones
  0 siblings, 2 replies; 6+ messages in thread
From: Frank Li @ 2025-01-07 16:16 UTC (permalink / raw)
  To: Pavel Machek, Lee Jones, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Andrew Lunn, open list:LED SUBSYSTEM,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list
  Cc: imx

Convert binding doc leds-tlc591xx.txt to yaml format to fix below DTB_CHECK
warning.

arch/arm64/boot/dts/freescale/imx8mp-aristainetos3-proton2s.dtb:
  /soc@0/bus@30800000/i2c@30a30000/tlc59108@40: failed to match any schema with compatible: ['ti,tlc59108']

Additional change:
- ref to common.yaml for child nodes.
- limit child's reg to 0 - 7 for ti,tlc59108.
- fix typo 'linux,default_trigger' in example.
- change child node name's prefix to led-.
- change nodename to led-controller.
- fix properties order in example.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
change from v1 to v2
- using "^led@[0-9a-f]$"
- remove minimum: 0
---
 .../bindings/leds/leds-tlc591xx.txt           | 40 ---------
 .../devicetree/bindings/leds/ti,tlc59116.yaml | 90 +++++++++++++++++++
 2 files changed, 90 insertions(+), 40 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/leds/leds-tlc591xx.txt
 create mode 100644 Documentation/devicetree/bindings/leds/ti,tlc59116.yaml

diff --git a/Documentation/devicetree/bindings/leds/leds-tlc591xx.txt b/Documentation/devicetree/bindings/leds/leds-tlc591xx.txt
deleted file mode 100644
index 3bbbf70244119..0000000000000
--- a/Documentation/devicetree/bindings/leds/leds-tlc591xx.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-LEDs connected to tlc59116 or tlc59108
-
-Required properties
-- compatible: should be "ti,tlc59116" or "ti,tlc59108"
-- #address-cells: must be 1
-- #size-cells: must be 0
-- reg: typically 0x68
-
-Each led is represented as a sub-node of the ti,tlc59116.
-See Documentation/devicetree/bindings/leds/common.txt
-
-LED sub-node properties:
-- reg: number of LED line, 0 to 15 or 0 to 7
-- label: (optional) name of LED
-- linux,default-trigger : (optional)
-
-Examples:
-
-tlc59116@68 {
-	#address-cells = <1>;
-	#size-cells = <0>;
-	compatible = "ti,tlc59116";
-	reg = <0x68>;
-
-	wan@0 {
-		label = "wrt1900ac:amber:wan";
-		reg = <0x0>;
-	};
-
-	2g@2 {
-		label = "wrt1900ac:white:2g";
-		reg = <0x2>;
-	};
-
-	alive@9 {
-		label = "wrt1900ac:green:alive";
-		reg = <0x9>;
-		linux,default_trigger = "heartbeat";
-	};
-};
diff --git a/Documentation/devicetree/bindings/leds/ti,tlc59116.yaml b/Documentation/devicetree/bindings/leds/ti,tlc59116.yaml
new file mode 100644
index 0000000000000..ce9713793908a
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/ti,tlc59116.yaml
@@ -0,0 +1,90 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/ti,tlc59116.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: LEDs connected to tlc59116 or tlc59108
+
+maintainers:
+  - Andrew Lunn <andrew@lunn.ch>
+
+properties:
+  compatible:
+    enum:
+      - ti,tlc59108
+      - ti,tlc59116
+
+  reg:
+    maxItems: 1
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 0
+
+patternProperties:
+  "^led@[0-9a-f]$":
+    type: object
+    $ref: common.yaml#
+    properties:
+      reg:
+        items:
+          minimum: 0
+          maximum: 15
+
+    unevaluatedProperties: false
+
+required:
+  - compatible
+  - reg
+  - "#address-cells"
+  - "#size-cells"
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: ti,tlc59108
+    then:
+      patternProperties:
+        "^led@[0-9a-f]$":
+          properties:
+            reg:
+              items:
+                maximum: 7
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        led-controller@68 {
+            compatible = "ti,tlc59116";
+            reg = <0x68>;
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            led@0 {
+                reg = <0x0>;
+                label = "wrt1900ac:amber:wan";
+            };
+
+            led@2 {
+                reg = <0x2>;
+                label = "wrt1900ac:white:2g";
+            };
+
+            led@9 {
+                reg = <0x9>;
+                label = "wrt1900ac:green:alive";
+                linux,default-trigger = "heartbeat";
+            };
+        };
+    };
+
-- 
2.34.1


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

* Re: [PATCH v2 1/1] dt-bindings: leds: Convert leds-tlc591xx.txt to yaml format
  2025-01-07 16:16 [PATCH v2 1/1] dt-bindings: leds: Convert leds-tlc591xx.txt to yaml format Frank Li
@ 2025-01-07 18:50 ` Rob Herring (Arm)
  2025-02-10 21:07   ` Frank Li
  2025-02-11 15:07 ` (subset) " Lee Jones
  1 sibling, 1 reply; 6+ messages in thread
From: Rob Herring (Arm) @ 2025-01-07 18:50 UTC (permalink / raw)
  To: Frank Li
  Cc: Conor Dooley, linux-leds, devicetree, Krzysztof Kozlowski, imx,
	Pavel Machek, Lee Jones, Andrew Lunn, linux-kernel


On Tue, 07 Jan 2025 11:16:26 -0500, Frank Li wrote:
> Convert binding doc leds-tlc591xx.txt to yaml format to fix below DTB_CHECK
> warning.
> 
> arch/arm64/boot/dts/freescale/imx8mp-aristainetos3-proton2s.dtb:
>   /soc@0/bus@30800000/i2c@30a30000/tlc59108@40: failed to match any schema with compatible: ['ti,tlc59108']
> 
> Additional change:
> - ref to common.yaml for child nodes.
> - limit child's reg to 0 - 7 for ti,tlc59108.
> - fix typo 'linux,default_trigger' in example.
> - change child node name's prefix to led-.
> - change nodename to led-controller.
> - fix properties order in example.
> 
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
> change from v1 to v2
> - using "^led@[0-9a-f]$"
> - remove minimum: 0
> ---
>  .../bindings/leds/leds-tlc591xx.txt           | 40 ---------
>  .../devicetree/bindings/leds/ti,tlc59116.yaml | 90 +++++++++++++++++++
>  2 files changed, 90 insertions(+), 40 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/leds/leds-tlc591xx.txt
>  create mode 100644 Documentation/devicetree/bindings/leds/ti,tlc59116.yaml
> 

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>


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

* Re: [PATCH v2 1/1] dt-bindings: leds: Convert leds-tlc591xx.txt to yaml format
@ 2025-01-09  9:53 kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2025-01-09  9:53 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "dtcheck: binding changes may go via different trees"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20250107161628.121685-1-Frank.Li@nxp.com>
References: <20250107161628.121685-1-Frank.Li@nxp.com>
TO: Frank Li <Frank.Li@nxp.com>
TO: Pavel Machek <pavel@ucw.cz>
TO: Lee Jones <lee@kernel.org>
TO: Rob Herring <robh@kernel.org>
TO: Krzysztof Kozlowski <krzk@kernel.org>
TO: Conor Dooley <conor+dt@kernel.org>
TO: Andrew Lunn <andrew@lunn.ch>
TO: "open list:LED SUBSYSTEM" <linux-leds@vger.kernel.org>
TO: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" <devicetree@vger.kernel.org>
TO: open list <linux-kernel@vger.kernel.org>
CC: imx@lists.linux.dev

Hi Frank,

kernel test robot noticed the following build warnings:

[auto build test WARNING on lee-leds/for-leds-next]
[also build test WARNING on robh/for-next linus/master v6.13-rc6 next-20250108]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Frank-Li/dt-bindings-leds-Convert-leds-tlc591xx-txt-to-yaml-format/20250108-001853
base:   https://git.kernel.org/pub/scm/linux/kernel/git/lee/leds.git for-leds-next
patch link:    https://lore.kernel.org/r/20250107161628.121685-1-Frank.Li%40nxp.com
patch subject: [PATCH v2 1/1] dt-bindings: leds: Convert leds-tlc591xx.txt to yaml format
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: arm-randconfig-051-20250108 (https://download.01.org/0day-ci/archive/20250109/202501091722.OEBuxlxh-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 14.2.0
dtschema version: 2024.12.dev6+gc4da38d
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250109/202501091722.OEBuxlxh-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202501091722.OEBuxlxh-lkp@intel.com/

dtcheck warnings: (new ones prefixed by >>)
   	'allwinner,sun7i-a20-i2c' was expected
   	'allwinner,sun6i-a31-i2c' was expected
   	'marvell,mv78230-i2c' is not one of ['allwinner,suniv-f1c100s-i2c', 'allwinner,sun8i-a23-i2c', 'allwinner,sun8i-a83t-i2c', 'allwinner,sun8i-v536-i2c', 'allwinner,sun50i-a64-i2c', 'allwinner,sun50i-h6-i2c']
   	'marvell,mv78230-i2c' is not one of ['allwinner,sun20i-d1-i2c', 'allwinner,sun50i-a100-i2c', 'allwinner,sun50i-h616-i2c', 'allwinner,sun50i-r329-i2c', 'allwinner,sun55i-a523-i2c']
   	'marvell,mv64xxx-i2c' was expected
   	'marvell,mv78230-a0-i2c' was expected
   	'allwinner,sun8i-v536-i2c' was expected
   	from schema $id: http://devicetree.org/schemas/i2c/marvell,mv64xxx-i2c.yaml#
   arch/arm/boot/dts/marvell/armada-xp-linksys-mamba.dtb: i2c@11000: Unevaluated properties are not allowed ('compatible' was unexpected)
   	from schema $id: http://devicetree.org/schemas/i2c/marvell,mv64xxx-i2c.yaml#
>> arch/arm/boot/dts/marvell/armada-xp-linksys-mamba.dtb: tlc59116@68: '#gpio-cells', 'esata@4', 'usb2@5', 'usb3_1@6', 'usb3_2@7', 'wan_amber@0', 'wan_white@1', 'wlan_2g@2', 'wlan_5g@3', 'wps_amber@9', 'wps_white@8' do not match any of the regexes: '^led@[0-9a-f]$', 'pinctrl-[0-9]+'
   	from schema $id: http://devicetree.org/schemas/leds/ti,tlc59116.yaml#
   arch/arm/boot/dts/marvell/armada-xp-linksys-mamba.dtb: i2c@11100: compatible: 'oneOf' conditional failed, one must be fixed:
   	['marvell,mv78230-i2c', 'marvell,mv64xxx-i2c'] is too long
   	['marvell,mv78230-i2c', 'marvell,mv64xxx-i2c'] is too short
   	'allwinner,sun4i-a10-i2c' was expected
   	'allwinner,sun7i-a20-i2c' was expected
   	'allwinner,sun6i-a31-i2c' was expected
   	'marvell,mv78230-i2c' is not one of ['allwinner,suniv-f1c100s-i2c', 'allwinner,sun8i-a23-i2c', 'allwinner,sun8i-a83t-i2c', 'allwinner,sun8i-v536-i2c', 'allwinner,sun50i-a64-i2c', 'allwinner,sun50i-h6-i2c']
   	'marvell,mv78230-i2c' is not one of ['allwinner,sun20i-d1-i2c', 'allwinner,sun50i-a100-i2c', 'allwinner,sun50i-h616-i2c', 'allwinner,sun50i-r329-i2c', 'allwinner,sun55i-a523-i2c']
   	'marvell,mv64xxx-i2c' was expected

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

* Re: [PATCH v2 1/1] dt-bindings: leds: Convert leds-tlc591xx.txt to yaml format
  2025-01-07 18:50 ` Rob Herring (Arm)
@ 2025-02-10 21:07   ` Frank Li
  2025-02-11 10:17     ` Lee Jones
  0 siblings, 1 reply; 6+ messages in thread
From: Frank Li @ 2025-02-10 21:07 UTC (permalink / raw)
  To: Rob Herring (Arm)
  Cc: Conor Dooley, linux-leds, devicetree, Krzysztof Kozlowski, imx,
	Pavel Machek, Lee Jones, Andrew Lunn, linux-kernel

On Tue, Jan 07, 2025 at 12:50:07PM -0600, Rob Herring (Arm) wrote:
>
> On Tue, 07 Jan 2025 11:16:26 -0500, Frank Li wrote:
> > Convert binding doc leds-tlc591xx.txt to yaml format to fix below DTB_CHECK
> > warning.
> >
> > arch/arm64/boot/dts/freescale/imx8mp-aristainetos3-proton2s.dtb:
> >   /soc@0/bus@30800000/i2c@30a30000/tlc59108@40: failed to match any schema with compatible: ['ti,tlc59108']
> >
> > Additional change:
> > - ref to common.yaml for child nodes.
> > - limit child's reg to 0 - 7 for ti,tlc59108.
> > - fix typo 'linux,default_trigger' in example.
> > - change child node name's prefix to led-.
> > - change nodename to led-controller.
> > - fix properties order in example.
> >
> > Signed-off-by: Frank Li <Frank.Li@nxp.com>
> > ---
> > change from v1 to v2
> > - using "^led@[0-9a-f]$"
> > - remove minimum: 0
> > ---
> >  .../bindings/leds/leds-tlc591xx.txt           | 40 ---------
> >  .../devicetree/bindings/leds/ti,tlc59116.yaml | 90 +++++++++++++++++++
> >  2 files changed, 90 insertions(+), 40 deletions(-)
> >  delete mode 100644 Documentation/devicetree/bindings/leds/leds-tlc591xx.txt
> >  create mode 100644 Documentation/devicetree/bindings/leds/ti,tlc59116.yaml
> >
>
> Reviewed-by: Rob Herring (Arm) <robh@kernel.org>

Anyone take care this patch. Rob already acked.

Frank

>

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

* Re: [PATCH v2 1/1] dt-bindings: leds: Convert leds-tlc591xx.txt to yaml format
  2025-02-10 21:07   ` Frank Li
@ 2025-02-11 10:17     ` Lee Jones
  0 siblings, 0 replies; 6+ messages in thread
From: Lee Jones @ 2025-02-11 10:17 UTC (permalink / raw)
  To: Frank Li
  Cc: Rob Herring (Arm), Conor Dooley, linux-leds, devicetree,
	Krzysztof Kozlowski, imx, Pavel Machek, Andrew Lunn, linux-kernel

On Mon, 10 Feb 2025, Frank Li wrote:

> On Tue, Jan 07, 2025 at 12:50:07PM -0600, Rob Herring (Arm) wrote:
> >
> > On Tue, 07 Jan 2025 11:16:26 -0500, Frank Li wrote:
> > > Convert binding doc leds-tlc591xx.txt to yaml format to fix below DTB_CHECK
> > > warning.
> > >
> > > arch/arm64/boot/dts/freescale/imx8mp-aristainetos3-proton2s.dtb:
> > >   /soc@0/bus@30800000/i2c@30a30000/tlc59108@40: failed to match any schema with compatible: ['ti,tlc59108']
> > >
> > > Additional change:
> > > - ref to common.yaml for child nodes.
> > > - limit child's reg to 0 - 7 for ti,tlc59108.
> > > - fix typo 'linux,default_trigger' in example.
> > > - change child node name's prefix to led-.
> > > - change nodename to led-controller.
> > > - fix properties order in example.
> > >
> > > Signed-off-by: Frank Li <Frank.Li@nxp.com>
> > > ---
> > > change from v1 to v2
> > > - using "^led@[0-9a-f]$"
> > > - remove minimum: 0
> > > ---
> > >  .../bindings/leds/leds-tlc591xx.txt           | 40 ---------
> > >  .../devicetree/bindings/leds/ti,tlc59116.yaml | 90 +++++++++++++++++++
> > >  2 files changed, 90 insertions(+), 40 deletions(-)
> > >  delete mode 100644 Documentation/devicetree/bindings/leds/leds-tlc591xx.txt
> > >  create mode 100644 Documentation/devicetree/bindings/leds/ti,tlc59116.yaml
> > >
> >
> > Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
> 
> Anyone take care this patch. Rob already acked.

Yes.  I'm working through my inbox now.  FWIW, since I work in reverse
chronological order, you just bumped it to the back of the queue.

-- 
Lee Jones [李琼斯]

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

* Re: (subset) [PATCH v2 1/1] dt-bindings: leds: Convert leds-tlc591xx.txt to yaml format
  2025-01-07 16:16 [PATCH v2 1/1] dt-bindings: leds: Convert leds-tlc591xx.txt to yaml format Frank Li
  2025-01-07 18:50 ` Rob Herring (Arm)
@ 2025-02-11 15:07 ` Lee Jones
  1 sibling, 0 replies; 6+ messages in thread
From: Lee Jones @ 2025-02-11 15:07 UTC (permalink / raw)
  To: Pavel Machek, Lee Jones, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Andrew Lunn, linux-leds, devicetree, linux-kernel,
	Frank Li
  Cc: imx

On Tue, 07 Jan 2025 11:16:26 -0500, Frank Li wrote:
> Convert binding doc leds-tlc591xx.txt to yaml format to fix below DTB_CHECK
> warning.
> 
> arch/arm64/boot/dts/freescale/imx8mp-aristainetos3-proton2s.dtb:
>   /soc@0/bus@30800000/i2c@30a30000/tlc59108@40: failed to match any schema with compatible: ['ti,tlc59108']
> 
> Additional change:
> - ref to common.yaml for child nodes.
> - limit child's reg to 0 - 7 for ti,tlc59108.
> - fix typo 'linux,default_trigger' in example.
> - change child node name's prefix to led-.
> - change nodename to led-controller.
> - fix properties order in example.
> 
> [...]

Applied, thanks!

[1/1] dt-bindings: leds: Convert leds-tlc591xx.txt to yaml format
      commit: 346e704278151149e9b4c6807686ee667b911e77

--
Lee Jones [李琼斯]


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

end of thread, other threads:[~2025-02-11 15:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-07 16:16 [PATCH v2 1/1] dt-bindings: leds: Convert leds-tlc591xx.txt to yaml format Frank Li
2025-01-07 18:50 ` Rob Herring (Arm)
2025-02-10 21:07   ` Frank Li
2025-02-11 10:17     ` Lee Jones
2025-02-11 15:07 ` (subset) " Lee Jones
  -- strict thread matches above, loose matches on Subject: below --
2025-01-09  9:53 kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.