diff options
| author | Tom Rini <[email protected]> | 2025-02-07 10:53:43 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-02-07 11:39:24 -0600 |
| commit | 7a20c89bd05155675bd9f316c4cffc36961f1070 (patch) | |
| tree | 1f438dd275380cd515a1951b29071eea51deb74a /include/led.h | |
| parent | c2e00482d0058908014014b1c703e0eaaf1490d7 (diff) | |
| parent | 592b6f394aeb2c9eec47a70b7b1fc0e5108cfa90 (diff) | |
Merge patch series "led: add function naming option from linux"
Heiko Schocher <[email protected]> says:
In linux we have the option to create the name of a led
optionally through the following properties:
- function
- color
- function-enumerator
This series adds support for parsing this properties if there
is no label property.
Link: https://lore.kernel.org/r/[email protected]
[trini: Document name parameter in led.h]
Diffstat (limited to 'include/led.h')
| -rw-r--r-- | include/led.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/led.h b/include/led.h index 64247cd3a70..2a7f38bf84b 100644 --- a/include/led.h +++ b/include/led.h @@ -53,6 +53,11 @@ struct udevice; +/* + * value imported from linux:include/linux/uapi/linux/uleds.h + */ +#define LED_MAX_NAME_SIZE 64 + enum led_state_t { LEDST_OFF = 0, LEDST_ON = 1, @@ -81,11 +86,14 @@ struct led_sw_blink { * * @label: LED label * @default_state: LED default state + * @name: LED name, derived from function, color or function-enumerator + * property. * @sw_blink: LED software blink struct */ struct led_uc_plat { const char *label; enum led_state_t default_state; + char name[LED_MAX_NAME_SIZE]; #ifdef CONFIG_LED_SW_BLINK struct led_sw_blink *sw_blink; #endif |
