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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9E2AC43334 for ; Mon, 27 Jun 2022 07:21:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232753AbiF0HV2 (ORCPT ); Mon, 27 Jun 2022 03:21:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232665AbiF0HV1 (ORCPT ); Mon, 27 Jun 2022 03:21:27 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32F735FE9 for ; Mon, 27 Jun 2022 00:21:26 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 9AF46B801BF for ; Mon, 27 Jun 2022 07:21:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2C39C341C8; Mon, 27 Jun 2022 07:21:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656314483; bh=gaK1TZrgx9OKJtvxrqK03tnZJtBseD/fLK3HCAS5erc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bg0ks0Fl8RvDL0GZIxyERBKCwfccJo2tlehzS1sV64bKiz+5G8tWVIYqiuV8Rbkej E5FDkpH6C4d7rtoDYmeUff6fQuz0GDy0SMhhCjfkJGgLaQIYmHlPWVKPmGekV+Lu9x Iz2RU/aW/YM9nzLeKYOBFvtAhpG3J413VY9GFJVQ= Date: Mon, 27 Jun 2022 09:21:20 +0200 From: Greg Kroah-Hartman To: Michael Nazzareno Trimarchi Cc: Felipe Balbi , USB list Subject: Re: f_hid GET_REPORT extension Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Mon, Jun 27, 2022 at 09:06:05AM +0200, Michael Nazzareno Trimarchi wrote: > Hi Felipe and Greg > > I'm starting to write some code to extend the GET_REPORT and let the > userspace on the device side to pre-fill the answer on this request. > Right now the answer is always 0. The idea is to create a sysfs > support to fill reports struct on report request on the host side. > This will help to > emulate devices that export features report for example. As far as I > understand the hidg side just use read and write and read is used to > extract > the result of SET_REPORT is that the gadget is properly configured. Is > it the right direction? Without code, it is very hard to understand what you are doing here, sorry. Also, why sysfs? thanks, greg k-h