[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2935341a3c8d98299b1619efc8d73cad@dev.tdt.de>
Date: Sun, 22 Oct 2023 12:24:45 +0200
From: Florian Eckert <fe@....tdt.de>
To: Greg KH <gregkh@...uxfoundation.org>
Cc: Eckert.Florian@...glemail.com, jirislaby@...nel.org, pavel@....cz,
lee@...nel.org, kabel@...nel.org, u.kleine-koenig@...gutronix.de,
ansuelsmth@...il.com, m.brock@...mierlo.com,
linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org,
linux-leds@...r.kernel.org
Subject: Re: [PATCH v4 2/3] tty: add new helper function tty_get_tiocm
On 2023-10-21 18:15, Greg KH wrote:
> On Thu, Oct 19, 2023 at 01:28:08PM +0200, Florian Eckert wrote:
>> The struct 'tty_struct' has a callback to read the status flags of the
>> tty
>> if the tty driver provides them. So fare, the data is transferred
>> directly
>> to userspace with the function 'tty_tiocmget'. This function cannot be
>> used to evaluate the status line of the tty interface in the
>> ledtrig-tty
>> trigger. To make this possible, a new function must be added that does
>> not immediately pass the data on to userspace.
>>
>> The new function 'tty_get_tiocm' only returns the status register.
>> This information can then be processed further in the ledtrig-tty
>> trigger.
>
> Writing changelogs are hard. You are including a lot of information in
> here that really doesn't need to be, as you are focusing on your
> specific use case, which is fine, but you are creating a generic
> function.
Yes, that is absolutely right. I'll try to take that into account next
time, thanks for your advice.
> This can be simpler, how about something like this:
>
> There is no in-kernel function to get the status register of a
> tty device like the TIOCMGET ioctl returns to userspace. Create
> a new function, tty_get_tiocm(), to obtain the status register
> that other portions of the kernel can call if they need this
> information, and move the existing internal tty_tiocmget()
> function to use this interface.
I will replace the commit message with your suggestion in the next round
of
the patch series. Thanks!
---
Florian
Powered by blists - more mailing lists