From: "Clément Vuchener" <clement.vuchener@gmail.com>
To: Piotr Sawuk <piotr5@users.sf.net>, linux-input@vger.kernel.org
Subject: Re: [PATCH 1/1] R.A.T.5 also works with hid-saitek
Date: Sun, 3 Jan 2016 11:45:29 +0100 [thread overview]
Message-ID: <5688FBC9.1070403@gmail.com> (raw)
In-Reply-To: <56841599.5050800@users.sf.net>
On 12/30/2015 06:34 PM, Piotr Sawuk wrote:
> sorry for the old kernel. tell me if it failed to apply.
You should send your patch to the appropriate maintainers (use the get_maintainer.pl script) and your patch should be inline (not an attachment). See documentation/SubmittingPatches for more information.
>
> and I have a question, since I know nothing of linux-programming:
> in include/linux/hidraw.h there is a struct hidraw defined.
> obviously one of these is assigned to each device.
> also hid-saitek.c uses that and stores its data inside.
> more exactly in ->hid->dev->mode is a value I'd like to read.
>From what I read, it uses the driver data pointer from the hid_device structure. As its name imply, it is a way for a driver to attach some data to a device for internal use (only the driver knows its meaning).
> what is the proper way to do that? is it possible from userspace?
> hid-saitek module removes information on what colour the mode-LED has.
> that information is stored in the mode variable of struct saitec_sc.
> since that struct is only defined in the c-sources, I have a problem?
> would it be sufficient to move that definition into include/?
> any suggestions on where to?
You can add a sysfs attribute to expose the value to userspace, you should find plenty of example code around.
If you have more questions, I suggest you send them to the kernelnewbies mailing list, you may get more help there.
>
> P
next prev parent reply other threads:[~2016-01-03 10:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-30 17:34 [PATCH 1/1] R.A.T.5 also works with hid-saitek Piotr Sawuk
2016-01-03 10:45 ` Clément Vuchener [this message]
2016-01-09 12:36 ` Piotr Sawuk
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=5688FBC9.1070403@gmail.com \
--to=clement.vuchener@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=piotr5@users.sf.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.