linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Pavel Machek <pavel@ucw.cz>, Dan Murphy <dmurphy@ti.com>,
	Jiri Slaby <jslaby@suse.com>,
	kernel@pengutronix.de, linux-kernel@vger.kernel.org,
	linux-leds@vger.kernel.org, linux-serial@vger.kernel.org
Subject: Re: [PATCH v3 3/3] leds: trigger: implement a tty trigger
Date: Tue, 17 Dec 2019 21:27:13 +0100	[thread overview]
Message-ID: <b2844f63-d580-ddc2-b4ed-817eaa89a2c6@gmail.com> (raw)
In-Reply-To: <20191217172102.GB3829986@kroah.com>

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

-- 
Best regards,
Jacek Anaszewski

  reply	other threads:[~2019-12-17 20:27 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 [this message]
2019-12-17 21:08           ` Uwe Kleine-König
2019-12-18 21:33             ` Jacek Anaszewski

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=b2844f63-d580-ddc2-b4ed-817eaa89a2c6@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).