From: Florian Eckert <fe@dev.tdt.de>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Eckert.Florian@googlemail.com, jirislaby@kernel.org,
pavel@ucw.cz, lee@kernel.org, kabel@kernel.org,
u.kleine-koenig@pengutronix.de, ansuelsmth@gmail.com,
m.brock@vanmierlo.com, linux-kernel@vger.kernel.org,
linux-serial@vger.kernel.org, linux-leds@vger.kernel.org
Subject: Re: [PATCH v4 2/3] tty: add new helper function tty_get_tiocm
Date: Sun, 22 Oct 2023 12:24:45 +0200 [thread overview]
Message-ID: <2935341a3c8d98299b1619efc8d73cad@dev.tdt.de> (raw)
In-Reply-To: <2023102115-stock-scrambled-f7d5@gregkh>
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
next prev parent reply other threads:[~2023-10-22 10:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-19 11:28 [PATCH v4 0/3] ledtrig-tty: add additional tty state evaluation Florian Eckert
2023-10-19 11:28 ` [PATCH v4 1/3] tty: whitespaces in descriptions corrected by replacing tabs with spaces Florian Eckert
2023-10-21 16:08 ` Greg KH
2023-10-21 16:28 ` Greg KH
2023-10-22 10:24 ` Florian Eckert
2023-10-22 11:19 ` Greg KH
2023-10-19 11:28 ` [PATCH v4 2/3] tty: add new helper function tty_get_tiocm Florian Eckert
2023-10-21 16:15 ` Greg KH
2023-10-22 10:24 ` Florian Eckert [this message]
2023-10-19 11:28 ` [PATCH v4 3/3] leds: ledtrig-tty: add new line mode evaluation Florian Eckert
2023-10-21 16:07 ` Greg KH
2023-10-22 10:24 ` Florian Eckert
2023-10-22 11:24 ` 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=2935341a3c8d98299b1619efc8d73cad@dev.tdt.de \
--to=fe@dev.tdt.de \
--cc=Eckert.Florian@googlemail.com \
--cc=ansuelsmth@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=kabel@kernel.org \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=m.brock@vanmierlo.com \
--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).