diff options
author | Danny Kaehn <danny.kaehn@plexus.com> | 2024-06-05 18:12:45 -0500 |
---|---|---|
committer | Benjamin Tissoires <bentiss@kernel.org> | 2024-06-06 09:29:07 +0200 |
commit | b81881b9c10e1f5eafc02df026663b824610d537 (patch) | |
tree | 28a27999f5aed2ccc3379b2cec3a62572d01b546 /drivers/hid/usbhid | |
parent | 748fe4399f9194285a91ec8c09141e49a6b470b4 (diff) | |
download | linux-b81881b9c10e1f5eafc02df026663b824610d537.tar.gz linux-b81881b9c10e1f5eafc02df026663b824610d537.tar.bz2 linux-b81881b9c10e1f5eafc02df026663b824610d537.zip |
HID: usbhid: Share USB device firmware node with child HID device
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.
Signed-off-by: Danny Kaehn <danny.kaehn@plexus.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240605-cp2112-dt-v11-2-d55f0f945a62@plexus.com
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Diffstat (limited to 'drivers/hid/usbhid')
-rw-r--r-- | drivers/hid/usbhid/hid-core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index a90ed2ceae84..cb687ea7325c 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c @@ -19,6 +19,7 @@ #include <linux/list.h> #include <linux/mm.h> #include <linux/mutex.h> +#include <linux/property.h> #include <linux/spinlock.h> #include <asm/unaligned.h> #include <asm/byteorder.h> @@ -1374,6 +1375,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); |