public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* sysfs and configuration of a driver
@ 2005-07-12 21:01 Chase Douglas
  0 siblings, 0 replies; only message in thread
From: Chase Douglas @ 2005-07-12 21:01 UTC (permalink / raw)
  To: linux-kernel

I'm trying to update the ati_remote module so that it is configurable
without having to change the source and recompile. I'm rather new to
kernel module development and was wondering how I should go about
creating an interface for configuration. My current implementation
creates a device node for configuration. When you read from it, it dumps
key bindings for the remote. When you write to it, you can change the
key bindings like this:

echo "play KIND_FILTERED 207" > /dev/ati_remote

Which would change the play button on the remote to send the KEY_PLAY
(207 in linux/input.h) button instead of what was previously configured.
This works alright, but it seems to me that this should be handled in
sysfs. I was thinking that since hardly anyone would have more than one
remote, there should be one interface that would configure any remote
that is plugged into the computer. It should be permanent in my opinion
so I thought it should go somewhere in /sys/module/ati_remote/.

Would this be a good way of configuring the remote? If it is, how can I
create a sysfs file in the module directory and not the actual usb
device directory?

If this isn't a good way, how should it be done?

Also, how could a permanent configuration be achieved so that if you
reboot the computer or re-modprobe the driver, your previous mappings
are still intact?

Thank you

P.S.: Please CC me to your responses



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-07-12 21:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-12 21:01 sysfs and configuration of a driver Chase Douglas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox