public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] ir-kbd-i2c conversion to the new i2c binding model
@ 2009-04-04 12:24 Jean Delvare
  2009-04-04 12:26 ` [PATCH 1/6] cx18: Fix the handling of i2c bus registration error Jean Delvare
                   ` (7 more replies)
  0 siblings, 8 replies; 74+ messages in thread
From: Jean Delvare @ 2009-04-04 12:24 UTC (permalink / raw)
  To: LMML; +Cc: Andy Walls, Hans Verkuil, Mauro Carvalho Chehab, Mike Isely

Hi all,

Here finally comes my conversion of ir-kbd-i2c to the new i2c binding
model. I've split it into 6 pieces for easier review. Firstly there are
2 preliminary patches:

media-video-01-cx18-fix-i2c-error-handling.patch
media-video-02-ir-kbd-i2c-dont-abuse-client-name.patch

Then 2 patches doing the actual conversion:

media-video-03-ir-kbd-i2c-convert-to-new-style.patch
media-video-04-configure-ir-receiver.patch

And lastly 2 patches cleaning up saa7134-input thanks to the new
possibilities offered by the conversion:

media-video-05-saa7134-input-cleanup-msi-ir.patch
media-video-06-saa7134-input-cleanup-avermedia-cardbus.patch

This patch set is against the v4l-dvb repository, but I didn't pay
attention to the compatibility issues. I simply build-tested it on
2.6.27 and 2.6.29.

This patch set touches many different drivers and I can't test any of
them. My only TV card with an IR receiver doesn't make use of
ir-kbd-i2c. So I would warmly welcome testers. The more testing my
changes can get, the better.

And of course I welcome reviews and comments as well. I had to touch
many drivers I don't know anything about so it is possible that I
missed something.

I'll post all 6 patches as replies to this post. They can also be
temporarily downloaded from:
  http://jdelvare.pck.nerim.net/linux/ir-kbd-i2c/
Additionally I've put a combined patch there, to make testing easier:
  http://jdelvare.pck.nerim.net/linux/ir-kbd-i2c/ir-kbd-i2c-conversion-ALL-IN-ONE.patch
But for review the individual patches are much better.

Thanks,
-- 
Jean Delvare

^ permalink raw reply	[flat|nested] 74+ messages in thread
* Re: [PATCH 3/6] ir-kbd-i2c: Switch to the new-style device binding model
@ 2009-04-06  5:35 Uri Shkolnik
  2009-04-06 10:45 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 74+ messages in thread
From: Uri Shkolnik @ 2009-04-06  5:35 UTC (permalink / raw)
  To: Andy Walls, Mauro Carvalho Chehab
  Cc: hermann pitton, Jean Delvare, Janne Grunau, Hans Verkuil,
	Mike Isely, isely, LMML, Jarod Wilson




--- On Mon, 4/6/09, Mauro Carvalho Chehab <mchehab@infradead.org> wrote:

> From: Mauro Carvalho Chehab <mchehab@infradead.org>
> Subject: Re: [PATCH 3/6] ir-kbd-i2c: Switch to the new-style device binding model
> To: "Andy Walls" <awalls@radix.net>
> Cc: "hermann pitton" <hermann-pitton@arcor.de>, "Jean Delvare" <khali@linux-fr.org>, "Janne Grunau" <j@jannau.net>, "Hans Verkuil" <hverkuil@xs4all.nl>, "Mike Isely" <isely@pobox.com>, isely@isely.net, "LMML" <linux-media@vger.kernel.org>, "Jarod Wilson" <jarod@redhat.com>
> Date: Monday, April 6, 2009, 4:51 AM
> On Sun, 05 Apr 2009 18:00:04 -0400
> Andy Walls <awalls@radix.net>
> wrote:
> 
> > On Sun, 2009-04-05 at 23:22 +0200, hermann pitton
> wrote:
> > > Am Sonntag, den 05.04.2009, 22:22 +0200 schrieb
> Jean Delvare:
> > > > On Sun, 05 Apr 2009 14:58:17 -0400, Andy
> Walls wrote:
> > 
> > 
> > > What can not be translated to the input system I
> would like to know.
> > > Andy seems to have closer looked into that.
> > 
> > 1. IR blasting: sending IR codes to transmit out to a
> cable convertor
> > box, DTV to analog convertor box, or similar devices
> to change channels
> > before recording starts.  An input interface
> doesn't work well for
> > output.
> 
> On my understanding, IR output is a separate issue. AFAIK,
> only a very few ivtv
> devices support IR output. I'm not sure how this is
> currently implemented.
> 
> 
> > 2. Sending raw IR samples to user space: user space
> applications can
> > then decode or match an unknown or non-standard IR
> remote protocol in
> > user space software.  Timing information to go
> along with the sample
> > data probably needs to be
> preserved.   I'm assuming the input
> interface
> > currently doesn't support that.
> 
> If the driver processes correctly the IR samples, I don't
> see why you would
> need to pass the raw protocols to userspace. Maybe we need
> to add some ioctls
> at the API to allow certain controls, like, for example,
> ask kernel to decode
> IR using RC4 instead or RC5, on devices that supports more
> than one IR protocol.
> 
> > That's all the Gerd mentioned.
> > 
> > 
> > One more nice feature to have, that I'm not sure how
> easily the input
> > system could support:
> > 
> > 3. specifying remote control code to key/button
> translations with a
> > configuration file instead of recompiling a module.
> 
> The input and the current drivers that use input already
> supports this feature.
> You just need to load a new code table to replace the
> existing one.
> 
> See v4l2-apps/util/keytable.c to see how easy is to change
> a key code. It
> contains a complete code to fully replace a key code table.
> Also, the Makefile
> there will extract the current keytables for the in-kernel
> drivers.
> 
> Btw, with only 12 lines, you can create a keycode replace
> "hello world!":
> 
> #include <fcntl.h>   
>     /* due to O_RDONLY */
> #include <stdio.h>   
>     /* open() */
> #include <linux/input.h>    /* input
> ioctls and keycode macros */
> #include <sys/ioctl.h>   
>     /* ioctl() */
> void main(void)
> {
>     int codes[2];
>     int fd = open("/dev/video0",
> O_RDONLY);    /* Hmm.. in real apps, we
> should check for errors */
>     codes[0] = 10;   
>             /*
> Scan code */
>     codes[1] = KEY_UP;   
>         /* Key code */
>     ioctl(fd, EVIOCSKEYCODE,
> codes);    /* hello world! */
> }
> 
> Cheers,
> Mauro
> --
> To unsubscribe from this list: send the line "unsubscribe
> linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


Hi,

ir-kbd-i2c is a confusing name and wrong architecture if all are truly combined together.

Why to combine interface driver (I2C) with logical implementation (RC5 samples to input device codes)?

There are many IR hardware devices which are not I2C based. Lately I added a patch (http://patchwork.kernel.org/patch/16406/) which uses such IR device.

There should be a complete separation between I2C interface driver with RC5 (and/or RCMM) data output, to the ir-kbd (RC5/kbd, RCMM/kbd) module, which should only convert RC5 sample to system events (either input device/keyboard, or IOCTL events sent through the DVB characters devices to user space).

If the code will stay combined (ir-kbd-i2c) than for other than I2C interface drivers, we'll have to add a duplicated (redundant) logical layer to handle the RC5 to system events layer (which already exist at the ir-kbd-i2c).

Uri


      

^ permalink raw reply	[flat|nested] 74+ messages in thread

end of thread, other threads:[~2009-04-17 13:43 UTC | newest]

Thread overview: 74+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-04 12:24 [PATCH 0/6] ir-kbd-i2c conversion to the new i2c binding model Jean Delvare
2009-04-04 12:26 ` [PATCH 1/6] cx18: Fix the handling of i2c bus registration error Jean Delvare
2009-04-04 12:46   ` Andy Walls
2009-04-04 14:23     ` Jean Delvare
2009-04-04 22:30       ` Andy Walls
2009-04-07  9:31     ` Jean Delvare
2009-04-07 12:14       ` Andy Walls
2009-04-04 12:27 ` [PATCH 2/6] ir-kbd-i2c: Don't use i2c_client.name for our own needs Jean Delvare
2009-04-04 12:28 ` [PATCH 3/6] ir-kbd-i2c: Switch to the new-style device binding model Jean Delvare
2009-04-04 13:42   ` Andy Walls
2009-04-04 16:05     ` Mike Isely
2009-04-04 22:24       ` Andy Walls
2009-04-04 22:39         ` Andy Walls
2009-04-04 22:51     ` Jean Delvare
2009-04-05  1:50       ` Andy Walls
2009-04-05 13:08         ` Jean Delvare
2009-04-05 18:13           ` Andy Walls
2009-04-04 15:51   ` Mike Isely
2009-04-04 23:05     ` Jean Delvare
2009-04-04 23:29       ` Mike Isely
2009-04-05 14:18         ` Jean Delvare
2009-04-05 18:33           ` Mike Isely
2009-04-05 20:19             ` Andy Walls
2009-04-06  3:48               ` Trent Piepho
2009-04-06  3:53             ` pvrusb2 IR changes coming [was: [PATCH 3/6] ir-kbd-i2c: Switch to the new-style device binding model] Mike Isely
2009-04-05  5:46       ` [PATCH 3/6] ir-kbd-i2c: Switch to the new-style device binding model Hans Verkuil
2009-04-05  9:14         ` Mauro Carvalho Chehab
2009-04-05 12:44           ` Andy Walls
2009-04-06 13:08             ` Mauro Carvalho Chehab
2009-04-05 14:05         ` Jean Delvare
2009-04-05 19:35           ` Andy Walls
2009-04-06  9:04             ` Jean Delvare
2009-04-06 12:06               ` Andy Walls
2009-04-05 14:37         ` Janne Grunau
2009-04-05 16:37           ` Jean Delvare
2009-04-05 16:58             ` Janne Grunau
2009-04-05 17:39           ` Andy Walls
2009-04-05 18:31             ` Janne Grunau
2009-04-05 18:58               ` Andy Walls
2009-04-05 20:22                 ` Jean Delvare
2009-04-05 21:22                   ` hermann pitton
2009-04-05 22:00                     ` Andy Walls
2009-04-05 22:21                       ` hermann pitton
2009-04-06  1:49                       ` hermann pitton
2009-04-06  1:51                       ` Mauro Carvalho Chehab
2009-04-06  2:52                         ` Mike Isely
2009-04-06  3:26                           ` hermann pitton
2009-04-06  4:44                           ` Trent Piepho
2009-04-06 12:31                           ` Mauro Carvalho Chehab
2009-04-06  8:40                     ` Jean Delvare
2009-04-06 21:10                       ` hermann pitton
2009-04-07  9:27                         ` Jean Delvare
2009-04-08  3:02                           ` CityK
2009-04-08 11:31                             ` Mauro Carvalho Chehab
2009-04-12 17:37                               ` CityK
2009-04-12 23:35                                 ` hermann pitton
2009-04-09 19:15                         ` Oldrich Jedlicka
2009-04-17 13:42                           ` Jean Delvare
2009-04-06 13:13               ` Jarod Wilson
2009-04-05 18:48         ` Mike Isely
2009-04-06 10:54           ` Mauro Carvalho Chehab
2009-04-04 12:29 ` [PATCH 4/6] ir-kbd-i2c: Use initialization data Jean Delvare
2009-04-04 12:30 ` [PATCH 5/6] saa7134: Simplify handling of IR on MSI TV@nywhere Plus Jean Delvare
2009-04-04 12:31 ` [PATCH 6/6] saa7134: Simplify handling of IR on AVerMedia Cardbus Jean Delvare
2009-04-04 15:58 ` [PATCH 0/6] ir-kbd-i2c conversion to the new i2c binding model Mike Isely
2009-04-05 10:01 ` Mauro Carvalho Chehab
2009-04-05 14:40   ` Jean Delvare
2009-04-05 18:40     ` Mike Isely
2009-04-06  0:22     ` Test results for ir-kbd-i2c.c changes (Re: [PATCH 0/6] ir-kbd-i2c conversion to the new i2c binding model) Andy Walls
2009-04-06  8:54       ` Jean Delvare
2009-04-06 11:56         ` Andy Walls
2009-04-06 11:11           ` Jean Delvare
  -- strict thread matches above, loose matches on Subject: below --
2009-04-06  5:35 [PATCH 3/6] ir-kbd-i2c: Switch to the new-style device binding model Uri Shkolnik
2009-04-06 10:45 ` Mauro Carvalho Chehab

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