misc: ti_fpc202: Add LED support
Romain Gantois
maintainerv3 cover misc: ti_fpc202: Add LED support
Hi everyone,
This series depends on "misc: ti_fpc202: two small fixes" by Felix Gu:
https://lore.kernel.org/all/[email protected]/
The FPC202 dual port controller features eight special-purpose ports which are meant to drive LEDs. These support PWM and blink offloading.
This is version three of my series which adds support for these special-purpose LED ports.
Best Regards,
Romain
---
Changes in v3:
- Described LED line unit adresses in hexadecimal instead of decimal
- Made LED "label" property optional
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- Avoided selecting foreign subsystems in Kconfig
- Rebased on conflicting bugfix series
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Romain Gantois (3):
misc: ti_fpc202: Depend on GPIOLIB instead of selecting it
dt-bindings: misc: Describe FPC202 LED features
misc: ti_fpc202: Support special-purpose GPIO lines with LED features
.../devicetree/bindings/misc/ti,fpc202.yaml | 21 ++ drivers/misc/Kconfig | 3 +- drivers/misc/ti_fpc202.c | 339 ++++++++++++++++++++- 3 files changed, 349 insertions(+), 14 deletions(-)
---
base-commit: f552b769213459b62c976d3b380e7e0030af1920
change-id: 20260126-fpc202-leds-53def6ce751e
Best regards,
Signature · 1 line
Romain Gantois <[email protected]>
Romain Gantois
maintainerPATCH v3 1/3 misc: ti_fpc202: Depend on GPIOLIB instead of selecting it
Selecting a foreign subsystem such as GPIOLIB may lead to dependency loops. Use a "depends on" instead.
--- drivers/misc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/Kconfig +1 -1
@@ -116,7 +116,7 @@ config RPMB config TI_FPC202 tristate "TI FPC202 Dual Port Controller" depends on I2C - select GPIOLIB + depends on GPIOLIB select I2C_ATR help If you say yes here you get support for the Texas Instruments FPC202
Signature · 1 line
2.53.0
Romain Gantois
maintainerPATCH v3 2/3 dt-bindings: misc: Describe FPC202 LED features
In reply to Romain GantoisThe FPC202 dual port controller has 20 regular GPIO lines and 8 special GPIO lines with LED features. Each one of these "LED GPIOs" can output PWM and blink signals.
Describe these special-purpose GPIO lines.
--- .../devicetree/bindings/misc/ti,fpc202.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
Documentation/devicetree/bindings/misc/ti,fpc202.yaml +21 -0
@@ -53,6 +53,22 @@ patternProperties: unevaluatedProperties: false + "^led@1[4-b]$": + $ref: /schemas/leds/common.yaml# + description: Output GPIO line with advanced LED features enabled. + + properties: + reg: + minimum: 0x14 + maximum: 0x1b + description: + GPIO line ID + + required: + - reg + + unevaluatedProperties: false + required: - compatible - reg
@@ -89,6 +105,11 @@ examples: #size-cells = <0>; reg = <1>; }; + + led@14 { + reg = <0x14>; + label = "phy0:green:indicator"; + }; }; }; ...
Signature · 1 line
2.53.0
Romain Gantois
maintainerPATCH v3 3/3 misc: ti_fpc202: Support special-purpose GPIO lines with LED features
In reply to Romain GantoisThe FPC202 dual port controller has 20 regular GPIO lines and 8 special GPIO lines with LED features. Each one of these "LED GPIOs" can output PWM and blink signals.
Add support for the eight special-purpose GPIO lines to the existing FPC202 driver's GPIO support. Add support for registering led-class devices on these GPIO lines.
--- drivers/misc/Kconfig | 1 + drivers/misc/ti_fpc202.c | 339 +++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 327 insertions(+), 13 deletions(-)
drivers/misc/Kconfig +1 -0
@@ -117,6 +117,7 @@ config TI_FPC202 tristate "TI FPC202 Dual Port Controller" depends on I2C depends on GPIOLIB + depends on LEDS_CLASS select I2C_ATR help If you say yes here you get support for the Texas Instruments FPC202
drivers/misc/ti_fpc202.c +326 -13
477 lines not on this page · raw message
Signature · 1 line
2.53.0