* [PATCH v2 0/3] Add support for is31fl3236a LED controller @ 2025-06-27 10:20 Pawel Zalewski 2025-06-27 10:20 ` [PATCH v2 1/3] leds/leds-is31fl32xx: add support for is31fl3236a Pawel Zalewski ` (2 more replies) 0 siblings, 3 replies; 9+ messages in thread From: Pawel Zalewski @ 2025-06-27 10:20 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 Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk> --- Lucca Fachinetti (1): dt-bindings: leds: is31fl32xx: convert the binding to yaml Pawel Zalewski (2): leds/leds-is31fl32xx: add support for is31fl3236a dt-bindings: leds: is31fl3236: add issi,22kHz-pwm property .../devicetree/bindings/leds/leds-is31fl3236.yaml | 107 +++++++++++++++++++++ .../devicetree/bindings/leds/leds-is31fl32xx.txt | 52 ---------- drivers/leds/leds-is31fl32xx.c | 35 +++++++ 3 files changed, 142 insertions(+), 52 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 v2 1/3] leds/leds-is31fl32xx: add support for is31fl3236a 2025-06-27 10:20 [PATCH v2 0/3] Add support for is31fl3236a LED controller Pawel Zalewski @ 2025-06-27 10:20 ` Pawel Zalewski 2025-07-02 16:22 ` Lee Jones 2025-06-27 10:20 ` [PATCH v2 2/3] dt-bindings: leds: is31fl32xx: convert the binding to yaml Pawel Zalewski 2025-06-27 10:20 ` [PATCH v2 3/3] dt-bindings: leds: is31fl3236: add issi,22kHz-pwm property Pawel Zalewski 2 siblings, 1 reply; 9+ messages in thread From: Pawel Zalewski @ 2025-06-27 10:20 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 | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/drivers/leds/leds-is31fl32xx.c b/drivers/leds/leds-is31fl32xx.c index 8793330dd4142f49f15d6ee9d87468c08509859f..b3f25854f97eac0f87c5be762b1d8e3afaaecc21 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 = @@ -405,6 +438,7 @@ 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,is31fl3236a", .data = &is31fl3236a_cdef, }, { .compatible = "issi,is31fl3235", .data = &is31fl3235_cdef, }, { .compatible = "issi,is31fl3218", .data = &is31fl3218_cdef, }, { .compatible = "si-en,sn3218", .data = &is31fl3218_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 v2 1/3] leds/leds-is31fl32xx: add support for is31fl3236a 2025-06-27 10:20 ` [PATCH v2 1/3] leds/leds-is31fl32xx: add support for is31fl3236a Pawel Zalewski @ 2025-07-02 16:22 ` Lee Jones 2025-07-03 16:19 ` Pawel Zalewski [not found] ` <CAA6zWZ+5rr_wa6zqQvqKc7F=j4aVgJkL9c-9gFSjQ+0CkQx4bA@mail.gmail.com> 0 siblings, 2 replies; 9+ messages in thread From: Lee Jones @ 2025-07-02 16:22 UTC (permalink / raw) To: Pawel Zalewski Cc: Pavel Machek, Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-leds, linux-kernel, Pavel Machek, devicetree On Fri, 27 Jun 2025, Pawel Zalewski wrote: > 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 | 35 +++++++++++++++++++++++++++++++++++ > 1 file changed, 35 insertions(+) So close! > diff --git a/drivers/leds/leds-is31fl32xx.c b/drivers/leds/leds-is31fl32xx.c > index 8793330dd4142f49f15d6ee9d87468c08509859f..b3f25854f97eac0f87c5be762b1d8e3afaaecc21 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")) { This needs tabbing in. > + > + ret = is31fl32xx_write(priv, cdef->output_frequency_setting_reg, > + IS31FL32XX_PWM_FREQUENCY_22kHz); > + This should line-up with the '(. > + 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 = > @@ -405,6 +438,7 @@ 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,is31fl3236a", .data = &is31fl3236a_cdef, }, > { .compatible = "issi,is31fl3235", .data = &is31fl3235_cdef, }, > { .compatible = "issi,is31fl3218", .data = &is31fl3218_cdef, }, > { .compatible = "si-en,sn3218", .data = &is31fl3218_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 > -- Lee Jones [李琼斯] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/3] leds/leds-is31fl32xx: add support for is31fl3236a 2025-07-02 16:22 ` Lee Jones @ 2025-07-03 16:19 ` Pawel Zalewski [not found] ` <CAA6zWZ+5rr_wa6zqQvqKc7F=j4aVgJkL9c-9gFSjQ+0CkQx4bA@mail.gmail.com> 1 sibling, 0 replies; 9+ messages in thread From: Pawel Zalewski @ 2025-07-03 16:19 UTC (permalink / raw) To: Lee Jones Cc: Pavel Machek, Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-leds, linux-kernel, Pavel Machek, devicetree > So close! :) > This should line-up with the '(. Spacebar to the rescue it is then. ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <CAA6zWZ+5rr_wa6zqQvqKc7F=j4aVgJkL9c-9gFSjQ+0CkQx4bA@mail.gmail.com>]
* Re: [PATCH v2 1/3] leds/leds-is31fl32xx: add support for is31fl3236a [not found] ` <CAA6zWZ+5rr_wa6zqQvqKc7F=j4aVgJkL9c-9gFSjQ+0CkQx4bA@mail.gmail.com> @ 2025-07-10 8:26 ` Lee Jones 0 siblings, 0 replies; 9+ messages in thread From: Lee Jones @ 2025-07-10 8:26 UTC (permalink / raw) To: Pawel Zalewski Cc: Pavel Machek, Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-leds, linux-kernel, Pavel Machek, devicetree On Thu, 03 Jul 2025, Pawel Zalewski wrote: > > So close! > :) > > > This should line-up with the '(. > > Spacebar to the rescue it is then. Your editor should be set-up to do this for you. If not, yes, spaces can follow tabs, but not the other way around. -- Lee Jones [李琼斯] ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 2/3] dt-bindings: leds: is31fl32xx: convert the binding to yaml 2025-06-27 10:20 [PATCH v2 0/3] Add support for is31fl3236a LED controller Pawel Zalewski 2025-06-27 10:20 ` [PATCH v2 1/3] leds/leds-is31fl32xx: add support for is31fl3236a Pawel Zalewski @ 2025-06-27 10:20 ` Pawel Zalewski 2025-06-30 22:19 ` Rob Herring 2025-06-30 22:21 ` Rob Herring 2025-06-27 10:20 ` [PATCH v2 3/3] dt-bindings: leds: is31fl3236: add issi,22kHz-pwm property Pawel Zalewski 2 siblings, 2 replies; 9+ messages in thread From: Pawel Zalewski @ 2025-06-27 10:20 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> Keep the old maintainers field as is. 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. Co-developed-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk> Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk> Signed-off-by: Lucca Fachinetti <luccafachinetti@gmail.com> --- .../devicetree/bindings/leds/leds-is31fl3236.yaml | 101 +++++++++++++++++++++ .../devicetree/bindings/leds/leds-is31fl32xx.txt | 52 ----------- 2 files changed, 101 insertions(+), 52 deletions(-) diff --git a/Documentation/devicetree/bindings/leds/leds-is31fl3236.yaml b/Documentation/devicetree/bindings/leds/leds-is31fl3236.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f26340850647d1c642fb345b7cf90764200e13ee --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-is31fl3236.yaml @@ -0,0 +1,101 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/leds-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-9][0-9]*$": + type: object + $ref: common.yaml# + additionalProperties: false + + properties: + reg: + minItems: 1 + description: + LED channel number (1..N) + + label: true + + linux,default-trigger: true + + 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>; + + s31fl3236: 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@3 { + reg = <3>; + label = "EB:blue:usr35"; + }; + }; + }; +... + 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
* Re: [PATCH v2 2/3] dt-bindings: leds: is31fl32xx: convert the binding to yaml 2025-06-27 10:20 ` [PATCH v2 2/3] dt-bindings: leds: is31fl32xx: convert the binding to yaml Pawel Zalewski @ 2025-06-30 22:19 ` Rob Herring 2025-06-30 22:21 ` Rob Herring 1 sibling, 0 replies; 9+ messages in thread From: Rob Herring @ 2025-06-30 22:19 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 Fri, Jun 27, 2025 at 11:20:36AM +0100, Pawel Zalewski wrote: > From: Lucca Fachinetti <luccafachinetti@gmail.com> > > Keep the old maintainers field as is. > 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. > > Co-developed-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk> > Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk> As the sender of the patches, your tags go last. > Signed-off-by: Lucca Fachinetti <luccafachinetti@gmail.com> > --- > .../devicetree/bindings/leds/leds-is31fl3236.yaml | 101 +++++++++++++++++++++ > .../devicetree/bindings/leds/leds-is31fl32xx.txt | 52 ----------- > 2 files changed, 101 insertions(+), 52 deletions(-) > > diff --git a/Documentation/devicetree/bindings/leds/leds-is31fl3236.yaml b/Documentation/devicetree/bindings/leds/leds-is31fl3236.yaml > new file mode 100644 > index 0000000000000000000000000000000000000000..f26340850647d1c642fb345b7cf90764200e13ee > --- /dev/null > +++ b/Documentation/devicetree/bindings/leds/leds-is31fl3236.yaml > @@ -0,0 +1,101 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/leds/leds-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-9][0-9]*$": Unit address should be hex. > + type: object > + $ref: common.yaml# > + additionalProperties: false unevaluatedProperties: false That allows other properties from common.yaml which you should allow IMO. > + > + properties: > + reg: > + minItems: 1 maxItems: 1 Is there a known maximum number? If so, add 'maximum'. > + description: > + LED channel number (1..N) > + > + label: true > + > + linux,default-trigger: true And drop these 2. > + > + 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>; > + > + s31fl3236: led-controller@3c { Drop unused labels. > + compatible = "issi,is31fl3236"; You indented 4 and then 2 here. Indent by 4 for each level. > + 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@3 { > + reg = <3>; > + label = "EB:blue:usr35"; > + }; > + }; > + }; > +... > + ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/3] dt-bindings: leds: is31fl32xx: convert the binding to yaml 2025-06-27 10:20 ` [PATCH v2 2/3] dt-bindings: leds: is31fl32xx: convert the binding to yaml Pawel Zalewski 2025-06-30 22:19 ` Rob Herring @ 2025-06-30 22:21 ` Rob Herring 1 sibling, 0 replies; 9+ messages in thread From: Rob Herring @ 2025-06-30 22:21 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 Fri, Jun 27, 2025 at 11:20:36AM +0100, Pawel Zalewski wrote: > From: Lucca Fachinetti <luccafachinetti@gmail.com> > > Keep the old maintainers field as is. > 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. > > Co-developed-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk> > Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk> > Signed-off-by: Lucca Fachinetti <luccafachinetti@gmail.com> > --- > .../devicetree/bindings/leds/leds-is31fl3236.yaml | 101 +++++++++++++++++++++ Also, not quite the compatible for filename: issi,is31fl3236.yaml > .../devicetree/bindings/leds/leds-is31fl32xx.txt | 52 ----------- > 2 files changed, 101 insertions(+), 52 deletions(-) ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 3/3] dt-bindings: leds: is31fl3236: add issi,22kHz-pwm property 2025-06-27 10:20 [PATCH v2 0/3] Add support for is31fl3236a LED controller Pawel Zalewski 2025-06-27 10:20 ` [PATCH v2 1/3] leds/leds-is31fl32xx: add support for is31fl3236a Pawel Zalewski 2025-06-27 10:20 ` [PATCH v2 2/3] dt-bindings: leds: is31fl32xx: convert the binding to yaml Pawel Zalewski @ 2025-06-27 10:20 ` Pawel Zalewski 2 siblings, 0 replies; 9+ messages in thread From: Pawel Zalewski @ 2025-06-27 10:20 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/leds-is31fl3236.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/leds/leds-is31fl3236.yaml b/Documentation/devicetree/bindings/leds/leds-is31fl3236.yaml index f26340850647d1c642fb345b7cf90764200e13ee..cea93f4d8fe0bcc80d6932be1f346bad321bcd38 100644 --- a/Documentation/devicetree/bindings/leds/leds-is31fl3236.yaml +++ b/Documentation/devicetree/bindings/leds/leds-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-9][0-9]*$": type: object -- 2.48.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2025-07-10 8:26 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-06-27 10:20 [PATCH v2 0/3] Add support for is31fl3236a LED controller Pawel Zalewski 2025-06-27 10:20 ` [PATCH v2 1/3] leds/leds-is31fl32xx: add support for is31fl3236a Pawel Zalewski 2025-07-02 16:22 ` Lee Jones 2025-07-03 16:19 ` Pawel Zalewski [not found] ` <CAA6zWZ+5rr_wa6zqQvqKc7F=j4aVgJkL9c-9gFSjQ+0CkQx4bA@mail.gmail.com> 2025-07-10 8:26 ` Lee Jones 2025-06-27 10:20 ` [PATCH v2 2/3] dt-bindings: leds: is31fl32xx: convert the binding to yaml Pawel Zalewski 2025-06-30 22:19 ` Rob Herring 2025-06-30 22:21 ` Rob Herring 2025-06-27 10:20 ` [PATCH v2 3/3] dt-bindings: leds: is31fl3236: add issi,22kHz-pwm property 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).