this is v8 of a series adding support for tty triggers. See patch 3 for how to use it. The first two patches provide the necessary infrastructure in the tty subsystem to make the trigger possible. Changes compared to v7 sent with Message-Id 20200707165958.16522-1-u.kleine-koenig@xxxxxxxxxxxxxx on 7 Jul 2020: - ensure the worker function doesn't monopolize the context it is running in - Add a missing mutex_unlock in an error path Pavel Machek wondered in reply to v7 if led_set_brightness was a good idea. I didn't understand the issue and didn't get a reply to my question. So if this is indeed a problem, this one still persists. Best regards Uwe Uwe Kleine-König (3): tty: rename tty_kopen() and add new function tty_kopen_shared() tty: new helper function tty_get_icount() leds: trigger: implement a tty trigger .../ABI/testing/sysfs-class-led-trigger-tty | 6 + drivers/accessibility/speakup/spk_ttyio.c | 2 +- drivers/leds/trigger/Kconfig | 9 + drivers/leds/trigger/Makefile | 1 + drivers/leds/trigger/ledtrig-tty.c | 187 ++++++++++++++++++ drivers/tty/tty_io.c | 85 +++++--- include/linux/tty.h | 7 +- 7 files changed, 272 insertions(+), 25 deletions(-) create mode 100644 Documentation/ABI/testing/sysfs-class-led-trigger-tty create mode 100644 drivers/leds/trigger/ledtrig-tty.c -- 2.28.0