lkml.org 
[lkml]   [2023]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v6 2/2] trigger: ledtrig-tty: add additional modes
From
On 22. 02. 23, 8:55, Florian Eckert wrote:
> Add additional modes to trigger the selected LED.
> The following modes are supported:
>
> Tx/Rx: Flash LED on data transmission (default)
> CTS: DCE Ready to accept data from the DTE.
> DSR: DCE is ready to receive and send data.
> CAR: DCE is receiving a carrier from a remote DTE.
> RNG: DCE has detected an incoming ring signal.
>
> The mode can be changed for example with the following command:
> echo "CTS" > /sys/class/leds/<led>/mode
>
> This would turn on the LED, when the DTE(modem) signals the DCE that it
> is ready to accept data.
>
> Signed-off-by: Florian Eckert <fe@dev.tdt.de>
> ---
> .../ABI/testing/sysfs-class-led-trigger-tty | 16 ++
> drivers/leds/trigger/ledtrig-tty.c | 145 ++++++++++++++++--
> 2 files changed, 146 insertions(+), 15 deletions(-)
>
> diff --git a/Documentation/ABI/testing/sysfs-class-led-trigger-tty b/Documentation/ABI/testing/sysfs-class-led-trigger-tty
> index 2bf6b24e781b..4023585d3acf 100644
> --- a/Documentation/ABI/testing/sysfs-class-led-trigger-tty
> +++ b/Documentation/ABI/testing/sysfs-class-led-trigger-tty
> @@ -4,3 +4,19 @@ KernelVersion: 5.10
> Contact: linux-leds@vger.kernel.org
> Description:
> Specifies the tty device name of the triggering tty
> +
> +What: /sys/class/leds/<led>/mode
> +Date: January 2023
> +KernelVersion: 6.3
> +Description:
> + Specifies the operating to trigger the LED.
> + The following operating modes are supported:

Here, you should add a \n. Otherwise it won't start the list properly.
Check the output e.g. by:
make htmldocs SPHINXDIRS="admin-guide"

then open the built result in a browser:
Documentation/output/admin-guide/abi-testing.html#abi-sys-class-leds-led-mode

> + * Tx/Rx: Flash LED on data transmission (default)
> + * CTS: DCE Ready to accept data from the DTE.
> + LED on if line is high.
> + * DSR: DCE is ready to receive and send data.
> + LED on if line is high.
> + * CAR: DCE has detected a carrier from a remote DTE.
> + LED on if line is high.
> + * RNG: DCE has detected an incoming ring signal.
> + LED on if line is high.


--
js
suse labs

\
 
 \ /
  Last update: 2023-03-27 00:32    [W:0.037 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site