kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Generic USB LED HID driver
@ 2024-01-19 10:21 Kirill Yatsenko
  2024-01-19 11:17 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Kirill Yatsenko @ 2024-01-19 10:21 UTC (permalink / raw)
  To: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 639 bytes --]

Hello,

I'm trying to find the Linux kernel driver in the tree that implements the
HID LED usage table.
The only driver that I've found is the hid-led.c. However, it seems to
support only specific devices.

The device with which I'm trying to interface is the custom-made board with
atxmega and some LEDS connected to it.
Currently, the communication is done through the vendor-specific HID
protocol.
The custom USB HID kernel module is implemented to communicate with the
device.

The idea is to move away from the custom protocol to the generic
implementation so that the custom kernel
module can dropped.

Best regards,
Kirill Yatsenko

[-- Attachment #1.2: Type: text/html, Size: 825 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Generic USB LED HID driver
  2024-01-19 10:21 Generic USB LED HID driver Kirill Yatsenko
@ 2024-01-19 11:17 ` Greg KH
  2024-01-19 11:45   ` Kirill Yatsenko
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2024-01-19 11:17 UTC (permalink / raw)
  To: Kirill Yatsenko; +Cc: kernelnewbies

On Fri, Jan 19, 2024 at 11:21:51AM +0100, Kirill Yatsenko wrote:
> Hello,
> 
> I'm trying to find the Linux kernel driver in the tree that implements the
> HID LED usage table.
> The only driver that I've found is the hid-led.c. However, it seems to
> support only specific devices.
> 
> The device with which I'm trying to interface is the custom-made board with
> atxmega and some LEDS connected to it.
> Currently, the communication is done through the vendor-specific HID
> protocol.
> The custom USB HID kernel module is implemented to communicate with the
> device.

Why not do this from userspace using libusb or the generic hid userspace
api?  Why do you need a kernel driver?

thanks,

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Generic USB LED HID driver
  2024-01-19 11:17 ` Greg KH
@ 2024-01-19 11:45   ` Kirill Yatsenko
  2024-01-19 12:07     ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Kirill Yatsenko @ 2024-01-19 11:45 UTC (permalink / raw)
  To: Greg KH; +Cc: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 1214 bytes --]

Hello Greg,

Thanks for the suggestions!
Yes, it will be better to implement the communication from the userspace.

However, I was curious if the kernel implements some generic LED HID
interface already,
without the need to write custom code. Similarly, as it's done for example
for the HID multitouch,
where the device only needs to report the correct report descriptor.

Best regards,
Kirill Yatsenko

On Fri, 19 Jan 2024 at 12:17, Greg KH <greg@kroah.com> wrote:

> On Fri, Jan 19, 2024 at 11:21:51AM +0100, Kirill Yatsenko wrote:
> > Hello,
> >
> > I'm trying to find the Linux kernel driver in the tree that implements
> the
> > HID LED usage table.
> > The only driver that I've found is the hid-led.c. However, it seems to
> > support only specific devices.
> >
> > The device with which I'm trying to interface is the custom-made board
> with
> > atxmega and some LEDS connected to it.
> > Currently, the communication is done through the vendor-specific HID
> > protocol.
> > The custom USB HID kernel module is implemented to communicate with the
> > device.
>
> Why not do this from userspace using libusb or the generic hid userspace
> api?  Why do you need a kernel driver?
>
> thanks,
>
> greg k-h
>

[-- Attachment #1.2: Type: text/html, Size: 1728 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Generic USB LED HID driver
  2024-01-19 11:45   ` Kirill Yatsenko
@ 2024-01-19 12:07     ` Greg KH
  2024-01-19 12:40       ` Kirill Yatsenko
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2024-01-19 12:07 UTC (permalink / raw)
  To: Kirill Yatsenko; +Cc: kernelnewbies

On Fri, Jan 19, 2024 at 12:45:52PM +0100, Kirill Yatsenko wrote:
> Hello Greg,
> 
> Thanks for the suggestions!
> Yes, it will be better to implement the communication from the userspace.
> 
> However, I was curious if the kernel implements some generic LED HID
> interface already,
> without the need to write custom code. Similarly, as it's done for example
> for the HID multitouch,
> where the device only needs to report the correct report descriptor.

I do not think there is a generic HID description yet, is there?  If so,
the kernel should support it, otherwise it is all vendor-specific stuff
that belongs in userspace.

thanks,

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Generic USB LED HID driver
  2024-01-19 12:07     ` Greg KH
@ 2024-01-19 12:40       ` Kirill Yatsenko
  0 siblings, 0 replies; 5+ messages in thread
From: Kirill Yatsenko @ 2024-01-19 12:40 UTC (permalink / raw)
  To: Greg KH; +Cc: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 1552 bytes --]

> > Hello Greg,
> >
> > Thanks for the suggestions!
> > Yes, it will be better to implement the communication from the
userspace.
> >
> > However, I was curious if the kernel implements some generic LED HID
> > interface already,
> > without the need to write custom code. Similarly, as it's done for
example
> > for the HID multitouch,
> > where the device only needs to report the correct report descriptor.

> I do not think there is a generic HID description yet, is there?  If so,
> the kernel should support it, otherwise it is all vendor-specific stuff
> that belongs in userspace.

Thanks again for your answer.
There is "LED Page" defined in HID Usage Tables. However, I can't find any
drivers that implement it.

But maybe I'm looking in the wrong direction.

Best regards,
Kirill Yatsenko



On Fri, 19 Jan 2024 at 13:07, Greg KH <greg@kroah.com> wrote:

> On Fri, Jan 19, 2024 at 12:45:52PM +0100, Kirill Yatsenko wrote:
> > Hello Greg,
> >
> > Thanks for the suggestions!
> > Yes, it will be better to implement the communication from the userspace.
> >
> > However, I was curious if the kernel implements some generic LED HID
> > interface already,
> > without the need to write custom code. Similarly, as it's done for
> example
> > for the HID multitouch,
> > where the device only needs to report the correct report descriptor.
>
> I do not think there is a generic HID description yet, is there?  If so,
> the kernel should support it, otherwise it is all vendor-specific stuff
> that belongs in userspace.
>
> thanks,
>
> greg k-h
>

[-- Attachment #1.2: Type: text/html, Size: 2134 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-01-19 12:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-19 10:21 Generic USB LED HID driver Kirill Yatsenko
2024-01-19 11:17 ` Greg KH
2024-01-19 11:45   ` Kirill Yatsenko
2024-01-19 12:07     ` Greg KH
2024-01-19 12:40       ` Kirill Yatsenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).