Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2760799pxb; Mon, 1 Nov 2021 00:59:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5ZIxAM1rOqHYjXvnFVtia+MKBAsKMOrmQQekA3ZY/m3I1aLJZscy9ttbNd3qU6k1Kqc22 X-Received: by 2002:a05:6e02:b2a:: with SMTP id e10mr3030259ilu.186.1635753571666; Mon, 01 Nov 2021 00:59:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635753571; cv=none; d=google.com; s=arc-20160816; b=EWS0DwyVCOxp9oWMTR3UbBR3CSovDqXMp71ZSDIY93vptmywfAUq5VZgP36uFSmqhS AaFL6EOl8TzRQDdNmykJ+mHpfCXZ/Rs3jjagSih2qJgnDzIP9FDcGuwmiIIH08Z3NFzU KJ1wvIZ5krx3Okw+bgfUTYoHSM7ZXYMhf0qCqUB3XylqTTJa3EZ8UQZDCy6Ooxtg5ZxR b6pL69XP9N/uBOI7sa71h5VcFjA+QcKTIo49Rt3pnozWAOQ3pSMsZ3MUBdNLlhGzjlj5 1gUY3/e3ijxtrMGt2DObaRh8CB/wwxVpU89+2hfTLsjEWAggDRT8cp/BfbhPQ+aUxgQt xdZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=e4moYIQFmWnhyCQsvb5yXUwU2iZxltrtOuqIrG6ZKYA=; b=adHyEp4lv2ife27we8Z/dr1Loz4pumDcVK0Do7Ji7knmn6eNbwJxnjpx0ynnvQ8+r7 JHCCQWPUpn96l3HiOcyPSNT45FtMoCd/n0T1CU70XHczjQfKsSLpdIn30jrlu8PlTO4o +BvEEnIzE6rNg8v6MZppfiVsq2SM6tncT78Q4JBcZ6eQMzeVKWf7mSYUjJYO6a4Sn1wl QnDkYx+VJAN3rSeB5bW6kVTsmcjQyNsJA/YZHiGpfiE32zmz7NjSiOvqP2nbe7IyBIx/ R3gALYnBwtOobnjPyL2aEimZcWqReWftcsWixxfYEi3hK0rC58WxrIIzEjbZpmAeL80o RmCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Q87/8yos"; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 8si11849600ilx.88.2021.11.01.00.59.19; Mon, 01 Nov 2021 00:59:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Q87/8yos"; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229882AbhKAIBi (ORCPT + 99 others); Mon, 1 Nov 2021 04:01:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:41868 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229933AbhKAIBh (ORCPT ); Mon, 1 Nov 2021 04:01:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4069C60F56; Mon, 1 Nov 2021 07:59:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1635753544; bh=hp2luMpeIUeaO2bLE5QCgM1ttGKCyStAm0Cx5a4oosY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Q87/8yosEOBECSjbEUMCLoQVtRgJp+UZytezIO+6WHcaSDVZlxyR+QXtEpFCNDHvf BXu2TxfFrd56yu2/PKs1qsV1DwD2Tg8CgjvHp/0oojGJekp+Idta76HsERkzdGNOv2 eJeGpZh68wQEArTRBNP5Ip0J3YbVygOHKL+AtfCY= Date: Mon, 1 Nov 2021 08:59:02 +0100 From: Greg KH To: Zijun Hu Cc: robh@kernel.org, jirislaby@kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, Zijun Hu Subject: Re: [PATCH v1] serdev: Add interface serdev_device_ioctl Message-ID: References: <1635753048-5289-1-git-send-email-zijuhu@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1635753048-5289-1-git-send-email-zijuhu@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org On Mon, Nov 01, 2021 at 03:50:48PM +0800, Zijun Hu wrote: > From: Zijun Hu > > 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 > --- > 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