Skip to contentSkip to conversation

HID: use generic driver for Logitech Unifying receivers if CONFIG_HID_LOGITECH_DJ=n

PATCH Superseded Konstantin Khlebnikov 3 participants 6 messages Feb 13, 2012 – Feb 21, 2012 HID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 HID: use generic driver for Logitech Unifying receivers if CONFIG_HID_LOGITECH_DJ=n

Before commit 534a7b8e1 "HID: Add full support for Logitech Unifying receivers" Logitech Unifying receiver can work as generic device without special driver, after that commit these devices does not works without special driver.

After this patch they will use generic driver if special driver is disabled.

---
 drivers/hid/hid-core.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/hid/hid-core.c +2 -0
index af08ce7..3d7a174 100644
@@ -1462,8 +1462,10 @@ static const struct hid_device_id hid_have_special_driver[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_DFGT_WHEEL) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G25_WHEEL) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G27_WHEEL) },
+#if IS_ENABLED(CONFIG_HID_LOGITECH_DJ)
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_UNIFYING_RECEIVER) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_UNIFYING_RECEIVER_2) },
+#endif
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WII_WHEEL) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_SPACETRAVELLER) },
#1 lore raw

Hi Konstantin,

This was the original implementation
http://www.spinics.net/lists/linux-input/msg15225.html
Jiri suggested we removed the conditional compilation and we accepted.

Which are your reasons to add those conditionals back again?

Cheers,

Nestor

Quoted 17 lines · Konstantin Khlebnikov

Before commit 534a7b8e1 "HID: Add full support for Logitech Unifying receivers" Logitech Unifying receiver can work as generic device without special driver, after that commit these devices does not works without special driver.

After this patch they will use generic driver if special driver is disabled.

---
 drivers/hid/hid-core.c |    2 ++

 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/hid/hid-core.c +0 -0
index af08ce7..3d7a174 100644

drivers/hid/hid-core.c static const struct hid_device_id hid_have_special_driver[] = { · line 1471

Quoted 10 lines
drivers/hid/hid-core.c +2 -0
@@ -1462,8 +1462,10 @@ static const struct hid_device_id hid_have_special_driver[] = {
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_DFGT_WHEEL) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G25_WHEEL) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G27_WHEEL) },
+#if IS_ENABLED(CONFIG_HID_LOGITECH_DJ)
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_UNIFYING_RECEIVER) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_UNIFYING_RECEIVER_2) },
+#endif
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WII_WHEEL) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_SPACETRAVELLER) },

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 7 lines · Nestor Lopez Casado

Hi Konstantin,

This was the original implementation
http://www.spinics.net/lists/linux-input/msg15225.html
Jiri suggested we removed the conditional compilation and we accepted.

Which are your reasons to add those conditionals back again?

This device can work perfectly without special driver. It does not add any special advantage if there only one mouse and/or one keyboard device. So, I don't see any reason for this strictly requirement of special driver.

Quoted 34 lines

Cheers,

Nestor

Quoted 27 lines · Konstantin Khlebnikov

Before commit 534a7b8e1 "HID: Add full support for Logitech Unifying receivers" Logitech Unifying receiver can work as generic device without special driver, after that commit these devices does not works without special driver.

After this patch they will use generic driver if special driver is disabled.

---
  drivers/hid/hid-core.c |    2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)
drivers/hid/hid-core.c +2 -0
index af08ce7..3d7a174 100644
@@ -1462,8 +1462,10 @@ static const struct hid_device_id hid_have_special_driver[] = {
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_DFGT_WHEEL) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G25_WHEEL) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G27_WHEEL) },
+#if IS_ENABLED(CONFIG_HID_LOGITECH_DJ)
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_UNIFYING_RECEIVER) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_UNIFYING_RECEIVER_2) },
+#endif
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WII_WHEEL) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_SPACETRAVELLER) },
#3 lore raw
Quoted 8 lines · Konstantin Khlebnikov
Quoted 7 lines · Nestor Lopez Casado

Hi Konstantin,

This was the original implementation
http://www.spinics.net/lists/linux-input/msg15225.html
Jiri suggested we removed the conditional compilation and we accepted.

Quoted 6 lines
Quoted 1 line

Which are your reasons to add those conditionals back again?

This device can work perfectly without special driver. It does not add any special advantage if there only one mouse and/or one keyboard device. So, I don't see any reason for this strictly requirement of special driver.

I'm OK with that. It's Jiri's call.

Nevertheless, if you change that, please change the description on Kconfig to reflect the fact that the receiver would work even without the driver.

Nestor.

Quoted 41 lines
Quoted 41 lines

Cheers,

Nestor

Quoted 32 lines · Konstantin Khlebnikov

Before commit 534a7b8e1 "HID: Add full support for Logitech Unifying receivers"
Logitech Unifying receiver can work as generic device without special driver,
after that commit these devices does not works without special driver.

After this patch they will use generic driver if special driver is disabled.

---
 drivers/hid/hid-core.c |    2 ++

 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/hid/hid-core.c +1 -0
index af08ce7..3d7a174 100644
@@ -1462,8 +1462,10 @@ static const struct hid_device_id
 hid_have_special_driver[] = {
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH,
 USB_DEVICE_ID_LOGITECH_DFGT_WHEEL) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH,
 USB_DEVICE_ID_LOGITECH_G25_WHEEL) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH,
 USB_DEVICE_ID_LOGITECH_G27_WHEEL) },
+#if IS_ENABLED(CONFIG_HID_LOGITECH_DJ)
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH,

USB_DEVICE_ID_LOGITECH_UNIFYING_RECEIVER) },
       { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH,
USB_DEVICE_ID_LOGITECH_UNIFYING_RECEIVER_2) },

Quoted 9 lines
Quoted 8 lines
Quoted 8 lines

+#endif
       { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH,
USB_DEVICE_ID_LOGITECH_WII_WHEEL) },
       { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH,
USB_DEVICE_ID_LOGITECH_RUMBLEPAD2) },
       { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH,
USB_DEVICE_ID_SPACETRAVELLER) },

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw

PATCH v2 1/1 HID: use generic driver for Logitech Unifying receivers if CONFIG_HID_LOGITECH_DJ=n

In reply to Konstantin Khlebnikov

Before commit 534a7b8e1 "HID: Add full support for Logitech Unifying receivers" Logitech Unifying receiver can work as generic device without special driver, after that commit these devices does not works without special driver.

After this patch they will use generic driver if special driver is disabled.

---
 drivers/hid/Kconfig    |    4 +++-
 drivers/hid/hid-core.c |    2 ++
 2 files changed, 5 insertions(+), 1 deletions(-)
drivers/hid/Kconfig +3 -1
index a421abd..ca322ee 100644
@@ -257,7 +257,9 @@ config HID_LOGITECH_DJ
 	---help---
 	Say Y if you want support for Logitech Unifying receivers and devices.
 	Unifying receivers are capable of pairing up to 6 Logitech compliant
-	devices to the same receiver.
+	devices to the same receiver. Without this driver it will be handled by
+	generic USB_HID driver and all incomming events will be multiplexed
+	into a single mouse and a single keyboard device.
 
 config LOGITECH_FF
 	bool "Logitech force feedback support"
drivers/hid/hid-core.c +2 -0
index af08ce7..3d7a174 100644
@@ -1462,8 +1462,10 @@ static const struct hid_device_id hid_have_special_driver[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_DFGT_WHEEL) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G25_WHEEL) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G27_WHEEL) },
+#if IS_ENABLED(CONFIG_HID_LOGITECH_DJ)
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_UNIFYING_RECEIVER) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_UNIFYING_RECEIVER_2) },
+#endif
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WII_WHEEL) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_SPACETRAVELLER) },
#5 lore raw
Quoted 6 lines · Konstantin Khlebnikov

Before commit 534a7b8e1 "HID: Add full support for Logitech Unifying receivers" Logitech Unifying receiver can work as generic device without special driver, after that commit these devices does not works without special driver.

After this patch they will use generic driver if special driver is disabled.

Okay, I haven't originally fully realized that this device works flawlessly in "single" case without the driver.

I like to avoid polluting the have_special_driver[] with ifdefs, but in this particular case it seems to make sense. So I am queuing this.

Thanks.

Signature · 2 lines
Jiri Kosina
SUSE Labs