2023-01-31 14:03:21

by Corentin LABBE

[permalink] [raw]
Subject: [PATCH v5 1/2] dt-bindings: leds: common: add disk write/read and usb-host/usb-gadget

The triggers enum misses 3 cases used by gemini DT.
usb-host was added via commit 0cfbd328d60f ("usb: Add LED triggers for USB activity")
so we add also as valid trigger usb-gadget which was added along in this
commit.

disk-read/disk-write were added by commit d1ed7c558612 ("leds: Extends disk trigger for reads and writes")
Reviewed-by: Linus Walleij <[email protected]>
Acked-by: Rob Herring <[email protected]>

Signed-off-by: Corentin Labbe <[email protected]>
---
V1 can be seen at https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]/
Changes since v1:
- rebased on recent tree

Changes since v2:
- rebased on recent tree

Changes since v3:
- rebased on recent tree

Changes since v4:
- rebased on recent tree

Documentation/devicetree/bindings/leds/common.yaml | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documentation/devicetree/bindings/leds/common.yaml
index d34bb58c0037..60c8611c6611 100644
--- a/Documentation/devicetree/bindings/leds/common.yaml
+++ b/Documentation/devicetree/bindings/leds/common.yaml
@@ -90,6 +90,8 @@ properties:
- heartbeat
# LED indicates disk activity
- disk-activity
+ - disk-read
+ - disk-write
# LED indicates IDE disk activity (deprecated), in new implementations
# use "disk-activity"
- ide-disk
@@ -98,6 +100,8 @@ properties:
# LED alters the brightness for the specified duration with one software
# timer (requires "led-pattern" property)
- pattern
+ - usb-gadget
+ - usb-host
- pattern: "^cpu[0-9]*$"
- pattern: "^hci[0-9]+-power$"
# LED is triggered by Bluetooth activity
--
2.39.1



2023-01-31 14:03:25

by Corentin LABBE

[permalink] [raw]
Subject: [PATCH v5 2/2] leds: remove ide-disk trigger

No user of ide-disk remains, so remove this deprecated trigger.
Only a few platforms used this and were fixed in 2016.

Acked-by: Rob Herring <[email protected]>
Signed-off-by: Corentin Labbe <[email protected]>
---
Change since v1:
- remove also DEFINE_LED_TRIGGER(ledtrig_ide)
Changes since v2:
- Added the fact that few platforms used this and it was fixed old ago.
- Added Rob's ack

Change since v3:
- Rebase on top of latest next
Change since v4:
- Rebase on top of latest next

Documentation/devicetree/bindings/leds/common.yaml | 3 ---
drivers/leds/trigger/ledtrig-disk.c | 4 ----
2 files changed, 7 deletions(-)

diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documentation/devicetree/bindings/leds/common.yaml
index 60c8611c6611..15e3f6645682 100644
--- a/Documentation/devicetree/bindings/leds/common.yaml
+++ b/Documentation/devicetree/bindings/leds/common.yaml
@@ -92,9 +92,6 @@ properties:
- disk-activity
- disk-read
- disk-write
- # 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
diff --git a/drivers/leds/trigger/ledtrig-disk.c b/drivers/leds/trigger/ledtrig-disk.c
index 0741910785bb..0b7dfbd04273 100644
--- a/drivers/leds/trigger/ledtrig-disk.c
+++ b/drivers/leds/trigger/ledtrig-disk.c
@@ -16,7 +16,6 @@
DEFINE_LED_TRIGGER(ledtrig_disk);
DEFINE_LED_TRIGGER(ledtrig_disk_read);
DEFINE_LED_TRIGGER(ledtrig_disk_write);
-DEFINE_LED_TRIGGER(ledtrig_ide);

void ledtrig_disk_activity(bool write)
{
@@ -24,8 +23,6 @@ void ledtrig_disk_activity(bool write)

led_trigger_blink_oneshot(ledtrig_disk,
&blink_delay, &blink_delay, 0);
- led_trigger_blink_oneshot(ledtrig_ide,
- &blink_delay, &blink_delay, 0);
if (write)
led_trigger_blink_oneshot(ledtrig_disk_write,
&blink_delay, &blink_delay, 0);
@@ -40,7 +37,6 @@ static int __init ledtrig_disk_init(void)
led_trigger_register_simple("disk-activity", &ledtrig_disk);
led_trigger_register_simple("disk-read", &ledtrig_disk_read);
led_trigger_register_simple("disk-write", &ledtrig_disk_write);
- led_trigger_register_simple("ide-disk", &ledtrig_ide);

return 0;
}
--
2.39.1


2023-01-31 14:09:51

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH v5 2/2] leds: remove ide-disk trigger

On Tue, Jan 31, 2023 at 3:03 PM Corentin Labbe <[email protected]> wrote:

> No user of ide-disk remains, so remove this deprecated trigger.
> Only a few platforms used this and were fixed in 2016.
>
> Acked-by: Rob Herring <[email protected]>
> Signed-off-by: Corentin Labbe <[email protected]>

Reviewed-by: Linus Walleij <[email protected]>

Yours,
Linus Walleij

2023-02-04 14:11:32

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH v5 1/2] dt-bindings: leds: common: add disk write/read and usb-host/usb-gadget

On Tue, 31 Jan 2023, Corentin Labbe wrote:

> The triggers enum misses 3 cases used by gemini DT.
> usb-host was added via commit 0cfbd328d60f ("usb: Add LED triggers for USB activity")
> so we add also as valid trigger usb-gadget which was added along in this
> commit.
>
> disk-read/disk-write were added by commit d1ed7c558612 ("leds: Extends disk trigger for reads and writes")
> Reviewed-by: Linus Walleij <[email protected]>
> Acked-by: Rob Herring <[email protected]>
>
> Signed-off-by: Corentin Labbe <[email protected]>

Applied, thanks

--
Lee Jones [李琼斯]

2023-02-04 14:12:35

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH v5 2/2] leds: remove ide-disk trigger

On Tue, 31 Jan 2023, Corentin Labbe wrote:

> No user of ide-disk remains, so remove this deprecated trigger.
> Only a few platforms used this and were fixed in 2016.
>
> Acked-by: Rob Herring <[email protected]>
> Signed-off-by: Corentin Labbe <[email protected]>
> ---
> Change since v1:
> - remove also DEFINE_LED_TRIGGER(ledtrig_ide)
> Changes since v2:
> - Added the fact that few platforms used this and it was fixed old ago.
> - Added Rob's ack
>
> Change since v3:
> - Rebase on top of latest next
> Change since v4:
> - Rebase on top of latest next
>
> Documentation/devicetree/bindings/leds/common.yaml | 3 ---
> drivers/leds/trigger/ledtrig-disk.c | 4 ----
> 2 files changed, 7 deletions(-)

Applied, thanks

--
Lee Jones [李琼斯]