From: Mark Bolhuis <mark@bolhuis.dev>
To: Greg KH <greg@kroah.com>
Cc: kernelnewbies@kernelnewbies.org
Subject: Re: HID Monitor Driver Advice
Date: Thu, 15 Apr 2021 20:27:58 +0100 [thread overview]
Message-ID: <ba9b5a33-c92b-3a55-8bb9-11ecb117c3bf@bolhuis.dev> (raw)
In-Reply-To: <YHhfVg4LvmOpIeRI@kroah.com>
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
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
next prev parent reply other threads:[~2021-04-15 19:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-15 15:35 HID Monitor Driver Advice mark
2021-04-15 15:44 ` Greg KH
2021-04-15 19:27 ` Mark Bolhuis [this message]
2021-04-16 6:50 ` Greg KH
2021-04-16 7:46 ` Mark Bolhuis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ba9b5a33-c92b-3a55-8bb9-11ecb117c3bf@bolhuis.dev \
--to=mark@bolhuis.dev \
--cc=greg@kroah.com \
--cc=kernelnewbies@kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).