[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZBBN2ySl/q7NGehB@corigine.com>
Date: Tue, 14 Mar 2023 11:35:07 +0100
From: Simon Horman <simon.horman@...igine.com>
To: Neeraj Sanjay Kale <neeraj.sanjaykale@....com>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org, marcel@...tmann.org,
johan.hedberg@...il.com, luiz.dentz@...il.com,
gregkh@...uxfoundation.org, jirislaby@...nel.org,
alok.a.tiwari@...cle.com, hdanton@...a.com,
ilpo.jarvinen@...ux.intel.com, leon@...nel.org,
netdev@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-bluetooth@...r.kernel.org,
linux-serial@...r.kernel.org, amitkumar.karwar@....com,
rohit.fule@....com, sherry.sun@....com
Subject: Re: [PATCH v10 1/3] serdev: Add method to assert break signal over
tty UART port
On Mon, Mar 13, 2023 at 08:10:26PM +0530, Neeraj Sanjay Kale wrote:
> Adds serdev_device_break_ctl() and an implementation for ttyport.
> This function simply calls the break_ctl in tty layer, which can
> assert a break signal over UART-TX line, if the tty and the
> underlying platform and UART peripheral supports this operation.
>
> Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@....com>
> ---
> v3: Add details to the commit message. Replace ENOTSUPP with
> EOPNOTSUPP. (Greg KH, Leon Romanovsky)
> v9: Replace all instances of ENOTSUPP with EOPNOTSUPP.
> (Simon Horman)
I'm all for this change. But perhaps it should be a separate clean-up patch,
that precedes the feature-patch which adds the new method. I think that
would make things a bit clearer.
...
> diff --git a/include/linux/serdev.h b/include/linux/serdev.h
> index 66f624fc618c..c065ef1c82f1 100644
> --- a/include/linux/serdev.h
> +++ b/include/linux/serdev.h
...
> @@ -202,6 +203,7 @@ int serdev_device_write_buf(struct serdev_device *, const unsigned char *, size_
> void serdev_device_wait_until_sent(struct serdev_device *, long);
> int serdev_device_get_tiocm(struct serdev_device *);
> int serdev_device_set_tiocm(struct serdev_device *, int, int);
> +int serdev_device_break_ctl(struct serdev_device *serdev, int break_state);
> void serdev_device_write_wakeup(struct serdev_device *);
> int serdev_device_write(struct serdev_device *, const unsigned char *, size_t, long);
> void serdev_device_write_flush(struct serdev_device *);
> @@ -255,6 +257,10 @@ static inline int serdev_device_set_tiocm(struct serdev_device *serdev, int set,
> {
> return -ENOTSUPP;
It seems that you might have missed at least this one.
> }
> +static inline int serdev_device_break_ctl(struct serdev_device *serdev, int break_state)
> +{
> + return -EOPNOTSUPP;
> +}
> static inline int serdev_device_write(struct serdev_device *sdev, const unsigned char *buf,
> size_t count, unsigned long timeout)
> {
> --
> 2.34.1
>
Powered by blists - more mailing lists