Re: [RFC] What are the goals for the architecture of an in-kernel IR system?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mauro Carvalho Chehab
Date: Friday, March 26, 2010 - 10:22 am

Dmitry Torokhov wrote:

Ok. I'll prepare the patches for adding the new ioctl, in a way that it will
also handle the legacy methods, and post for review.


This don't solve the issue about how to signalize to kernel that more than one
input device is needed. 

As the userspace will request the creation of those keymaps, we need some way
to receive such requests from userspace. 

I can see a few ways for doing it:

1) create a control device for the irrcv device as a hole,
that would handle such requests via ioctl (/dev/irctl[0-9]* ?)

2) create a read/write sysfs node that would indicate the number of event/keymaps
associated with a given IR. By writing a bigger number, it would create new devices.
By writing a smaller number, it will delete some maps. There's an issue though: 
what criteria would be used to delete? The newly created ones?

3) create a fixed number of event devices, and add a sysfs attribute to enable
or disable it;

4) create a fixed number of sysfs attributes to represent the keymaps. For example:
/sys/class/irrcv/irrcv0/keymap0/enabled
	...
/sys/class/irrcv/irrcv0/keymap7/enabled

The input/event node will be created only when the enabled=1.

I don't like (2) or (3), because removing a table with (2) may end by removing the wrong
table, and (3) will create more event interfaces than probably needed by the majority
of IR users.

maybe (4) is the better one.

-- 

Cheers,
Mauro
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [RFC] What are the goals for the architecture of an in ..., Christoph Bartelmus, (Fri Dec 4, 4:01 pm)
Re: [RFC] What are the goals for the architecture of an in ..., Mauro Carvalho Chehab, (Sun Dec 6, 4:46 am)
Re: [RFC] What are the goals for the architecture of an in ..., Mauro Carvalho Chehab, (Mon Dec 7, 8:36 am)
Re: [RFC] What are the goals for the architecture of an in ..., Mauro Carvalho Chehab, (Mon Dec 7, 4:44 pm)
Re: [RFC] What are the goals for the architecture of an in ..., Mauro Carvalho Chehab, (Tue Dec 8, 4:17 am)
Re: [RFC] What are the goals for the architecture of an in ..., Mauro Carvalho Chehab, (Tue Dec 8, 4:23 am)
Re: [RFC] What are the goals for the architecture of an in ..., Mauro Carvalho Chehab, (Tue Dec 8, 4:58 am)
Re: [RFC] What are the goals for the architecture of an in ..., Mauro Carvalho Chehab, (Tue Dec 8, 7:07 am)
Re: [RFC] What are the goals for the architecture of an in ..., Mauro Carvalho Chehab, (Tue Dec 8, 7:13 am)
Re: [RFC] What are the goals for the architecture of an in ..., Mauro Carvalho Chehab, (Tue Dec 8, 7:56 am)
Re: [RFC] What are the goals for the architecture of an in ..., Mauro Carvalho Chehab, (Tue Dec 8, 8:41 am)
Re: [RFC] What are the goals for the architecture of an in ..., Mauro Carvalho Chehab, (Tue Dec 8, 8:49 am)
Re: [RFC] What are the goals for the architecture of an in ..., Mauro Carvalho Chehab, (Sun Dec 13, 5:14 am)
Re: [RFC] What are the goals for the architecture of an in ..., Mauro Carvalho Chehab, (Tue Dec 15, 6:33 am)
Re: [RFC] What are the goals for the architecture of an in ..., Mauro Carvalho Chehab, (Tue Dec 15, 7:19 am)
Re: [RFC] What are the goals for the architecture of an in ..., Mauro Carvalho Chehab, (Thu Mar 25, 7:42 am)
Re: [RFC] What are the goals for the architecture of an in ..., Mauro Carvalho Chehab, (Thu Mar 25, 12:00 pm)
Re: [RFC] What are the goals for the architecture of an in ..., David =?iso-8859-1?Q ..., (Fri Mar 26, 4:04 am)
Re: [RFC] What are the goals for the architecture of an in ..., David =?iso-8859-1?Q ..., (Fri Mar 26, 4:27 am)
Re: [RFC] What are the goals for the architecture of an in ..., David =?iso-8859-1?Q ..., (Fri Mar 26, 5:23 am)
Re: [RFC] What are the goals for the architecture of an in ..., Mauro Carvalho Chehab, (Fri Mar 26, 7:40 am)
Re: [RFC] What are the goals for the architecture of an in ..., Mauro Carvalho Chehab, (Fri Mar 26, 8:17 am)
Re: [RFC] What are the goals for the architecture of an in ..., Mauro Carvalho Chehab, (Fri Mar 26, 10:22 am)
Re: [RFC] What are the goals for the architecture of an in ..., David =?iso-8859-1?Q ..., (Fri Mar 26, 12:07 pm)
Re: [RFC] What are the goals for the architecture of an in ..., David =?iso-8859-1?Q ..., (Fri Mar 26, 12:21 pm)
Re: [RFC] What are the goals for the architecture of an in ..., David =?iso-8859-1?Q ..., (Sat Mar 27, 1:27 am)
Re: [RFC] What are the goals for the architecture of an in ..., Mauro Carvalho Chehab, (Sun Mar 28, 4:22 pm)
Re: [RFC] What are the goals for the architecture of an in ..., Mauro Carvalho Chehab, (Sun Mar 28, 5:51 pm)
Re: [RFC] What are the goals for the architecture of an in ..., David =?iso-8859-1?Q ..., (Tue Mar 30, 4:01 am)
Re: [RFC] What are the goals for the architecture of an in ..., David =?iso-8859-1?Q ..., (Tue Mar 30, 4:09 am)
Re: [RFC] What are the goals for the architecture of an in ..., Mauro Carvalho Chehab, (Tue Mar 30, 5:43 am)
Re: [RFC] What are the goals for the architecture of an in ..., Mauro Carvalho Chehab, (Tue Mar 30, 11:01 pm)
Re: [RFC] What are the goals for the architecture of an in ..., Mauro Carvalho Chehab, (Fri Apr 9, 6:01 am)
Re: [RFC] What are the goals for the architecture of an in ..., Mauro Carvalho Chehab, (Fri Apr 9, 4:32 pm)
Re: [RFC] What are the goals for the architecture of an in ..., Mauro Carvalho Chehab, (Fri Apr 9, 6:01 pm)