From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: kernel@pengutronix.de, linux-serial@vger.kernel.org,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Subject: Re: [PATCH] serial: imx: add rx and tx led trigger
Date: Thu, 07 Jul 2016 10:27:51 +0200 [thread overview]
Message-ID: <6724841.mKIqTiexKe@wuerfel> (raw)
In-Reply-To: <20160707062800.GT16643@pengutronix.de>
On Thursday, July 7, 2016 8:28:00 AM CEST Uwe Kleine-König wrote:
> Hello Arnd,
>
> [adding Rob Herring to Cc]
>
> On Wed, Jul 06, 2016 at 10:09:39PM +0200, Arnd Bergmann wrote:
> > On Wednesday, July 6, 2016 7:30:57 PM CEST Uwe Kleine-König wrote:
> > > On Wed, Jul 06, 2016 at 05:22:40PM +0200, Arnd Bergmann wrote:
> > > > On Monday, July 4, 2016 5:50:09 PM CEST Uwe Kleine-König wrote:
> > > > > On Mon, Jul 04, 2016 at 05:43:03PM +0200, Arnd Bergmann wrote:
> > > > > > On Monday, July 4, 2016 5:34:12 PM CEST Uwe Kleine-König wrote:
> > > > > > > Add support for two led triggers per UART instance that blink on
> > > > > > > transmission and reception of data respectively.
> > > > > > >
> > > > If this is something we may want to do on other platforms as well,
> > > > we should perhaps not hardwire the name of the imx tty device in
> > > > the led trigger name.
> > >
> > > I cannot follow. If we have several serial lines and a trigger for each
> > > of them, they must get different names. Using the device's name to
> > > distinguish them seems like a good and obvious idea.
> >
> > The main problem I see is if someone puts the name of the trigger into
> > a dtb file, as this hardcodes the connection between the Linux driver
> > name and numbering system with the device tree binding, which are normally
> > separate.
> >
> > If we could derive the trigger name from the "/aliases/serial%d" property
> > in DT instead, it would get a little more portable.
>
> Alternatively we could invent a more dtish way as aliases seem to be
> frowned upon [1], something like:
>
> led#0 {
> label = "userled";
> linux,default-trigger = &uart1, "tx";
> };
>
> uart1: serial@43f90000 {
> ...
> #trigger-cells = <1>;
> };
That looks nice, but I don't see how we could implement this in a
backwards compatible way, as we don't know whether the first cell
of the property is a phandle or a string.
> Having said that, I don't think it's a big problem if the value of
> "linux,default-trigger" is Linux-specific. Moreover, is a default
> trigger considered a hardware description?
What's more important here I think is that even in Linux, the name
of the uart is not always stable across versions or configurations,
e.g. in on OMAP we can have either ttyO%d or ttyS%d.
Arnd
next prev parent reply other threads:[~2016-07-07 8:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-04 15:34 [PATCH] serial: imx: add rx and tx led trigger Uwe Kleine-König
2016-07-04 15:43 ` Arnd Bergmann
2016-07-04 15:50 ` Uwe Kleine-König
2016-07-06 15:22 ` Arnd Bergmann
2016-07-06 17:30 ` Uwe Kleine-König
2016-07-06 20:09 ` Arnd Bergmann
2016-07-07 6:28 ` Uwe Kleine-König
2016-07-07 8:27 ` Arnd Bergmann [this message]
2016-07-07 8:33 ` Uwe Kleine-König
2016-07-07 8:43 ` Arnd Bergmann
2016-08-31 14:00 ` Greg KH
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=6724841.mKIqTiexKe@wuerfel \
--to=arnd@arndb.de \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-serial@vger.kernel.org \
--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