[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YX+eRgCrUs2Y5iaX@kroah.com>
Date: Mon, 1 Nov 2021 08:59:02 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: Zijun Hu <zijuhu@...eaurora.org>
Cc: robh@...nel.org, jirislaby@...nel.org,
linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-bluetooth@...r.kernel.org, Zijun Hu <quic_zijuhu@...cinc.com>
Subject: Re: [PATCH v1] serdev: Add interface serdev_device_ioctl
On Mon, Nov 01, 2021 at 03:50:48PM +0800, Zijun Hu wrote:
> From: Zijun Hu <quic_zijuhu@...cinc.com>
>
> For serdev_device which is mounted at virtual tty port, tty ioctl()
> maybe be used to make serdev_device ready to talk with tty port, so
> add interface serdev_device_ioctl().
>
> Signed-off-by: Zijun Hu <quic_zijuhu@...cinc.com>
> ---
> drivers/tty/serdev/core.c | 11 +++++++++++
> drivers/tty/serdev/serdev-ttyport.c | 12 ++++++++++++
> include/linux/serdev.h | 9 +++++++++
> 3 files changed, 32 insertions(+)
>
> diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c
> index f1324fe99378..c0f6cd64716b 100644
> --- a/drivers/tty/serdev/core.c
> +++ b/drivers/tty/serdev/core.c
> @@ -405,6 +405,17 @@ int serdev_device_set_tiocm(struct serdev_device *serdev, int set, int clear)
> }
> EXPORT_SYMBOL_GPL(serdev_device_set_tiocm);
>
> +int serdev_device_ioctl(struct serdev_device *serdev, unsigned int cmd, unsigned long arg)
> +{
> + struct serdev_controller *ctrl = serdev->ctrl;
> +
> + if (!ctrl || !ctrl->ops->ioctl)
> + return -EOPNOTSUPP;
Wrong error for returning that an ioctl is not handled :(
Anyway, what in-tree driver needs this functionality? Why does serdev
need any ioctl commands?
thanks,
greg k-h
Powered by blists - more mailing lists