From: Crescent CY Hsieh <crescentcy.hsieh@moxa.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org
Subject: Re: [PATCH v2] tty: serial: Add RS422 flag to struct serial_rs485
Date: Fri, 3 Nov 2023 18:47:34 +0800 [thread overview]
Message-ID: <ZUTPxkEbmF3jajQg@moxa-ThinkCentre-M90t> (raw)
In-Reply-To: <2023110127-wireless-candy-c298@gregkh>
On Wed, Nov 01, 2023 at 07:49:48AM +0100, Greg Kroah-Hartman wrote:
> On Wed, Nov 01, 2023 at 02:44:04PM +0800, Crescent CY Hsieh wrote:
> > diff --git a/include/uapi/linux/serial.h b/include/uapi/linux/serial.h
> > index 53bc1af67..427609fd5 100644
> > --- a/include/uapi/linux/serial.h
> > +++ b/include/uapi/linux/serial.h
> > @@ -137,6 +137,8 @@ struct serial_icounter_struct {
> > * * %SER_RS485_ADDRB - Enable RS485 addressing mode.
> > * * %SER_RS485_ADDR_RECV - Receive address filter (enables @addr_recv). Requires %SER_RS485_ADDRB.
> > * * %SER_RS485_ADDR_DEST - Destination address (enables @addr_dest). Requires %SER_RS485_ADDRB.
> > + *
> > + * * %SER_RS422_ENABLED - RS422 enabled.
> > */
> > struct serial_rs485 {
> > __u32 flags;
> > @@ -149,6 +151,8 @@ struct serial_rs485 {
> > #define SER_RS485_ADDR_RECV (1 << 7)
> > #define SER_RS485_ADDR_DEST (1 << 8)
> >
> > +#define SER_RS422_ENABLED (1 << 9)
>
> Why the extra blank line before this?
The extra blank line is for the clarity, to seperate RS422 flag from
RS485 flags.
> Also, what userspace code is going to use this? How is it tested?
This flag could be used when user tries to switch serial interface into
RS422, just like the original flag "SER_RS485_ENABLED" can also be used to
switch serial interface into RS485 with some RS485 configurations.
---
Sincerely,
Crescent CY Hsieh
next prev parent reply other threads:[~2023-11-03 10:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-01 6:44 [PATCH v2] tty: serial: Add RS422 flag to struct serial_rs485 Crescent CY Hsieh
2023-11-01 6:49 ` Greg Kroah-Hartman
2023-11-03 10:47 ` Crescent CY Hsieh [this message]
2023-11-04 20:03 ` Lino Sanfilippo
2023-11-04 19:53 ` Lino Sanfilippo
2023-11-06 7:19 ` Crescent CY Hsieh
2023-11-06 14:43 ` Lino Sanfilippo
2023-11-07 3:55 ` Crescent CY Hsieh
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=ZUTPxkEbmF3jajQg@moxa-ThinkCentre-M90t \
--to=crescentcy.hsieh@moxa.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
/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