Message ID | 20201210082449.30586-1-manivannan.sadhasivam@linaro.org |
---|---|
State | New |
Headers | show |
Series | [v2] dt-bindings: leds: Document commonly used LED triggers | expand |
On 2020/12/10 16:24, Manivannan Sadhasivam wrote: > This commit documents the LED triggers used commonly in the SoCs. Not > all triggers are documented as some of them are very application specific. > Most of the triggers documented here are currently used in devicetrees > of many SoCs. > > While at it, let's also sort the triggers in ascending order. > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> > --- > > Changes in v2: > > * Added more triggers, fixed the regex > * Sorted triggers in ascending order > > .../devicetree/bindings/leds/common.yaml | 78 ++++++++++++++----- > 1 file changed, 60 insertions(+), 18 deletions(-) > > diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documentation/devicetree/bindings/leds/common.yaml > index f1211e7045f1..3c2e2208c1da 100644 > --- a/Documentation/devicetree/bindings/leds/common.yaml > +++ b/Documentation/devicetree/bindings/leds/common.yaml > @@ -79,24 +79,66 @@ properties: > the LED. > $ref: /schemas/types.yaml#definitions/string > > - enum: > - # LED will act as a back-light, controlled by the framebuffer system > - - backlight > - # LED will turn on (but for leds-gpio see "default-state" property in > - # Documentation/devicetree/bindings/leds/leds-gpio.yaml) > - - default-on > - # LED "double" flashes at a load average based rate > - - heartbeat > - # LED indicates disk activity > - - disk-activity > - # LED indicates IDE disk activity (deprecated), in new implementations > - # use "disk-activity" > - - ide-disk > - # LED flashes at a fixed, configurable rate > - - timer > - # LED alters the brightness for the specified duration with one software > - # timer (requires "led-pattern" property) > - - pattern > + oneOf: > + - items: > + - enum: > + # LED indicates mic mute state > + - audio-micmute > + # LED indicates audio mute state > + - audio-mute > + # LED will act as a back-light, controlled by the framebuffer system > + - backlight > + # LED indicates bluetooth power state > + - bluetooth-power > + # LED indicates activity of all CPUs > + - cpu > + # LED will turn on (but for leds-gpio see "default-state" property in > + # Documentation/devicetree/bindings/leds/leds-gpio.yaml) > + - default-on > + # LED indicates disk activity > + - disk-activity > + # LED indicates disk read activity > + - disk-read > + # LED indicates disk write activity > + - disk-write > + # LED indicates camera flash state > + - flash > + # LED "double" flashes at a load average based rate > + - heartbeat > + # LED indicates IDE disk activity (deprecated), in new implementations > + # use "disk-activity" > + - ide-disk > + # LED indicates MTD memory activity > + - mtd > + # LED indicates NAND memory activity (deprecated), > + # in new implementations use "mtd" > + - nand-disk > + # No trigger assigned to the LED. This is the default mode > + # if trigger is absent > + - none > + # LED alters the brightness for the specified duration with one software > + # timer (requires "led-pattern" property) > + - pattern > + # LED flashes at a fixed, configurable rate > + - timer > + # LED indicates camera torch state > + - torch > + # LED indicates USB gadget activity > + - usb-gadget > + # LED indicates USB host activity > + - usb-host > + - items: > + # LED indicates activity of [N]th CPU > + - pattern: "^cpu[0-9]{1,2}$" > + - items: > + # LED indicates power status of [N]th Bluetooth HCI device > + - pattern: "^hci[0-9]{1,2}-power$" > + - items: > + # LED indicates [N]th MMC storage activity > + - pattern: "^mmc[0-9]{1,2}$" > + - items: > + # LED indicates [N]th WLAN Tx activity > + - pattern: "^phy[0-9]{1,2}tx$" Only the last three are not listed: phy0rx ir-power-click ir-user-click And the first one is easily supported by: - # LED indicates [N]th WLAN Tx activity - - pattern: "^phy[0-9]{1,2}tx$" + # LED indicates [N]th WLAN Tx/Rx activity + - pattern: "^phy[0-9]{1,2}(tx|rx)$" Tested-by: Zhen Lei <thunder.leizhen@huawei.com> > > led-pattern: > description: | >
On 2020/12/13 10:39, Leizhen (ThunderTown) wrote: > > > On 2020/12/10 16:24, Manivannan Sadhasivam wrote: >> This commit documents the LED triggers used commonly in the SoCs. Not >> all triggers are documented as some of them are very application specific. >> Most of the triggers documented here are currently used in devicetrees >> of many SoCs. >> >> While at it, let's also sort the triggers in ascending order. >> >> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> >> --- >> >> Changes in v2: >> >> * Added more triggers, fixed the regex >> * Sorted triggers in ascending order >> >> .../devicetree/bindings/leds/common.yaml | 78 ++++++++++++++----- >> 1 file changed, 60 insertions(+), 18 deletions(-) >> >> diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documentation/devicetree/bindings/leds/common.yaml >> index f1211e7045f1..3c2e2208c1da 100644 >> --- a/Documentation/devicetree/bindings/leds/common.yaml >> +++ b/Documentation/devicetree/bindings/leds/common.yaml >> @@ -79,24 +79,66 @@ properties: >> the LED. >> $ref: /schemas/types.yaml#definitions/string >> >> - enum: >> - # LED will act as a back-light, controlled by the framebuffer system >> - - backlight >> - # LED will turn on (but for leds-gpio see "default-state" property in >> - # Documentation/devicetree/bindings/leds/leds-gpio.yaml) >> - - default-on >> - # LED "double" flashes at a load average based rate >> - - heartbeat >> - # LED indicates disk activity >> - - disk-activity >> - # LED indicates IDE disk activity (deprecated), in new implementations >> - # use "disk-activity" >> - - ide-disk >> - # LED flashes at a fixed, configurable rate >> - - timer >> - # LED alters the brightness for the specified duration with one software >> - # timer (requires "led-pattern" property) >> - - pattern >> + oneOf: >> + - items: >> + - enum: >> + # LED indicates mic mute state >> + - audio-micmute >> + # LED indicates audio mute state >> + - audio-mute >> + # LED will act as a back-light, controlled by the framebuffer system >> + - backlight >> + # LED indicates bluetooth power state >> + - bluetooth-power >> + # LED indicates activity of all CPUs >> + - cpu >> + # LED will turn on (but for leds-gpio see "default-state" property in >> + # Documentation/devicetree/bindings/leds/leds-gpio.yaml) >> + - default-on >> + # LED indicates disk activity >> + - disk-activity >> + # LED indicates disk read activity >> + - disk-read >> + # LED indicates disk write activity >> + - disk-write >> + # LED indicates camera flash state >> + - flash >> + # LED "double" flashes at a load average based rate >> + - heartbeat >> + # LED indicates IDE disk activity (deprecated), in new implementations >> + # use "disk-activity" >> + - ide-disk >> + # LED indicates MTD memory activity >> + - mtd >> + # LED indicates NAND memory activity (deprecated), >> + # in new implementations use "mtd" >> + - nand-disk >> + # No trigger assigned to the LED. This is the default mode >> + # if trigger is absent >> + - none >> + # LED alters the brightness for the specified duration with one software >> + # timer (requires "led-pattern" property) >> + - pattern >> + # LED flashes at a fixed, configurable rate >> + - timer >> + # LED indicates camera torch state >> + - torch >> + # LED indicates USB gadget activity >> + - usb-gadget >> + # LED indicates USB host activity >> + - usb-host >> + - items: >> + # LED indicates activity of [N]th CPU >> + - pattern: "^cpu[0-9]{1,2}$" >> + - items: >> + # LED indicates power status of [N]th Bluetooth HCI device >> + - pattern: "^hci[0-9]{1,2}-power$" >> + - items: >> + # LED indicates [N]th MMC storage activity >> + - pattern: "^mmc[0-9]{1,2}$" >> + - items: >> + # LED indicates [N]th WLAN Tx activity >> + - pattern: "^phy[0-9]{1,2}tx$" > > Only the last three are not listed: > phy0rx > ir-power-click > ir-user-click I don't know if you're familiar with these two triggers. You can also consider leaving it to the owner of the corresponding module to update. Because I just found out there are a lot of unlisted triggers on arm32. > > And the first one is easily supported by: > - # LED indicates [N]th WLAN Tx activity > - - pattern: "^phy[0-9]{1,2}tx$" > + # LED indicates [N]th WLAN Tx/Rx activity > + - pattern: "^phy[0-9]{1,2}(tx|rx)$" > > Tested-by: Zhen Lei <thunder.leizhen@huawei.com> > >> >> led-pattern: >> description: | >>
On Mon 2020-12-14 16:36:21, Rob Herring wrote: > On Thu, Dec 10, 2020 at 01:54:49PM +0530, Manivannan Sadhasivam wrote: > > This commit documents the LED triggers used commonly in the SoCs. Not > > all triggers are documented as some of them are very application specific. > > Most of the triggers documented here are currently used in devicetrees > > of many SoCs. > > The idea with recent LED binding changes is to move away from > 'linux,default-trigger' to 'function' and 'trigger-sources' and to have > some sort of standardized names. Yes, but I guess we still want to document this... and perhaps use it during transition and when trigger-sources (etc) are too hard to set up. Best regards, Pavel
Hi Manivannan: Do you have time to prepare v3? Hope it can be applied into v5.12 On 2020/12/15 6:36, Rob Herring wrote: > On Thu, Dec 10, 2020 at 01:54:49PM +0530, Manivannan Sadhasivam wrote: >> This commit documents the LED triggers used commonly in the SoCs. Not >> all triggers are documented as some of them are very application specific. >> Most of the triggers documented here are currently used in devicetrees >> of many SoCs. > > The idea with recent LED binding changes is to move away from > 'linux,default-trigger' to 'function' and 'trigger-sources' and to have > some sort of standardized names. > >> >> While at it, let's also sort the triggers in ascending order. > > I'm not sure we want that. Probably better to keep related functions > together. > >> >> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> >> --- >> >> Changes in v2: >> >> * Added more triggers, fixed the regex >> * Sorted triggers in ascending order >> >> .../devicetree/bindings/leds/common.yaml | 78 ++++++++++++++----- >> 1 file changed, 60 insertions(+), 18 deletions(-) >> >> diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documentation/devicetree/bindings/leds/common.yaml >> index f1211e7045f1..3c2e2208c1da 100644 >> --- a/Documentation/devicetree/bindings/leds/common.yaml >> +++ b/Documentation/devicetree/bindings/leds/common.yaml
diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documentation/devicetree/bindings/leds/common.yaml index f1211e7045f1..3c2e2208c1da 100644 --- a/Documentation/devicetree/bindings/leds/common.yaml +++ b/Documentation/devicetree/bindings/leds/common.yaml @@ -79,24 +79,66 @@ properties: the LED. $ref: /schemas/types.yaml#definitions/string - enum: - # LED will act as a back-light, controlled by the framebuffer system - - backlight - # LED will turn on (but for leds-gpio see "default-state" property in - # Documentation/devicetree/bindings/leds/leds-gpio.yaml) - - default-on - # LED "double" flashes at a load average based rate - - heartbeat - # LED indicates disk activity - - disk-activity - # LED indicates IDE disk activity (deprecated), in new implementations - # use "disk-activity" - - ide-disk - # LED flashes at a fixed, configurable rate - - timer - # LED alters the brightness for the specified duration with one software - # timer (requires "led-pattern" property) - - pattern + oneOf: + - items: + - enum: + # LED indicates mic mute state + - audio-micmute + # LED indicates audio mute state + - audio-mute + # LED will act as a back-light, controlled by the framebuffer system + - backlight + # LED indicates bluetooth power state + - bluetooth-power + # LED indicates activity of all CPUs + - cpu + # LED will turn on (but for leds-gpio see "default-state" property in + # Documentation/devicetree/bindings/leds/leds-gpio.yaml) + - default-on + # LED indicates disk activity + - disk-activity + # LED indicates disk read activity + - disk-read + # LED indicates disk write activity + - disk-write + # LED indicates camera flash state + - flash + # LED "double" flashes at a load average based rate + - heartbeat + # LED indicates IDE disk activity (deprecated), in new implementations + # use "disk-activity" + - ide-disk + # LED indicates MTD memory activity + - mtd + # LED indicates NAND memory activity (deprecated), + # in new implementations use "mtd" + - nand-disk + # No trigger assigned to the LED. This is the default mode + # if trigger is absent + - none + # LED alters the brightness for the specified duration with one software + # timer (requires "led-pattern" property) + - pattern + # LED flashes at a fixed, configurable rate + - timer + # LED indicates camera torch state + - torch + # LED indicates USB gadget activity + - usb-gadget + # LED indicates USB host activity + - usb-host + - items: + # LED indicates activity of [N]th CPU + - pattern: "^cpu[0-9]{1,2}$" + - items: + # LED indicates power status of [N]th Bluetooth HCI device + - pattern: "^hci[0-9]{1,2}-power$" + - items: + # LED indicates [N]th MMC storage activity + - pattern: "^mmc[0-9]{1,2}$" + - items: + # LED indicates [N]th WLAN Tx activity + - pattern: "^phy[0-9]{1,2}tx$" led-pattern: description: |
This commit documents the LED triggers used commonly in the SoCs. Not all triggers are documented as some of them are very application specific. Most of the triggers documented here are currently used in devicetrees of many SoCs. While at it, let's also sort the triggers in ascending order. Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> --- Changes in v2: * Added more triggers, fixed the regex * Sorted triggers in ascending order .../devicetree/bindings/leds/common.yaml | 78 ++++++++++++++----- 1 file changed, 60 insertions(+), 18 deletions(-) -- 2.25.1