linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Pavel Machek <pavel@ucw.cz>,
	linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
	Dan Murphy <dmurphy@ti.com>,
	kernel@pengutronix.de, Jiri Slaby <jslaby@suse.com>,
	linux-leds@vger.kernel.org
Subject: Re: [PATCH v3 3/3] leds: trigger: implement a tty trigger
Date: Wed, 18 Dec 2019 22:33:56 +0100	[thread overview]
Message-ID: <86ad555f-671a-cb0e-6000-30580f688be1@gmail.com> (raw)
In-Reply-To: <20191217210818.rbwmrz3fsnobo7nj@pengutronix.de>

On 12/17/19 10:08 PM, Uwe Kleine-König wrote:
> On Tue, Dec 17, 2019 at 09:27:13PM +0100, Jacek Anaszewski wrote:
>> On 12/17/19 6:21 PM, Greg Kroah-Hartman wrote:
>>> On Tue, Dec 17, 2019 at 05:23:13PM +0100, Uwe Kleine-König wrote:
>>>> On Tue, Dec 17, 2019 at 04:27:24PM +0100, Greg Kroah-Hartman wrote:
>>>>> On Tue, Dec 17, 2019 at 04:07:36PM +0100, Uwe Kleine-König wrote:
>>>>>> Usage is as follows:
>>>>>>
>>>>>> 	myled=ledname
>>>>>> 	tty=ttyS0
>>>>>>
>>>>>> 	echo tty > /sys/class/leds/$myled/trigger
>>>>>> 	cat /sys/class/tty/$tty/dev > /sys/class/leds/$myled/dev
>>>>>
>>>>> Is this the correct instructions?  Aren't you looking for a major/minor
>>>>> number instead in your sysfs file?
>>>>
>>>> This is correct, yes, at least it works as intended on my machine.
>>>>
>>>> /sys/class/tty/$tty/dev produces $major:$minor and that's what the
>>>> led-trigger consumes.
>>>
>>> Ugh, nevermind, I totally read that wrong, I was thinking "echo" instead
>>> of cat.  My fault, what you wrote is correct.  Should that be documented
>>> somewhere in a Documentation/ABI/ file so that people know how to use
>>> this new sysfs file?  How are led triggers documented?
>>
>> LED triggers have their corresponding entries in Documentation/ABI.
>>
>> Uwe, you already did that for netdev trigger:
>>
>> Documentation/ABI/testing/sysfs-class-led-trigger-netdev
>>
>> It would be nice to have one for this too.
>>
>> There are also less formal docs in Documentation/leds, e.g.:
>>
>> Documentation/leds/ledtrig-usbport.rst
> 
> I'd put into Documentation/ABI/testing/sysfs-class-led-trigger-tty:
> 
> 	What:           /sys/class/leds/<led>/dev
> 	Date:           Dec 2019
> 	KernelVersion:  5.6
> 	Contact:        linux-leds@vger.kernel.org
> 	Description:
> 			Specifies $major:$minor of the triggering tty

Yes, that should be fine.

-- 
Best regards,
Jacek Anaszewski

      reply	other threads:[~2019-12-18 21:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-17 15:07 [PATCH v3 0/3] tty/leds: implement a trigger for ttys Uwe Kleine-König
2019-12-17 15:07 ` [PATCH v3 1/3] tty: rename tty_kopen() and add new function tty_kopen_shared() Uwe Kleine-König
2019-12-17 15:07 ` [PATCH v3 2/3] tty: new helper function tty_get_icount() Uwe Kleine-König
2019-12-17 15:07 ` [PATCH v3 3/3] leds: trigger: implement a tty trigger Uwe Kleine-König
2019-12-17 15:27   ` Greg Kroah-Hartman
2019-12-17 16:23     ` Uwe Kleine-König
2019-12-17 17:21       ` Greg Kroah-Hartman
2019-12-17 20:27         ` Jacek Anaszewski
2019-12-17 21:08           ` Uwe Kleine-König
2019-12-18 21:33             ` Jacek Anaszewski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86ad555f-671a-cb0e-6000-30580f688be1@gmail.com \
    --to=jacek.anaszewski@gmail.com \
    --cc=dmurphy@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).