devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/3] Add support for is31fl3236a LED controller
@ 2025-07-17 15:02 Pawel Zalewski
  2025-07-17 15:02 ` [PATCH v4 1/3] dt-bindings: leds: is31fl32xx: convert the binding to yaml Pawel Zalewski
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Pawel Zalewski @ 2025-07-17 15:02 UTC (permalink / raw)
  To: Lee Jones, Pavel Machek, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-leds, linux-kernel, Pavel Machek, devicetree,
	Pawel Zalewski, Lucca Fachinetti

This series of patches adds support for the is31fl3236a led
controller. The main difference between this IC and the
is31fl3236 is that there is a new parameter/register that
moves the operating frequency of the PWM outputs out of 
the audible range.

To support the new register a property was added in the dt-bindings,
as this property is at the board layout level ie. not all
boards will have analog audio and have to worry about it.

To add the new property the old .txt binding documentation was
ported to .yaml format. There was a previous attempt to do this
in 2024 but the original author has never acted on the feedback
given [1]. So I have implemented changes requested in that 
review and added his Signed-off-by.

The new functionality was tested by scoping the PWM signal. Out of
reset the IC is in 3kHz mode, thus action is taken only if the new
boolean value is set to true in the device tree.

[1] https://lore.kernel.org/linux-leds/20240701-overview-video-34f025ede104@spud/

Changes in v2:
- Added cover letter
- Ported dt-binding to yaml
- Refactored driver module
- Link to v1: https://lore.kernel.org/linux-leds/CAA6zWZ+TbcHrZaZ0ottm0s1mhCLa8TXASii47WKSLn2_zV95bw@mail.gmail.com/T/#t

Changes in v3:
- Aligned/refactored code properly in C module
- Refactored dt-bindings yml file
- Link to v2: https://lore.kernel.org/r/20250627-leds-is31fl3236a-v2-0-f6ef7495ce65@thegoodpenguin.co.uk

Changes in v4:
- Aligned compatible strings array in the C module
- Addressed Krzysztof's feedback regarding dt-bindings
- Link to v3: https://lore.kernel.org/r/20250708-leds-is31fl3236a-v3-0-d68979b042dd@thegoodpenguin.co.uk

Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
---
Lucca Fachinetti (1):
      dt-bindings: leds: is31fl32xx: convert the binding to yaml

Pawel Zalewski (2):
      dt-bindings: leds: issi,is31fl3236: add issi,22kHz-pwm property
      leds/leds-is31fl32xx: add support for is31fl3236a

 .../devicetree/bindings/leds/issi,is31fl3236.yaml  | 120 +++++++++++++++++++++
 .../devicetree/bindings/leds/leds-is31fl32xx.txt   |  52 ---------
 drivers/leds/leds-is31fl32xx.c                     |  47 ++++++--
 3 files changed, 161 insertions(+), 58 deletions(-)
---
base-commit: 52da431bf03b5506203bca27fe14a97895c80faf
change-id: 20250625-leds-is31fl3236a-39cf52f969c7

Best regards,
-- 
Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>


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

* [PATCH v4 1/3] dt-bindings: leds: is31fl32xx: convert the binding to yaml
  2025-07-17 15:02 [PATCH v4 0/3] Add support for is31fl3236a LED controller Pawel Zalewski
@ 2025-07-17 15:02 ` Pawel Zalewski
  2025-07-17 16:40   ` Rob Herring (Arm)
  2025-07-17 19:31   ` Rob Herring
  2025-07-17 15:02 ` [PATCH v4 2/3] dt-bindings: leds: issi,is31fl3236: add issi,22kHz-pwm property Pawel Zalewski
  2025-07-17 15:02 ` [PATCH v4 3/3] leds/leds-is31fl32xx: add support for is31fl3236a Pawel Zalewski
  2 siblings, 2 replies; 9+ messages in thread
From: Pawel Zalewski @ 2025-07-17 15:02 UTC (permalink / raw)
  To: Lee Jones, Pavel Machek, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-leds, linux-kernel, Pavel Machek, devicetree,
	Pawel Zalewski, Lucca Fachinetti

From: Lucca Fachinetti <luccafachinetti@gmail.com>

Add datasheets for reference, NB that I was not able to find an
up-to-date, funtional direct URL for si-en products datasheet
so they were skipped.

Signed-off-by: Lucca Fachinetti <luccafachinetti@gmail.com>
Co-developed-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
---
 .../devicetree/bindings/leds/issi,is31fl3236.yaml  | 114 +++++++++++++++++++++
 .../devicetree/bindings/leds/leds-is31fl32xx.txt   |  52 ----------
 2 files changed, 114 insertions(+), 52 deletions(-)

diff --git a/Documentation/devicetree/bindings/leds/issi,is31fl3236.yaml b/Documentation/devicetree/bindings/leds/issi,is31fl3236.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..abcd4c448e94db1d1e339f7ee165c3e04a1d354d
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/issi,is31fl3236.yaml
@@ -0,0 +1,114 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/issi,is31fl3236.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: is31fl32xx and Si-En SN32xx IC LED driver
+
+maintainers:
+  - Pavel Machek <pavel@ucw.cz>
+  - Lee Jones <lee@kernel.org>
+
+description: |
+  The is31fl32xx/SN32xx family of LED drivers are I2C devices with multiple
+  constant-current channels, each with independent 256-level PWM control.
+  Each LED is represented as a sub-node of the device.
+
+  For more product information please see the links below:
+    https://www.lumissil.com/assets/pdf/core/IS31FL3236_DS.pdf
+    https://www.lumissil.com/assets/pdf/core/IS31FL3236A_DS.pdf
+    https://www.lumissil.com/assets/pdf/core/IS31FL3235_DS.pdf
+    https://www.lumissil.com/assets/pdf/core/IS31FL3218_DS.pdf
+    https://www.lumissil.com/assets/pdf/core/IS31FL3216_DS.pdf
+
+properties:
+  compatible:
+    enum:
+      - issi,is31fl3236
+      - issi,is31fl3236a
+      - issi,is31fl3235
+      - issi,is31fl3218
+      - issi,is31fl3216
+      - si-en,sn3218
+      - si-en,sn3216
+
+  reg:
+    maxItems: 1
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 0
+
+patternProperties:
+  "^led@[1-9a-f][0-9a-f]$":
+    type: object
+    $ref: common.yaml#
+    unevaluatedProperties: false
+
+    properties:
+      reg:
+        description:
+          LED channel number (1..N)
+        minimum: 0x1
+        maximum: 0x24
+
+    required:
+      - reg
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - issi,is31fl3236
+              - issi,is31fl3235
+              - issi,is31fl3218
+              - issi,is31fl3216
+              - si-en,sn3218
+              - si-en,sn3216
+    then:
+      properties:
+        issi,22kHz-pwm: false
+
+required:
+  - compatible
+  - reg
+  - "#size-cells"
+  - "#address-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/leds/common.h>
+
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        led-controller@3c {
+            compatible = "issi,is31fl3236";
+            reg = <0x3c>;
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            led@1 {
+                reg = <0x1>;
+                label = "led1:red";
+            };
+            led@2 {
+                reg = <0x2>;
+                label = "led1:green";
+            };
+            led@3 {
+                reg = <0x3>;
+                label = "led1:blue";
+            };
+        };
+    };
+...
+
diff --git a/Documentation/devicetree/bindings/leds/leds-is31fl32xx.txt b/Documentation/devicetree/bindings/leds/leds-is31fl32xx.txt
deleted file mode 100644
index 926c2117942c4dc200fcd68156864f544b11a326..0000000000000000000000000000000000000000
--- a/Documentation/devicetree/bindings/leds/leds-is31fl32xx.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-Binding for ISSI IS31FL32xx and Si-En SN32xx LED Drivers
-
-The IS31FL32xx/SN32xx family of LED drivers are I2C devices with multiple
-constant-current channels, each with independent 256-level PWM control.
-Each LED is represented as a sub-node of the device.
-
-Required properties:
-- compatible: one of
-	issi,is31fl3236
-	issi,is31fl3235
-	issi,is31fl3218
-	issi,is31fl3216
-	si-en,sn3218
-	si-en,sn3216
-- reg: I2C slave address
-- address-cells : must be 1
-- size-cells : must be 0
-
-LED sub-node properties:
-- reg : LED channel number (1..N)
-- label :  (optional)
-  see Documentation/devicetree/bindings/leds/common.txt
-- linux,default-trigger :  (optional)
-  see Documentation/devicetree/bindings/leds/common.txt
-
-
-Example:
-
-is31fl3236: led-controller@3c {
-	compatible = "issi,is31fl3236";
-	reg = <0x3c>;
-	#address-cells = <1>;
-	#size-cells = <0>;
-
-	led@1 {
-		reg = <1>;
-		label = "EB:blue:usr0";
-	};
-	led@2 {
-		reg = <2>;
-		label = "EB:blue:usr1";
-	};
-	...
-	led@36 {
-		reg = <36>;
-		label = "EB:blue:usr35";
-	};
-};
-
-For more product information please see the links below:
-http://www.issi.com/US/product-analog-fxled-driver.shtml
-http://www.si-en.com/product.asp?parentid=890

-- 
2.48.1


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

* [PATCH v4 2/3] dt-bindings: leds: issi,is31fl3236: add issi,22kHz-pwm property
  2025-07-17 15:02 [PATCH v4 0/3] Add support for is31fl3236a LED controller Pawel Zalewski
  2025-07-17 15:02 ` [PATCH v4 1/3] dt-bindings: leds: is31fl32xx: convert the binding to yaml Pawel Zalewski
@ 2025-07-17 15:02 ` Pawel Zalewski
  2025-07-17 15:02 ` [PATCH v4 3/3] leds/leds-is31fl32xx: add support for is31fl3236a Pawel Zalewski
  2 siblings, 0 replies; 9+ messages in thread
From: Pawel Zalewski @ 2025-07-17 15:02 UTC (permalink / raw)
  To: Lee Jones, Pavel Machek, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-leds, linux-kernel, Pavel Machek, devicetree,
	Pawel Zalewski

Add an additional and optional control property for setting
the output PWM frequency to 22kHz. The default is 3kHz and
this option puts the operational frequency outside of the
audible range.

Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
---
 Documentation/devicetree/bindings/leds/issi,is31fl3236.yaml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/leds/issi,is31fl3236.yaml b/Documentation/devicetree/bindings/leds/issi,is31fl3236.yaml
index abcd4c448e94db1d1e339f7ee165c3e04a1d354d..e75809e343b110eed0fd5f87065d8e94a97835fa 100644
--- a/Documentation/devicetree/bindings/leds/issi,is31fl3236.yaml
+++ b/Documentation/devicetree/bindings/leds/issi,is31fl3236.yaml
@@ -42,6 +42,12 @@ properties:
   "#size-cells":
     const: 0
 
+  issi,22kHz-pwm:
+    type: boolean
+    description:
+      When present, the chip's PWM will operate at ~22kHz as opposed
+      to ~3kHz to move the operating frequency out of the audible range.
+
 patternProperties:
   "^led@[1-9a-f][0-9a-f]$":
     type: object

-- 
2.48.1


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

* [PATCH v4 3/3] leds/leds-is31fl32xx: add support for is31fl3236a
  2025-07-17 15:02 [PATCH v4 0/3] Add support for is31fl3236a LED controller Pawel Zalewski
  2025-07-17 15:02 ` [PATCH v4 1/3] dt-bindings: leds: is31fl32xx: convert the binding to yaml Pawel Zalewski
  2025-07-17 15:02 ` [PATCH v4 2/3] dt-bindings: leds: issi,is31fl3236: add issi,22kHz-pwm property Pawel Zalewski
@ 2025-07-17 15:02 ` Pawel Zalewski
  2 siblings, 0 replies; 9+ messages in thread
From: Pawel Zalewski @ 2025-07-17 15:02 UTC (permalink / raw)
  To: Lee Jones, Pavel Machek, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-leds, linux-kernel, Pavel Machek, devicetree,
	Pawel Zalewski

Add an additional and optional control register for setting
the output PWM frequency to 22kHz. The default is 3kHz and
this option puts the operational frequency outside of the
audible range.

Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
---
 drivers/leds/leds-is31fl32xx.c | 47 ++++++++++++++++++++++++++++++++++++------
 1 file changed, 41 insertions(+), 6 deletions(-)

diff --git a/drivers/leds/leds-is31fl32xx.c b/drivers/leds/leds-is31fl32xx.c
index 8793330dd4142f49f15d6ee9d87468c08509859f..5ec1ca71f326378e3a714a886260b86002feffa9 100644
--- a/drivers/leds/leds-is31fl32xx.c
+++ b/drivers/leds/leds-is31fl32xx.c
@@ -32,6 +32,8 @@
 #define IS31FL3216_CONFIG_SSD_ENABLE  BIT(7)
 #define IS31FL3216_CONFIG_SSD_DISABLE 0
 
+#define IS31FL32XX_PWM_FREQUENCY_22kHz  0x01
+
 struct is31fl32xx_priv;
 struct is31fl32xx_led_data {
 	struct led_classdev cdev;
@@ -53,6 +55,7 @@ struct is31fl32xx_priv {
  * @pwm_update_reg      : address of PWM Update register
  * @global_control_reg  : address of Global Control register (optional)
  * @reset_reg           : address of Reset register (optional)
+ * @output_frequency_setting_reg: address of output frequency register (optional)
  * @pwm_register_base   : address of first PWM register
  * @pwm_registers_reversed: : true if PWM registers count down instead of up
  * @led_control_register_base : address of first LED control register (optional)
@@ -76,6 +79,7 @@ struct is31fl32xx_chipdef {
 	u8	pwm_update_reg;
 	u8	global_control_reg;
 	u8	reset_reg;
+	u8	output_frequency_setting_reg;
 	u8	pwm_register_base;
 	bool	pwm_registers_reversed;
 	u8	led_control_register_base;
@@ -90,6 +94,19 @@ static const struct is31fl32xx_chipdef is31fl3236_cdef = {
 	.pwm_update_reg				= 0x25,
 	.global_control_reg			= 0x4a,
 	.reset_reg				= 0x4f,
+	.output_frequency_setting_reg		= IS31FL32XX_REG_NONE,
+	.pwm_register_base			= 0x01,
+	.led_control_register_base		= 0x26,
+	.enable_bits_per_led_control_register	= 1,
+};
+
+static const struct is31fl32xx_chipdef is31fl3236a_cdef = {
+	.channels				= 36,
+	.shutdown_reg				= 0x00,
+	.pwm_update_reg				= 0x25,
+	.global_control_reg			= 0x4a,
+	.reset_reg				= 0x4f,
+	.output_frequency_setting_reg		= 0x4b,
 	.pwm_register_base			= 0x01,
 	.led_control_register_base		= 0x26,
 	.enable_bits_per_led_control_register	= 1,
@@ -101,6 +118,7 @@ static const struct is31fl32xx_chipdef is31fl3235_cdef = {
 	.pwm_update_reg				= 0x25,
 	.global_control_reg			= 0x4a,
 	.reset_reg				= 0x4f,
+	.output_frequency_setting_reg		= IS31FL32XX_REG_NONE,
 	.pwm_register_base			= 0x05,
 	.led_control_register_base		= 0x2a,
 	.enable_bits_per_led_control_register	= 1,
@@ -112,6 +130,7 @@ static const struct is31fl32xx_chipdef is31fl3218_cdef = {
 	.pwm_update_reg				= 0x16,
 	.global_control_reg			= IS31FL32XX_REG_NONE,
 	.reset_reg				= 0x17,
+	.output_frequency_setting_reg		= IS31FL32XX_REG_NONE,
 	.pwm_register_base			= 0x01,
 	.led_control_register_base		= 0x13,
 	.enable_bits_per_led_control_register	= 6,
@@ -126,6 +145,7 @@ static const struct is31fl32xx_chipdef is31fl3216_cdef = {
 	.pwm_update_reg				= 0xB0,
 	.global_control_reg			= IS31FL32XX_REG_NONE,
 	.reset_reg				= IS31FL32XX_REG_NONE,
+	.output_frequency_setting_reg		= IS31FL32XX_REG_NONE,
 	.pwm_register_base			= 0x10,
 	.pwm_registers_reversed			= true,
 	.led_control_register_base		= 0x01,
@@ -363,8 +383,21 @@ static struct is31fl32xx_led_data *is31fl32xx_find_led_data(
 static int is31fl32xx_parse_dt(struct device *dev,
 			       struct is31fl32xx_priv *priv)
 {
+	const struct is31fl32xx_chipdef *cdef = priv->cdef;
 	int ret = 0;
 
+	if ((cdef->output_frequency_setting_reg != IS31FL32XX_REG_NONE) &&
+	    of_property_read_bool(dev_of_node(dev), "issi,22kHz-pwm")) {
+
+		ret = is31fl32xx_write(priv, cdef->output_frequency_setting_reg,
+				       IS31FL32XX_PWM_FREQUENCY_22kHz);
+
+		if (ret) {
+			dev_err(dev, "Failed to write output PWM frequency register\n");
+			return ret;
+		}
+	}
+
 	for_each_available_child_of_node_scoped(dev_of_node(dev), child) {
 		struct led_init_data init_data = {};
 		struct is31fl32xx_led_data *led_data =
@@ -404,12 +437,13 @@ static int is31fl32xx_parse_dt(struct device *dev,
 }
 
 static const struct of_device_id of_is31fl32xx_match[] = {
-	{ .compatible = "issi,is31fl3236", .data = &is31fl3236_cdef, },
-	{ .compatible = "issi,is31fl3235", .data = &is31fl3235_cdef, },
-	{ .compatible = "issi,is31fl3218", .data = &is31fl3218_cdef, },
-	{ .compatible = "si-en,sn3218",    .data = &is31fl3218_cdef, },
-	{ .compatible = "issi,is31fl3216", .data = &is31fl3216_cdef, },
-	{ .compatible = "si-en,sn3216",    .data = &is31fl3216_cdef, },
+	{ .compatible = "issi,is31fl3236",  .data = &is31fl3236_cdef, },
+	{ .compatible = "issi,is31fl3236a", .data = &is31fl3236a_cdef, },
+	{ .compatible = "issi,is31fl3235",  .data = &is31fl3235_cdef, },
+	{ .compatible = "issi,is31fl3218",  .data = &is31fl3218_cdef, },
+	{ .compatible = "si-en,sn3218",     .data = &is31fl3218_cdef, },
+	{ .compatible = "issi,is31fl3216",  .data = &is31fl3216_cdef, },
+	{ .compatible = "si-en,sn3216",     .data = &is31fl3216_cdef, },
 	{},
 };
 
@@ -466,6 +500,7 @@ static void is31fl32xx_remove(struct i2c_client *client)
  */
 static const struct i2c_device_id is31fl32xx_id[] = {
 	{ "is31fl3236" },
+	{ "is31fl3236a" },
 	{ "is31fl3235" },
 	{ "is31fl3218" },
 	{ "sn3218" },

-- 
2.48.1


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

* Re: [PATCH v4 1/3] dt-bindings: leds: is31fl32xx: convert the binding to yaml
  2025-07-17 15:02 ` [PATCH v4 1/3] dt-bindings: leds: is31fl32xx: convert the binding to yaml Pawel Zalewski
@ 2025-07-17 16:40   ` Rob Herring (Arm)
  2025-07-18  6:50     ` Pawel Zalewski
  2025-07-17 19:31   ` Rob Herring
  1 sibling, 1 reply; 9+ messages in thread
From: Rob Herring (Arm) @ 2025-07-17 16:40 UTC (permalink / raw)
  To: Pawel Zalewski
  Cc: Pavel Machek, Lucca Fachinetti, Conor Dooley, Pavel Machek,
	devicetree, linux-kernel, Krzysztof Kozlowski, Lee Jones,
	linux-leds


On Thu, 17 Jul 2025 16:02:07 +0100, Pawel Zalewski wrote:
> From: Lucca Fachinetti <luccafachinetti@gmail.com>
> 
> Add datasheets for reference, NB that I was not able to find an
> up-to-date, funtional direct URL for si-en products datasheet
> so they were skipped.
> 
> Signed-off-by: Lucca Fachinetti <luccafachinetti@gmail.com>
> Co-developed-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
> Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
> ---
>  .../devicetree/bindings/leds/issi,is31fl3236.yaml  | 114 +++++++++++++++++++++
>  .../devicetree/bindings/leds/leds-is31fl32xx.txt   |  52 ----------
>  2 files changed, 114 insertions(+), 52 deletions(-)
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/leds/issi,is31fl3236.example.dtb: led-controller@3c (issi,is31fl3236): 'led@1', 'led@2', 'led@3' do not match any of the regexes: '^led@[1-9a-f][0-9a-f]$', '^pinctrl-[0-9]+$'
	from schema $id: http://devicetree.org/schemas/leds/issi,is31fl3236.yaml#

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20250717-leds-is31fl3236a-v4-1-72ef946bfbc8@thegoodpenguin.co.uk

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


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

* Re: [PATCH v4 1/3] dt-bindings: leds: is31fl32xx: convert the binding to yaml
  2025-07-17 15:02 ` [PATCH v4 1/3] dt-bindings: leds: is31fl32xx: convert the binding to yaml Pawel Zalewski
  2025-07-17 16:40   ` Rob Herring (Arm)
@ 2025-07-17 19:31   ` Rob Herring
  2025-07-18  6:53     ` Pawel Zalewski
  1 sibling, 1 reply; 9+ messages in thread
From: Rob Herring @ 2025-07-17 19:31 UTC (permalink / raw)
  To: Pawel Zalewski
  Cc: Lee Jones, Pavel Machek, Krzysztof Kozlowski, Conor Dooley,
	linux-leds, linux-kernel, Pavel Machek, devicetree,
	Lucca Fachinetti

On Thu, Jul 17, 2025 at 04:02:07PM +0100, Pawel Zalewski wrote:
> From: Lucca Fachinetti <luccafachinetti@gmail.com>
> 
> Add datasheets for reference, NB that I was not able to find an
> up-to-date, funtional direct URL for si-en products datasheet
> so they were skipped.
> 
> Signed-off-by: Lucca Fachinetti <luccafachinetti@gmail.com>
> Co-developed-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
> Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
> ---
>  .../devicetree/bindings/leds/issi,is31fl3236.yaml  | 114 +++++++++++++++++++++
>  .../devicetree/bindings/leds/leds-is31fl32xx.txt   |  52 ----------
>  2 files changed, 114 insertions(+), 52 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/leds/issi,is31fl3236.yaml b/Documentation/devicetree/bindings/leds/issi,is31fl3236.yaml
> new file mode 100644
> index 0000000000000000000000000000000000000000..abcd4c448e94db1d1e339f7ee165c3e04a1d354d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/leds/issi,is31fl3236.yaml
> @@ -0,0 +1,114 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/leds/issi,is31fl3236.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: is31fl32xx and Si-En SN32xx IC LED driver
> +
> +maintainers:
> +  - Pavel Machek <pavel@ucw.cz>
> +  - Lee Jones <lee@kernel.org>
> +
> +description: |
> +  The is31fl32xx/SN32xx family of LED drivers are I2C devices with multiple
> +  constant-current channels, each with independent 256-level PWM control.
> +  Each LED is represented as a sub-node of the device.
> +
> +  For more product information please see the links below:
> +    https://www.lumissil.com/assets/pdf/core/IS31FL3236_DS.pdf
> +    https://www.lumissil.com/assets/pdf/core/IS31FL3236A_DS.pdf
> +    https://www.lumissil.com/assets/pdf/core/IS31FL3235_DS.pdf
> +    https://www.lumissil.com/assets/pdf/core/IS31FL3218_DS.pdf
> +    https://www.lumissil.com/assets/pdf/core/IS31FL3216_DS.pdf
> +
> +properties:
> +  compatible:
> +    enum:
> +      - issi,is31fl3236
> +      - issi,is31fl3236a
> +      - issi,is31fl3235
> +      - issi,is31fl3218
> +      - issi,is31fl3216
> +      - si-en,sn3218
> +      - si-en,sn3216
> +
> +  reg:
> +    maxItems: 1
> +
> +  "#address-cells":
> +    const: 1
> +
> +  "#size-cells":
> +    const: 0
> +
> +patternProperties:
> +  "^led@[1-9a-f][0-9a-f]$":
> +    type: object
> +    $ref: common.yaml#
> +    unevaluatedProperties: false
> +
> +    properties:
> +      reg:
> +        description:
> +          LED channel number (1..N)
> +        minimum: 0x1
> +        maximum: 0x24
> +
> +    required:
> +      - reg
> +
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - issi,is31fl3236
> +              - issi,is31fl3235
> +              - issi,is31fl3218
> +              - issi,is31fl3216
> +              - si-en,sn3218
> +              - si-en,sn3216
> +    then:
> +      properties:
> +        issi,22kHz-pwm: false

This is already false because you haven't defined the property anywhere. 
Though this property didn't exist in the existing binding, so why are 
you adding it (the commit msg needs an explanation)?

Rob

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

* Re: [PATCH v4 1/3] dt-bindings: leds: is31fl32xx: convert the binding to yaml
  2025-07-17 16:40   ` Rob Herring (Arm)
@ 2025-07-18  6:50     ` Pawel Zalewski
  2025-07-18  7:16       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 9+ messages in thread
From: Pawel Zalewski @ 2025-07-18  6:50 UTC (permalink / raw)
  To: Rob Herring (Arm)
  Cc: Pavel Machek, Lucca Fachinetti, Conor Dooley, Pavel Machek,
	devicetree, linux-kernel, Krzysztof Kozlowski, Lee Jones,
	linux-leds

> If you already ran 'make dt_binding_check' and didn't see the above
> error(s), then make sure 'yamllint' is installed and dt-schema is up to
> date

Hmm interesting, I did run it, have yamlint installed and see no
errors. Will upgrade dtschema and try again.

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

* Re: [PATCH v4 1/3] dt-bindings: leds: is31fl32xx: convert the binding to yaml
  2025-07-17 19:31   ` Rob Herring
@ 2025-07-18  6:53     ` Pawel Zalewski
  0 siblings, 0 replies; 9+ messages in thread
From: Pawel Zalewski @ 2025-07-18  6:53 UTC (permalink / raw)
  To: Rob Herring
  Cc: Lee Jones, Pavel Machek, Krzysztof Kozlowski, Conor Dooley,
	linux-leds, linux-kernel, Pavel Machek, devicetree,
	Lucca Fachinetti

> This is already false because you haven't defined the property anywhere.
> Though this property didn't exist in the existing binding, so why are
> you adding it (the commit msg needs an explanation)?

Ah forgot to rebase - this should really be in the next patch !

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

* Re: [PATCH v4 1/3] dt-bindings: leds: is31fl32xx: convert the binding to yaml
  2025-07-18  6:50     ` Pawel Zalewski
@ 2025-07-18  7:16       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2025-07-18  7:16 UTC (permalink / raw)
  To: Pawel Zalewski
  Cc: Rob Herring (Arm), Pavel Machek, Lucca Fachinetti, Conor Dooley,
	Pavel Machek, devicetree, linux-kernel, Krzysztof Kozlowski,
	Lee Jones, linux-leds

On Fri, Jul 18, 2025 at 07:50:51AM +0100, Pawel Zalewski wrote:
> > If you already ran 'make dt_binding_check' and didn't see the above
> > error(s), then make sure 'yamllint' is installed and dt-schema is up to
> > date
> 
> Hmm interesting, I did run it, have yamlint installed and see no
> errors. Will upgrade dtschema and try again.

Are you sure you tested patch #1 only?

Best regards,
Krzysztof


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

end of thread, other threads:[~2025-07-18  7:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-17 15:02 [PATCH v4 0/3] Add support for is31fl3236a LED controller Pawel Zalewski
2025-07-17 15:02 ` [PATCH v4 1/3] dt-bindings: leds: is31fl32xx: convert the binding to yaml Pawel Zalewski
2025-07-17 16:40   ` Rob Herring (Arm)
2025-07-18  6:50     ` Pawel Zalewski
2025-07-18  7:16       ` Krzysztof Kozlowski
2025-07-17 19:31   ` Rob Herring
2025-07-18  6:53     ` Pawel Zalewski
2025-07-17 15:02 ` [PATCH v4 2/3] dt-bindings: leds: issi,is31fl3236: add issi,22kHz-pwm property Pawel Zalewski
2025-07-17 15:02 ` [PATCH v4 3/3] leds/leds-is31fl32xx: add support for is31fl3236a Pawel Zalewski

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