[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200219124859.GC32540@localhost>
Date: Wed, 19 Feb 2020 13:48:59 +0100
From: Johan Hovold <johan@...nel.org>
To: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>
Cc: Johan Hovold <johan@...nel.org>,
Jacek Anaszewski <jacek.anaszewski@...il.com>,
Pavel Machek <pavel@....cz>, Dan Murphy <dmurphy@...com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jslaby@...e.com>, linux-leds@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel@...gutronix.de,
linux-serial@...r.kernel.org
Subject: Re: [PATCH v6 4/4] leds: trigger: implement a tty trigger
On Wed, Feb 19, 2020 at 12:19:13PM +0100, Johan Hovold wrote:
> On Wed, Feb 19, 2020 at 12:03:06PM +0100, Uwe Kleine-König wrote:
> > On Wed, Feb 19, 2020 at 11:52:39AM +0100, Johan Hovold wrote:
> > If I understand correctly calling tty_kopen_shared() doesn't open the
> > device, just keep it referenced which prevents it to disappear. Unless I
> > miss something it doesn't result in the tty's .open() being called.
>
> So tty_kopen_shared() is something you added. Judging from a quick look
> it seems you can only attach a trigger to an already open port, but the
> trigger will then keep the port open (again, consider modem control,
> power).
Sorry, my bad; this reference shouldn't prevent the port from being
closed.
The fact that you need the port to be open before you can attach a
trigger does sound like a problem though (e.g. consider udev rules).
Johan
Powered by blists - more mailing lists