devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/3] Add support for is31fl3236a LED controller
@ 2025-07-21 10:55 Pawel Zalewski
  2025-07-21 10:55 ` [PATCH v5 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-21 10:55 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

Changes in v5:
- dt-bindings: fixed typo in the regex expression
- dt-bindings: rebased patches to follow common sense
- Link to v4: https://lore.kernel.org/r/20250717-leds-is31fl3236a-v4-0-72ef946bfbc8@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 support for is31fl3236a
      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 v5 1/3] dt-bindings: leds: is31fl32xx: convert the binding to yaml
  2025-07-21 10:55 [PATCH v5 0/3] Add support for is31fl3236a LED controller Pawel Zalewski
@ 2025-07-21 10:55 ` Pawel Zalewski
  2025-07-21 11:16   ` Krzysztof Kozlowski
  2025-07-21 10:55 ` [PATCH v5 2/3] dt-bindings: leds: issi,is31fl3236: add support for is31fl3236a Pawel Zalewski
  2025-07-21 10:55 ` [PATCH v5 3/3] leds/leds-is31fl32xx: " Pawel Zalewski
  2 siblings, 1 reply; 9+ messages in thread
From: Pawel Zalewski @ 2025-07-21 10:55 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  | 96 ++++++++++++++++++++++
 .../devicetree/bindings/leds/leds-is31fl32xx.txt   | 52 ------------
 2 files changed, 96 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..d8164876611f5e629215fe2715ebff1745f93a26
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/issi,is31fl3236.yaml
@@ -0,0 +1,96 @@
+# 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/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,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
+
+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 v5 2/3] dt-bindings: leds: issi,is31fl3236: add support for is31fl3236a
  2025-07-21 10:55 [PATCH v5 0/3] Add support for is31fl3236a LED controller Pawel Zalewski
  2025-07-21 10:55 ` [PATCH v5 1/3] dt-bindings: leds: is31fl32xx: convert the binding to yaml Pawel Zalewski
@ 2025-07-21 10:55 ` Pawel Zalewski
  2025-07-21 11:16   ` Krzysztof Kozlowski
  2025-07-21 10:55 ` [PATCH v5 3/3] leds/leds-is31fl32xx: " Pawel Zalewski
  2 siblings, 1 reply; 9+ messages in thread
From: Pawel Zalewski @ 2025-07-21 10:55 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 that exists on is31fl3236a.
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>
---
 .../devicetree/bindings/leds/issi,is31fl3236.yaml  | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/Documentation/devicetree/bindings/leds/issi,is31fl3236.yaml b/Documentation/devicetree/bindings/leds/issi,is31fl3236.yaml
index d8164876611f5e629215fe2715ebff1745f93a26..58f5aa4d0b644fe550e2c48b141c41c37fdf98e9 100644
--- a/Documentation/devicetree/bindings/leds/issi,is31fl3236.yaml
+++ b/Documentation/devicetree/bindings/leds/issi,is31fl3236.yaml
@@ -17,6 +17,7 @@ description: |
 
   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
@@ -25,6 +26,7 @@ properties:
   compatible:
     enum:
       - issi,is31fl3236
+      - issi,is31fl3236a
       - issi,is31fl3235
       - issi,is31fl3218
       - issi,is31fl3216
@@ -40,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
@@ -56,6 +64,22 @@ patternProperties:
     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

-- 
2.48.1


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

* [PATCH v5 3/3] leds/leds-is31fl32xx: add support for is31fl3236a
  2025-07-21 10:55 [PATCH v5 0/3] Add support for is31fl3236a LED controller Pawel Zalewski
  2025-07-21 10:55 ` [PATCH v5 1/3] dt-bindings: leds: is31fl32xx: convert the binding to yaml Pawel Zalewski
  2025-07-21 10:55 ` [PATCH v5 2/3] dt-bindings: leds: issi,is31fl3236: add support for is31fl3236a Pawel Zalewski
@ 2025-07-21 10:55 ` Pawel Zalewski
  2 siblings, 0 replies; 9+ messages in thread
From: Pawel Zalewski @ 2025-07-21 10:55 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 v5 1/3] dt-bindings: leds: is31fl32xx: convert the binding to yaml
  2025-07-21 10:55 ` [PATCH v5 1/3] dt-bindings: leds: is31fl32xx: convert the binding to yaml Pawel Zalewski
@ 2025-07-21 11:16   ` Krzysztof Kozlowski
  2025-07-21 12:26     ` Pawel Zalewski
  0 siblings, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2025-07-21 11:16 UTC (permalink / raw)
  To: Pawel Zalewski, Lee Jones, Pavel Machek, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-leds, linux-kernel, Pavel Machek, devicetree,
	Lucca Fachinetti

On 21/07/2025 12:55, Pawel Zalewski wrote:
> +
> +properties:
> +  compatible:
> +    enum:
> +      - issi,is31fl3236
> +      - issi,is31fl3235
> +      - issi,is31fl3218
> +      - issi,is31fl3216

Keep alphabetical order.

> +      - si-en,sn3218
> +      - si-en,sn3216

Here as well.


> +
> +  reg:
> +    maxItems: 1
> +
> +  "#address-cells":
> +    const: 1
> +
> +  "#size-cells":
> +    const: 0
> +
> +patternProperties:
> +  "^led@[1-9a-f][0-9a-f]*$":

This still does not match min/max constraints. You already got the
comment on this and nothing improved.

> +    type: object
> +    $ref: common.yaml#
> +    unevaluatedProperties: false
> +
> +    properties:
> +      reg:
> +        description:
> +          LED channel number (1..N)
> +        minimum: 0x1
> +        maximum: 0x24

And these are supposed to be decimal.


Best regards,
Krzysztof

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

* Re: [PATCH v5 2/3] dt-bindings: leds: issi,is31fl3236: add support for is31fl3236a
  2025-07-21 10:55 ` [PATCH v5 2/3] dt-bindings: leds: issi,is31fl3236: add support for is31fl3236a Pawel Zalewski
@ 2025-07-21 11:16   ` Krzysztof Kozlowski
  2025-07-21 12:27     ` Pawel Zalewski
  0 siblings, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2025-07-21 11:16 UTC (permalink / raw)
  To: Pawel Zalewski, Lee Jones, Pavel Machek, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-leds, linux-kernel, Pavel Machek, devicetree

On 21/07/2025 12:55, Pawel Zalewski wrote:
> Add an additional and optional control property for setting
> the output PWM frequency to 22kHz that exists on is31fl3236a.
> 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>
> ---
>  .../devicetree/bindings/leds/issi,is31fl3236.yaml  | 24 ++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/leds/issi,is31fl3236.yaml b/Documentation/devicetree/bindings/leds/issi,is31fl3236.yaml
> index d8164876611f5e629215fe2715ebff1745f93a26..58f5aa4d0b644fe550e2c48b141c41c37fdf98e9 100644
> --- a/Documentation/devicetree/bindings/leds/issi,is31fl3236.yaml
> +++ b/Documentation/devicetree/bindings/leds/issi,is31fl3236.yaml
> @@ -17,6 +17,7 @@ description: |
>  
>    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
> @@ -25,6 +26,7 @@ properties:
>    compatible:
>      enum:
>        - issi,is31fl3236
> +      - issi,is31fl3236a
>        - issi,is31fl3235
>        - issi,is31fl3218
>        - issi,is31fl3216
> @@ -40,6 +42,12 @@ properties:
>    "#size-cells":
>      const: 0
>  
> +  issi,22kHz-pwm:

I never spotted it before, but this should be issi,22khz-pwm. No
properties use capital letters.

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


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof

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

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

> This still does not match min/max constraints. You already got the
> comment on this and nothing improved.

It was not clear to me what you are after, so you want the pattern to be:

^led@(?:[1-9a-f]|1[0-9a-f]|2[0-4])$

So the range of the unit@ string is controlled via the pattern
orthogonal to reg,
the range of the reg property explicitly via minimum/maximum which are decimal,
despite the fact that the reg itself can be a hex value, which is
preferred for readability
I suppose.

Kind regards,
Pawel

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

* Re: [PATCH v5 2/3] dt-bindings: leds: issi,is31fl3236: add support for is31fl3236a
  2025-07-21 11:16   ` Krzysztof Kozlowski
@ 2025-07-21 12:27     ` Pawel Zalewski
  0 siblings, 0 replies; 9+ messages in thread
From: Pawel Zalewski @ 2025-07-21 12:27 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Lee Jones, Pavel Machek, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-leds, linux-kernel, Pavel Machek, devicetree

> I never spotted it before, but this should be issi,22khz-pwm. No
> properties use capital letters.

Ah, noted.

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

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

On 21/07/2025 14:26, Pawel Zalewski wrote:
>> This still does not match min/max constraints. You already got the
>> comment on this and nothing improved.
> 
> It was not clear to me what you are after, so you want the pattern to be:
> 
> ^led@(?:[1-9a-f]|1[0-9a-f]|2[0-4])$

led@([1-9a-f]|1[0-9a-f]|2[0-4])$
should be enough


> 
> So the range of the unit@ string is controlled via the pattern
> orthogonal to reg,
> the range of the reg property explicitly via minimum/maximum which are decimal,
> despite the fact that the reg itself can be a hex value, which is
> preferred for readability

Yes, just write min/max decimal in the list. It's not an address, but index.

Best regards,
Krzysztof

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

end of thread, other threads:[~2025-07-21 12:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-21 10:55 [PATCH v5 0/3] Add support for is31fl3236a LED controller Pawel Zalewski
2025-07-21 10:55 ` [PATCH v5 1/3] dt-bindings: leds: is31fl32xx: convert the binding to yaml Pawel Zalewski
2025-07-21 11:16   ` Krzysztof Kozlowski
2025-07-21 12:26     ` Pawel Zalewski
2025-07-21 12:34       ` Krzysztof Kozlowski
2025-07-21 10:55 ` [PATCH v5 2/3] dt-bindings: leds: issi,is31fl3236: add support for is31fl3236a Pawel Zalewski
2025-07-21 11:16   ` Krzysztof Kozlowski
2025-07-21 12:27     ` Pawel Zalewski
2025-07-21 10:55 ` [PATCH v5 3/3] leds/leds-is31fl32xx: " 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).