From: Greg KH <greg@kroah.com>
To: mark@bolhuis.dev
Cc: kernelnewbies@kernelnewbies.org
Subject: Re: HID Monitor Driver Advice
Date: Thu, 15 Apr 2021 17:44:22 +0200 [thread overview]
Message-ID: <YHhfVg4LvmOpIeRI@kroah.com> (raw)
In-Reply-To: <43f7b6ac-0fa9-7e36-6d8c-f0fc54d4566d@gmail.com>
On Thu, Apr 15, 2021 at 04:35:45PM +0100, mark@bolhuis.dev wrote:
> Hi all
>
> My name is Mark and I'm currently writing a device driver for Eizo EV
> FlexScan monitors, so that I can control them over usb. This driver is built
> by reverse engineering the hid reports sent by the propriety and windows
> only software.
> It can be found here: https://github.com/markbolhuis/openeizo
>
> I have some questions about this that hopefully somebody can answer.
>
> 1) What would be the recommended way to interface this with userspace? My
> plan is to expose a device file for each unique setting that the monitor has
> such as brightness control, input selection and so on... However I'm not
> sure this is a suitable way of doing this since the monitors have many
> options that are very similar. For example contiguous numerical values only
> differ by their usage and value min and max, meaning that if I have a file
> per setting there will be a lot of repetition. There are already 40+ unique
> attributes/settings that may need a file.
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?
> 2) To properly initialize the driver I will have to fetch a second report
> descriptor from the monitor. This isn't a standard hid report descriptor. It
> seems that Eizo are simply using the format instead of inventing their own.
> Is there a way for the hid subsystem to parse arbitrary report descriptors
> and expose them as a structure for generic use? I couldn't find much that
> would help with this. hid_parse_report @ inlcude/linux/hid.h:895 seems to be
> the closest to what I need but it's tied to a device.
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
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
next prev parent reply other threads:[~2021-04-15 15:44 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 [this message]
2021-04-15 19:27 ` Mark Bolhuis
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=YHhfVg4LvmOpIeRI@kroah.com \
--to=greg@kroah.com \
--cc=kernelnewbies@kernelnewbies.org \
--cc=mark@bolhuis.dev \
/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