lkml.org 
[lkml]   [2008]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH V4 3/6] Configfs support for IR
On Wed 2008-11-05 14:47:42, Jon Smirl wrote:
> Now uses configfs to build mappings from remote buttons to key strokes. When ir-core loads it creates /config/remotes. Make a directory for each remote you have; this will cause a new input devices to be created. Inside these directories make a directory for each key on the remote. In the key directory attributes fill in the protocol, device, command, keycode. Since this is configfs all of this can be easily scripted.
>
> Now when a key is pressed on a remote, the configfs directories are searched for a match on protocol, device, command. If a matches is found, a key stroke corresponding to keycode is created and sent on the input device that was created when the directory for the remote was made.
>
> The configfs directories are pretty flexible. You can use them to map multiple remotes to the same key stroke, or send a single button push to multiple apps.
> ---
> drivers/input/ir/Makefile | 2
> drivers/input/ir/ir-configfs.c | 333 ++++++++++++++++++++++++++++++++++++++++
> drivers/input/ir/ir-core.c | 15 +-
> 3 files changed, 339 insertions(+), 11 deletions(-)
> create mode 100644 drivers/input/ir/ir-configfs.c
>
> diff --git a/drivers/input/ir/Makefile b/drivers/input/ir/Makefile
> index 6acb665..2ccdda3 100644
> --- a/drivers/input/ir/Makefile
> +++ b/drivers/input/ir/Makefile
> @@ -4,5 +4,5 @@
> # Each configuration option enables a list of files.
>
> obj-$(CONFIG_INPUT_IR) += ir.o
> -ir-objs := ir-core.o
> +ir-objs := ir-core.o ir-configfs.o
>
> diff --git a/drivers/input/ir/ir-configfs.c b/drivers/input/ir/ir-configfs.c
> new file mode 100644
> index 0000000..0fec855
> --- /dev/null
> +++ b/drivers/input/ir/ir-configfs.c
> @@ -0,0 +1,333 @@
> +/*
> + * Configfs routines for IR support
> + *
> + * configfs root
> + * --remotes
> + * ----specific remote
> + * ------keymap
> + * --------protocol
> + * --------device
> + * --------command
> + * --------keycode
> + * ------repeat keymaps
> + * --------....
> + * ----another remote
> + * ------more keymaps
> + * --------....
> + *
> + * Copyright (C) 2008 Jon Smirl <jonsmirl@gmail.com>

GPL?

Maybe those -s should be /s?

Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


\
 
 \ /
  Last update: 2008-11-05 22:43    [W:0.062 / U:4.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site