HID Monitor Driver Advice
Mark Bolhuis
mark at bolhuis.dev
Thu Apr 15 15:27:58 EDT 2021
On 15/04/2021 16:44, Greg KH wrote:
> Why do you need a kernel driver at all? Why not just use the userspace
> hid access and control stuff that way from an application? >
> If you write your own driver, you can do that from within the driver I
> think. But again, what's wrong with userspace?
>
> thanks,
>
> greg k-h
A couple reasons. These might be misplaced since I'm very new to kernel
programming.
I would like to create very simple user space scripts and programs on
top of it. I'd like to change settings with nothing more than an `echo
200 > brightness`. Something has to keep track of an internal state,
which I'd rather not happen in userspace apps, so I decided on a driver.
I'd like to eventually use linux/backlight.h to control brightness
which, correct me if I'm wrong, has to be used from a kernel driver. Or
is this an unsuitable use case?
I assume you are referring to uhid? I've got no issue using it but my
initial impressions led me to think it wouldn't have been as elegant.
Again I could be wrong. I'll do some more research on it.
Thanks
Mark
More information about the Kernelnewbies
mailing list