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 E960DC19F29 for ; Tue, 2 Aug 2022 20:16:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231301AbiHBUQL (ORCPT ); Tue, 2 Aug 2022 16:16:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229507AbiHBUQJ (ORCPT ); Tue, 2 Aug 2022 16:16:09 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4376218B37 for ; Tue, 2 Aug 2022 13:16:08 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id 15-20020a17090a098f00b001f305b453feso19554018pjo.1 for ; Tue, 02 Aug 2022 13:16:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=2Ra8Z84FGiy+WxWESz00m+pAyXWLLHoUcteZqKqQVeQ=; b=QNIGy+vx1z5bbrFce3ejE7J+p5w419nQycC6VBys146sIuWA9+2Q/SxR15+OoVBJ7u eVdeJ5BRBbYNJ1oMXuwK7ItVg3nM4k6dLbiE2pw1d/EDvI6zWRQcAPDiwNKBwpAREw+F k74zd9mYKzqSMuyGEUf8TrxytiEyihtScBMXg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=2Ra8Z84FGiy+WxWESz00m+pAyXWLLHoUcteZqKqQVeQ=; b=MEzJmSg/5SIkFWgAjGT7t7UiCqFOfA201NgHSmycSX5Q4XPtfnUcmvwCHcM87NeRY8 Fr0Jmtc/yXwXwmfcDlrzOmP+CRcuvKAAlfpsSYwZ45r/0pbPlZH6O+ZXYBcAV4yA/sgO gyz+BjGDSQkcfanrX3j3riVinh0FbW7b7xORoHSoBSNiKOFwDYs8UPwvx7wAMH5+DNyI TSV8QP4evHGPfY1oHanqiIMSZOZy6kkhoJJwOXfWureXPX2RnHvMaIzla7JjC1EKr6Zc do6V8kMASZeDH0Eol8KPuoPCthaB8vJKLUcEbMC7AZjT4GEnRo5rqWnSG9A1Gc5/hF/u k97A== X-Gm-Message-State: ACgBeo0mLN9RnlWzoEiNhY2aOyvleL6b95UJhXCddJRdxkqPuvfgNIWU DJr0xOOWy7xus2LpSufLTgQ2LA== X-Google-Smtp-Source: AA6agR48+4BlazoQelyJzBpk3hRX4cYNy52/1dxW3jP/E7tQakkcT9LaTbOh7tK2MRemv/M8z7eGRQ== X-Received: by 2002:a17:902:f78b:b0:168:faff:d6a5 with SMTP id q11-20020a170902f78b00b00168faffd6a5mr22691375pln.76.1659471367735; Tue, 02 Aug 2022 13:16:07 -0700 (PDT) Received: from localhost.localdomain ([183.83.136.224]) by smtp.gmail.com with ESMTPSA id w18-20020a170902a71200b0016ee26224a4sm80863plq.305.2022.08.02.13.16.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Aug 2022 13:16:07 -0700 (PDT) From: Suniel Mahesh To: Felipe Balbi , Greg Kroah-Hartman , Michael Trimarchi , Jagan Teki , Zachary Holland , Daniel McLean , Rene Samson Ambrose , David Sands Cc: linux-kernel@vger.kernel.org, linux-amarula@amarulasolutions.com, USB list Subject: [RFC v2 0/2] Extend functionality for GET_REPORT Date: Wed, 3 Aug 2022 01:45:54 +0530 Message-Id: <20220802201556.1510069-1-sunil@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series does the following: patch 1/2 extends functionality for GET_REPORT. The current kernel implementation for GET_REPORT is that the kernel sends back a zero filled report (of length == report_length), when the Host request's a particular report from the device/gadget. This changeset extends functionality for GET_REPORT by sending a particular report based on report type and report number. patch 2/2 adds a test application to test the extended functionality. please review and share your thoughts. version 1 patches: https://lore.kernel.org/lkml/20220801123010.2984864-1-sunil@amarulasolutions.com/ Suniel Mahesh (2): usb: gadget: f_hid: Extend functionality for GET_REPORT mode HID: ghid: add example program for GET_REPORT --- Changes for v2: - patch 2/2 got changed. drivers/usb/gadget/function/f_hid.c | 184 ++++++++++++++++++++++++++- include/{ => uapi}/linux/usb/g_hid.h | 10 ++ samples/Kconfig | 10 ++ samples/Makefile | 1 + samples/ghid/Makefile | 4 + samples/ghid/test-hid.c | 134 +++++++++++++++++++ 6 files changed, 341 insertions(+), 2 deletions(-) rename include/{ => uapi}/linux/usb/g_hid.h (72%) create mode 100644 samples/ghid/Makefile create mode 100644 samples/ghid/test-hid.c -- 2.25.1