* [PATCH] HID: logitech-dj: add HIDRAW dependency in Kconfig @ 2013-12-02 23:17 Olivier Gay 2013-12-03 7:53 ` Jiri Kosina 0 siblings, 1 reply; 6+ messages in thread From: Olivier Gay @ 2013-12-02 23:17 UTC (permalink / raw) To: linux-input Cc: Jiri Kosina, linux-kernel, Olivier Gay, Nestor Lopez Casado, Mathieu Meisser hid-logitech-dj.c driver needs hidraw to work correctly. Without hidraw, hid-logitech-dj.c fails during probe() and Logitech Unifying devices HID reports aren't recognized. Signed-off-by: Olivier Gay <ogay@logitech.com> Signed-off-by: Nestor Lopez Casado <nlopezcasad@logitech.com> Signed-off-by: Mathieu Meisser <mmeisser@logitech.com> --- Hi everyone, this adds a HIDRAW dependency in Kconfig for hid-logitech-dj.c driver. The driver uses hidraw and needs it to work correctly. Without hidraw if a Logitech Unifying device is plugged, the driver fails during probe() and Logitech Unifying devices HID reports aren't recognized. This has been the cause of some confusion. Some Linux and Android distributions had HID_LOGITECH_DJ enabled without HIDRAW and the Unifying mice and keyboards would simply not work (no cursor tracking / no keyboard typing). Best regards, Olivier drivers/hid/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig index 329fbb9..c8a66b9 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig @@ -344,6 +344,7 @@ config HID_LOGITECH config HID_LOGITECH_DJ tristate "Logitech Unifying receivers full support" + depends on HIDRAW depends on HID_LOGITECH ---help--- Say Y if you want support for Logitech Unifying receivers and devices. -- 1.8.4 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] HID: logitech-dj: add HIDRAW dependency in Kconfig 2013-12-02 23:17 [PATCH] HID: logitech-dj: add HIDRAW dependency in Kconfig Olivier Gay @ 2013-12-03 7:53 ` Jiri Kosina 2013-12-03 10:30 ` Olivier Gay 0 siblings, 1 reply; 6+ messages in thread From: Jiri Kosina @ 2013-12-03 7:53 UTC (permalink / raw) To: Olivier Gay Cc: linux-input, linux-kernel, Nestor Lopez Casado, Mathieu Meisser On Tue, 3 Dec 2013, Olivier Gay wrote: > hid-logitech-dj.c driver needs hidraw to work correctly. Without > hidraw, hid-logitech-dj.c fails during probe() and Logitech > Unifying devices HID reports aren't recognized. > > Signed-off-by: Olivier Gay <ogay@logitech.com> > Signed-off-by: Nestor Lopez Casado <nlopezcasad@logitech.com> > Signed-off-by: Mathieu Meisser <mmeisser@logitech.com> > --- > > Hi everyone, > > this adds a HIDRAW dependency in Kconfig for hid-logitech-dj.c > driver. The driver uses hidraw and needs it to work correctly. > > Without hidraw if a Logitech Unifying device is plugged, the driver > fails during probe() and Logitech Unifying devices HID reports aren't > recognized. This has been the cause of some confusion. Some Linux and > Android distributions had HID_LOGITECH_DJ enabled without HIDRAW and > the Unifying mice and keyboards would simply not work (no cursor Hi Oliver, I don't have my receiver with me at the moment, so can't really verify -- how exactly does it fail during probe()? It's clear that without hidraw it's not possible to change the pairing from userspace, but I fail to see why probing the receiver should be affected? Thanks, -- Jiri Kosina SUSE Labs ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] HID: logitech-dj: add HIDRAW dependency in Kconfig 2013-12-03 7:53 ` Jiri Kosina @ 2013-12-03 10:30 ` Olivier Gay 2013-12-03 12:51 ` Jiri Kosina 0 siblings, 1 reply; 6+ messages in thread From: Olivier Gay @ 2013-12-03 10:30 UTC (permalink / raw) To: Jiri Kosina Cc: linux-input, linux-kernel, Nestor Lopez Casado, Mathieu Meisser >On Tue, Dec 3, 2013 at 8:53 AM, Jiri Kosina <jkosina@suse.cz> wrote: > I don't have my receiver with me at the moment, so can't really verify -- > how exactly does it fail during probe()? Hi Jiri, Without hidraw driver, we get this: <3>[ 210.131988] logitech-djreceiver 0003:046D:C52B.0005: claimed by neither input, hiddev nor hidraw <3>[ 210.132202] logitech-djreceiver 0003:046D:C52B.0005: logi_dj_probe:hid_hw_start returned error In logi_dj_probe, we call hid_hw_start with HID_CONNECT_DEFAULT argument and if hidraw driver is not present, the call fails and we return an error in logi_dj_probe. > It's clear that without hidraw it's not possible to change the pairing > from userspace, but I fail to see why probing the receiver should be > affected? As of today, hid-logitech-dj.c depends on hidraw API to work. All HID reports sent to control / configure the receiver are sent using hidraw API. That's why we fail logi_dj_probe if we cannot connect to hidraw. Best regards, Olivier ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] HID: logitech-dj: add HIDRAW dependency in Kconfig 2013-12-03 10:30 ` Olivier Gay @ 2013-12-03 12:51 ` Jiri Kosina [not found] ` <CAE7qMrq6YzvprAGDTO8uEU9WZXXGpP=TG_OxB6=-1KuF1Tr8sg@mail.gmail.com> 0 siblings, 1 reply; 6+ messages in thread From: Jiri Kosina @ 2013-12-03 12:51 UTC (permalink / raw) To: Olivier Gay Cc: linux-input, linux-kernel, Nestor Lopez Casado, Mathieu Meisser On Tue, 3 Dec 2013, Olivier Gay wrote: > Without hidraw driver, we get this: > > <3>[ 210.131988] logitech-djreceiver 0003:046D:C52B.0005: claimed by > neither input, hiddev nor hidraw > <3>[ 210.132202] logitech-djreceiver 0003:046D:C52B.0005: > logi_dj_probe:hid_hw_start returned error > > In logi_dj_probe, we call hid_hw_start with HID_CONNECT_DEFAULT > argument and if hidraw driver is not present, the call fails and we > return an error in logi_dj_probe. > > > It's clear that without hidraw it's not possible to change the pairing > > from userspace, but I fail to see why probing the receiver should be > > affected? > > As of today, hid-logitech-dj.c depends on hidraw API to work. All HID > reports sent to control / configure the receiver are sent using hidraw > API. That's why we fail logi_dj_probe if we cannot connect to hidraw. Hmm, so unifying receiver is not claimed by hid-input at all? (HID_CONNECT_DEFAULT also contains HID_CONNECT_HIDINPUT) How so? (again, I will not be able to test it with my receiver up until the day after tomorrow). Thanks, -- Jiri Kosina SUSE Labs ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <CAE7qMrq6YzvprAGDTO8uEU9WZXXGpP=TG_OxB6=-1KuF1Tr8sg@mail.gmail.com>]
* Re: [PATCH] HID: logitech-dj: add HIDRAW dependency in Kconfig [not found] ` <CAE7qMrq6YzvprAGDTO8uEU9WZXXGpP=TG_OxB6=-1KuF1Tr8sg@mail.gmail.com> @ 2013-12-03 14:03 ` Nestor Lopez Casado 2013-12-03 14:08 ` Jiri Kosina 1 sibling, 0 replies; 6+ messages in thread From: Nestor Lopez Casado @ 2013-12-03 14:03 UTC (permalink / raw) To: Jiri Kosina Cc: Olivier Gay, open list:HID CORE LAYER, linux-kernel@vger.kernel.org, Mathieu Meisser Sorry, no html now. On Tue, Dec 3, 2013 at 3:01 PM, Nestor Lopez Casado <nlopezcasad@logitech.com> wrote: > > > > > On Tue, Dec 3, 2013 at 1:51 PM, Jiri Kosina <jkosina@suse.cz> wrote: >> >> On Tue, 3 Dec 2013, Olivier Gay wrote: >> >> > Without hidraw driver, we get this: >> > >> > <3>[ 210.131988] logitech-djreceiver 0003:046D:C52B.0005: claimed by >> > neither input, hiddev nor hidraw >> > <3>[ 210.132202] logitech-djreceiver 0003:046D:C52B.0005: >> > logi_dj_probe:hid_hw_start returned error >> > >> > In logi_dj_probe, we call hid_hw_start with HID_CONNECT_DEFAULT >> > argument and if hidraw driver is not present, the call fails and we >> > return an error in logi_dj_probe. >> > >> > > It's clear that without hidraw it's not possible to change the pairing >> > > from userspace, but I fail to see why probing the receiver should be >> > > affected? >> > >> > As of today, hid-logitech-dj.c depends on hidraw API to work. All HID >> > reports sent to control / configure the receiver are sent using hidraw >> > API. That's why we fail logi_dj_probe if we cannot connect to hidraw. >> >> Hmm, so unifying receiver is not claimed by hid-input at all? >> (HID_CONNECT_DEFAULT also contains HID_CONNECT_HIDINPUT) How so? >> >> (again, I will not be able to test it with my receiver up until the day >> after tomorrow). > > The unifying receiver has 3 usb interfaces. When hid-logitech-dj driver is loaded, interfaces 0 and 1 are discarded. > > Interface 2 consists of a hid class interface with 3 collections, each of which sports the 'vendor' usage, thus, there is no reason for hid_input to claim any of them. On the other hand, hidraw has no issue in claiming the collections, even if they are 'vendor'. As of today, hid-logitech-dj uses hidraw api to send configuration/control reports to interface 2 of the Unifying receiver. > > Without the hid-logitech-dj driver, interfaces 0 and 1 are claimed by hid-input, as they correspond to a keyboard and a mouse. But that is not relevant to the discussion. >> >> >> Thanks, >> >> -- >> Jiri Kosina >> SUSE Labs > > Cheers, > -nestor > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] HID: logitech-dj: add HIDRAW dependency in Kconfig [not found] ` <CAE7qMrq6YzvprAGDTO8uEU9WZXXGpP=TG_OxB6=-1KuF1Tr8sg@mail.gmail.com> 2013-12-03 14:03 ` Nestor Lopez Casado @ 2013-12-03 14:08 ` Jiri Kosina 1 sibling, 0 replies; 6+ messages in thread From: Jiri Kosina @ 2013-12-03 14:08 UTC (permalink / raw) To: Nestor Lopez Casado Cc: Olivier Gay, open list:HID CORE LAYER, linux-kernel@vger.kernel.org, Mathieu Meisser On Tue, 3 Dec 2013, Nestor Lopez Casado wrote: > > > <3>[ 210.131988] logitech-djreceiver 0003:046D:C52B.0005: claimed by > > > neither input, hiddev nor hidraw > > > <3>[ 210.132202] logitech-djreceiver 0003:046D:C52B.0005: > > > logi_dj_probe:hid_hw_start returned error > > > > > > In logi_dj_probe, we call hid_hw_start with HID_CONNECT_DEFAULT > > > argument and if hidraw driver is not present, the call fails and we > > > return an error in logi_dj_probe. > > > > > > > It's clear that without hidraw it's not possible to change the pairing > > > > from userspace, but I fail to see why probing the receiver should be > > > > affected? > > > > > > As of today, hid-logitech-dj.c depends on hidraw API to work. All HID > > > reports sent to control / configure the receiver are sent using hidraw > > > API. That's why we fail logi_dj_probe if we cannot connect to hidraw. > > > > Hmm, so unifying receiver is not claimed by hid-input at all? > > (HID_CONNECT_DEFAULT also contains HID_CONNECT_HIDINPUT) How so? > > > > (again, I will not be able to test it with my receiver up until the day > > after tomorrow). > > > The unifying receiver has 3 usb interfaces. When hid-logitech-dj driver is > loaded, interfaces 0 and 1 are discarded. > > Interface 2 consists of a hid class interface with 3 collections, each of > which sports the 'vendor' usage, thus, there is no reason for hid_input to > claim any of them. On the other hand, hidraw has no issue in claiming the > collections, even if they are 'vendor'. As of today, hid-logitech-dj uses > hidraw api to send configuration/control reports to interface 2 of the > Unifying receiver. > > Without the hid-logitech-dj driver, interfaces 0 and 1 are claimed by > hid-input, as they correspond to a keyboard and a mouse. But that is not > relevant to the discussion. Ah, indeed, that's the part I forgot and will find out only when I have my receiver handy again. Thanks for the explanation, now it all makes sense. I will be queuing the patch, with probably slightly more verbose changelog. -- Jiri Kosina SUSE Labs ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-12-03 14:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-02 23:17 [PATCH] HID: logitech-dj: add HIDRAW dependency in Kconfig Olivier Gay
2013-12-03 7:53 ` Jiri Kosina
2013-12-03 10:30 ` Olivier Gay
2013-12-03 12:51 ` Jiri Kosina
[not found] ` <CAE7qMrq6YzvprAGDTO8uEU9WZXXGpP=TG_OxB6=-1KuF1Tr8sg@mail.gmail.com>
2013-12-03 14:03 ` Nestor Lopez Casado
2013-12-03 14:08 ` Jiri Kosina
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox