Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp678099ybk; Wed, 13 May 2020 10:08:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEhSp5lWCIPqmpHyRXUNMA+Wp0zd8Xb6XuVaJfHyQ0g/ih8HVq0kUU2dNds6CWNU0XAnWj X-Received: by 2002:a05:6402:22cd:: with SMTP id dm13mr659422edb.56.1589389702278; Wed, 13 May 2020 10:08:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589389702; cv=none; d=google.com; s=arc-20160816; b=bc/t5bWRN0W6KOb9g0lW8occt2HE8HqzxqErTukZv2fVd7u3SMRObk5SeiwtFAhYi7 ZAX216eoNS3M27j+pxj63YacLAXxo3VotZLiR8MO80tY0ACnVgI6cd/WCv1JzMDBDxou l/D3KsgUifs5/xtBWMPt6f+gpk1ozYCPDeukTVf5IhaOlltigQx0OzC0mj8fw0KoGcyn 0sKhgIJ45NQBjfoUhkoFtjtk2i+n9OY6wqiPXJW62Xpac0dEIZDkCB9tKXzTxW3PavzY VedaaMu8clkLxR56Awt+oHzphydJOxJKEB42a1WVskH09b458m4jMWSA2G+A2YrWic8u v4tQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=4Kbi3oqarrt1OW0QBi9k5ekwpZNaTBkvHSaeaSAfVAg=; b=XQFmKGw1WNoLQrtkXBlH9liNUhvnM+Wb2KQZwmxlXhCWvx6aPKBsFCGZrYiO9zwc8b O6qJhCACFYIXmtPFL28rYsm2TANTsCwDVKO3NET6JUARsb8ylKG6rSZ+oqHsnO8D45uC GrSV4/xwDb98ruQM3PhbWHEMEc4DiIYmhr0mTDf9YwsE+YhzuBekbJeIgv/NLy5NlyAl vpm5VIyPSiDqugb4nLpCj5apd8aDn5IvDWezZmsnYyxmWK+GAl76hVmdoQt8V+5Kj8kc 4jq63C4vUjCrg6ETIN3yrYDXfr1GIKNaJpyIremfifA012A54wqpP0D8Medkgi+6Uk/B OzjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l2si84908edj.535.2020.05.13.10.07.58; Wed, 13 May 2020 10:08:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389831AbgEMREN (ORCPT + 99 others); Wed, 13 May 2020 13:04:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728068AbgEMREN (ORCPT ); Wed, 13 May 2020 13:04:13 -0400 Received: from gofer.mess.org (gofer.mess.org [IPv6:2a02:8011:d000:212::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08432C061A0C; Wed, 13 May 2020 10:04:13 -0700 (PDT) Received: by gofer.mess.org (Postfix, from userid 1000) id 3464B11A001; Wed, 13 May 2020 18:04:11 +0100 (BST) Date: Wed, 13 May 2020 18:04:11 +0100 From: Sean Young To: Dmitry Torokhov Cc: Greg KH , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-media@vger.kernel.org Subject: Re: [PATCH 2/3] input: serio: allow more than one byte to be sent at once Message-ID: <20200513170411.GD9559@gofer.mess.org> References: <20200507135337.2343-1-sean@mess.org> <20200507135337.2343-2-sean@mess.org> <20200507202546.GM89269@dtor-ws> <20200507205918.GA13370@gofer.mess.org> <20200511065118.GA1293993@kroah.com> <20200512090724.GA31990@gofer.mess.org> <20200512173727.GC89269@dtor-ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200512173727.GC89269@dtor-ws> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 12, 2020 at 10:37:27AM -0700, Dmitry Torokhov wrote: > On Tue, May 12, 2020 at 10:07:24AM +0100, Sean Young wrote: > > Now it would be nice to have a discussion about this rather than being > > dismissed with: > > > > > > > Ummm, serial protocol data size is at most 9 bits so I have no earthly > > > > > idea how they expect to get 16. > > > > Which is just a tad insulting. > > That was not meant to be insulting, however serial protocol defines that > the data size is at most 9 bits, so expecting that one can transmit > anything more than that _atomically_ is wrong. If your device/firmware > requires 16 bits to be transferred as indivisible units, then serial > port abstraction is wrong one to be used. Honestly thank you for explaining that. I had no idea this was an abstract point about the demarcations of serial port-ness. There is no physical rs-232 cabling involved at all in this case. > Now serio is layer "above" serial ports (but does not have to have > an underlying serial port) that provides byte-oriented communication > that is expected to mostly flow into host. Its does not expect heavy > data flows coming from the host and into the device (if you look at all > the touchscreens, psmouse, etc, they all send initialization sequences > to the device, and then all the data flows into the host). Therefore > there is little benefit in optimizing serio writes. True, I didn't think this would make much of an measurable improvement, but still, some. > You are using performance clams as a clutch for the requirement of > sending u16s, but as I mentioned it is wrong if you use serial ports > abstraction layer. Greg mentioned ir-usb. You can maybe enhance it, or > create a similar driver that connects USB to rc-core and ensures that > you can communicate with the device with exact format it needs. Yes, I'll go down this route. Thank you for the discussion, it was very helpful. Sean