leds: ledtrig-tty: Make rx tx activitate configurable
authorFlorian Eckert <fe@dev.tdt.de>
Mon, 27 Nov 2023 11:03:10 +0000 (12:03 +0100)
committerLee Jones <lee@kernel.org>
Wed, 13 Dec 2023 11:28:49 +0000 (11:28 +0000)
commit5b755ca677dba117063c6fd8d7ce21b67376deba
tree62b996ee34a0ba91dbfcdcf34f523fceecda3e2c
parent76675f69bed5f1e8ae44ba72904ff7f97aa95c0a
leds: ledtrig-tty: Make rx tx activitate configurable

Until now, the LED blinks when data is sent via the tty (rx/tx).
This is not configurable.

This change adds the possibility to make the indication for the direction
of the transmitted data independently controllable via the new rx and
tx sysfs entries.

- rx:
  Signal reception (rx) of data on the named tty device.
  If set to 0, the LED will not blink on reception.
  If set to 1 (default), the LED will blink on reception.

- tx:
  Signal transmission (tx) of data on the named tty device.
  If set to 0, the LED will not blink on transmission.
  If set to 1 (default), the LED will blink on transmission.

This new sysfs entry are on by default. Thus the trigger behaves as
before this change.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20231127110311.3583957-4-fe@dev.tdt.de
Signed-off-by: Lee Jones <lee@kernel.org>
Documentation/ABI/testing/sysfs-class-led-trigger-tty
drivers/leds/trigger/ledtrig-tty.c