From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83E8FC63798 for ; Fri, 27 Nov 2020 14:49:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2C29C2223D for ; Fri, 27 Nov 2020 14:49:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="EQOOZFWX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730944AbgK0Otc (ORCPT ); Fri, 27 Nov 2020 09:49:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:34124 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729913AbgK0Otc (ORCPT ); Fri, 27 Nov 2020 09:49:32 -0500 Received: from pobox.suse.cz (nat1.prg.suse.com [195.250.132.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 84E78221EB; Fri, 27 Nov 2020 14:49:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606488572; bh=LxJHP/cdIrEPkaficiW1GEGNjMCpm1HqRPY7H9fvmgw=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=EQOOZFWXBQG4mXOPWwqRh8d2AQolGpfo+/dNZNWJmdx5I+H+5sYwhaHPJ093J/4/s 32zbZBKLjs771fOMsPBNRqfFMohvhmGUbxfcnbXRLExRCDZ3aKlAX4zn8jBIa/RTfA cVNEhzmR6TTYZIgWgmABZakidiYjxCn5a1/hEKR0= Date: Fri, 27 Nov 2020 15:49:29 +0100 (CET) From: Jiri Kosina To: Dean Camera cc: linux-input@vger.kernel.org, benjamin.tissoires@redhat.com Subject: Re: [V3, PATCH] Add additional hidraw input/output report ioctls. In-Reply-To: <20201125223957.5921-1-dean@fourwalledcubicle.com> Message-ID: References: <20201125223957.5921-1-dean@fourwalledcubicle.com> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org On Thu, 26 Nov 2020, Dean Camera wrote: > Currently the hidraw module can only read and write feature HID > reports on demand, via dedicated ioctls. Input reports are read > from the device through the read() interface, while output reports > are written through the write interface(). > > This is insufficient; it is desirable in many situations to be > able to read and write input and output reports through the > control interface to cover additional scenarios: > - Reading an input report by its report ID, to get initial state > - Writing an input report, to set initial input state in the device > - Reading an output report by its report ID, to obtain current state > - Writing an output report by its report ID, out of band > > This patch adds these missing ioctl requests to read and write > the remaining HID report types. Note that not all HID backends will > neccesarily support this (e.g. while the USB link layer supports > setting Input reports, others may not). > > Also included are documentation and example updates. The current > hidraw documentation states that feature reports read from the > device does *not* include the report ID, however this is not the > case and the returned report will have its report ID prepended > by conforming HID devices, as the report data sent from the device > over the control endpoint must be indentical in format to those > sent over the regular transport. This one is now queued in hid.git@for-5.11/core as well. Thanks, -- Jiri Kosina SUSE Labs