lkml.org 
[lkml]   [2023]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH v8 1/3] serdev: Add method to assert break signal over tty UART port
    Date
    Hi Simon

    >
    > On Fri, Mar 10, 2023 at 11:49:19PM +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@nxp.com>
    > > ---
    > > v3: Add details to the commit message. (Greg KH)
    >
    > ...
    >
    > > 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
    >
    > ...
    >
    > > @@ -255,6 +257,10 @@ static inline int serdev_device_set_tiocm(struct
    > > serdev_device *serdev, int set, {
    > > return -ENOTSUPP;
    > > }
    > > +static inline int serdev_device_break_ctl(struct serdev_device
    > > +*serdev, int break_state) {
    > > + return -EOPNOTSUPP;
    >
    > Is the use of -EOPNOTSUPP intentional here?
    > I see -ENOTSUPP is used elsewhere in this file.
    I was suggested to use - EOPNOTSUPP instead of - ENOTSUPP by the check patch scripts and by Leon Romanovsky.
    https://patchwork.kernel.org/project/bluetooth/patch/20230130180504.2029440-2-neeraj.sanjaykale@nxp.com/

    ENOTSUPP is not a standard error code and should be avoided in new patches.
    See: https://lore.kernel.org/netdev/20200510182252.GA411829@lunn.ch/

    >
    > > +}
    > > static inline int serdev_device_write(struct serdev_device *sdev, const
    > unsigned char *buf,
    > > size_t count, unsigned long
    > > timeout) {
    > > --
    > > 2.34.1
    > >

    Thanks,
    Neeraj

    \
     
     \ /
      Last update: 2023-03-27 00:55    [W:4.607 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site