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 DD839C636D6 for ; Fri, 17 Feb 2023 19:11:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229659AbjBQTLH (ORCPT ); Fri, 17 Feb 2023 14:11:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229507AbjBQTLG (ORCPT ); Fri, 17 Feb 2023 14:11:06 -0500 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA53D27D48; Fri, 17 Feb 2023 11:11:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676661061; x=1708197061; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=lWCaHZAw0kLtLlEq2+zfX18B0agu1/sB1EOkFQ86aRI=; b=i3luiE4iC5fzmLnY6W5lHyWcroN3QoqTXE8cfvQ72sgl/Tvx9VSlhJV6 LR+wT5WSQV8Xb2yOKmhGzTa5RS2NLMvpZv24wG/cqNrp6qwnIX8UppXVo mlgaVx2MSCXvUBym3m5B+tYm/7hwt8hLtswY8k7YDovjdthyjasVisnAr MXU3pZXSf9g3Qjziob59CS86SRAWweCkAMo1kiJNYToHQgdLuQ+xFBEz3 t/uiQaFP8PHVx3Dd7ukutnEZKPX//fyxtXgfstsNHTIv/vI/MPKV2SbkN ESsnd2Za1STN4uiHbstVqjBjOxBnwin9+73OwWmrlVgupt743NZUh9qyD Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10624"; a="330730852" X-IronPort-AV: E=Sophos;i="5.97,306,1669104000"; d="scan'208";a="330730852" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Feb 2023 11:11:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10624"; a="779882009" X-IronPort-AV: E=Sophos;i="5.97,306,1669104000"; d="scan'208";a="779882009" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga002.fm.intel.com with ESMTP; 17 Feb 2023 11:10:59 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pT68H-008KeN-0A; Fri, 17 Feb 2023 21:10:57 +0200 Date: Fri, 17 Feb 2023 21:10:56 +0200 From: Andy Shevchenko To: Danny Kaehn Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, jikos@kernel.org, benjamin.tissoires@redhat.com, bartosz.golaszewski@linaro.org, dmitry.torokhov@gmail.com, devicetree@vger.kernel.org, linux-input@vger.kernel.org, ethan.twardy@plexus.com Subject: Re: [PATCH v6 2/3] HID: usbhid: Share USB device firmware node with child HID device Message-ID: References: <20230217184904.1290-1-kaehndan@gmail.com> <20230217184904.1290-3-kaehndan@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230217184904.1290-3-kaehndan@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Fri, Feb 17, 2023 at 12:49:03PM -0600, Danny Kaehn wrote: > USB HID core now shares its fwnode with its child HID device. > Since there can only be one HID device on a USB interface, it is redundant > to specify a hid node under the USB device. This allows usb HID device > drivers to be described in firmware and make use of device properties. FWIW, Reviewed-by: Andy Shevchenko > Signed-off-by: Danny Kaehn > --- > drivers/hid/usbhid/hid-core.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c > index be4c731aaa65..a0859c49d9f4 100644 > --- a/drivers/hid/usbhid/hid-core.c > +++ b/drivers/hid/usbhid/hid-core.c > @@ -19,6 +19,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -1369,6 +1370,7 @@ static int usbhid_probe(struct usb_interface *intf, const struct usb_device_id * > hid->hiddev_report_event = hiddev_report_event; > #endif > hid->dev.parent = &intf->dev; > + device_set_node(&hid->dev, dev_fwnode(&intf->dev)); > hid->bus = BUS_USB; > hid->vendor = le16_to_cpu(dev->descriptor.idVendor); > hid->product = le16_to_cpu(dev->descriptor.idProduct); > -- > 2.25.1 > -- With Best Regards, Andy Shevchenko