Re: RFC: proposal for new i2c.h macro to initialize i2c address lists on the fly

2009-06-09 Thread Hans Verkuil
On Monday 08 June 2009 14:39:32 Jean Delvare wrote: Hi Hans, On Sat, 6 Jun 2009 15:00:48 +0200, Hans Verkuil wrote: For video4linux we sometimes need to probe for a single i2c address. Normally you would do it like this: static const unsigned short addrs[] = { addr, I2C_CLIENT_END

Re: RFC: proposal for new i2c.h macro to initialize i2c address lists on the fly

2009-06-09 Thread Jean Delvare
On Tue, 9 Jun 2009 15:04:36 +0200, Hans Verkuil wrote: Here it is: --- linux-git/include/linux/i2c.h.orig2009-06-09 14:53:32.0 +0200 +++ linux-git/include/linux/i2c.h 2009-06-09 15:03:24.0 +0200 @@ -412,6 +412,10 @@ /* The numbers to use to set I2C bus address

Re: RFC: proposal for new i2c.h macro to initialize i2c address lists on the fly

2009-06-08 Thread Jean Delvare
Hi Hans, On Sat, 6 Jun 2009 15:00:48 +0200, Hans Verkuil wrote: For video4linux we sometimes need to probe for a single i2c address. Normally you would do it like this: static const unsigned short addrs[] = { addr, I2C_CLIENT_END }; client = i2c_new_probed_device(adapter, info,

Re: RFC: proposal for new i2c.h macro to initialize i2c address lists on the fly

2009-06-07 Thread Hans Verkuil
On Sunday 07 June 2009 00:20:26 Jon Smirl wrote: On Sat, Jun 6, 2009 at 9:00 AM, Hans Verkuilhverk...@xs4all.nl wrote: Hi all, For video4linux we sometimes need to probe for a single i2c address. Normally you would do it like this: Why does video4linux need to probe to find i2c devices?

Re: RFC: proposal for new i2c.h macro to initialize i2c address lists on the fly

2009-06-07 Thread Jon Smirl
On Sun, Jun 7, 2009 at 2:35 AM, Hans Verkuilhverk...@xs4all.nl wrote: On Sunday 07 June 2009 00:20:26 Jon Smirl wrote: On Sat, Jun 6, 2009 at 9:00 AM, Hans Verkuilhverk...@xs4all.nl wrote: Hi all, For video4linux we sometimes need to probe for a single i2c address. Normally you would do

Re: RFC: proposal for new i2c.h macro to initialize i2c address lists on the fly

2009-06-07 Thread Jon Smirl
On Sun, Jun 7, 2009 at 9:25 AM, Jon Smirljonsm...@gmail.com wrote: On Sun, Jun 7, 2009 at 2:35 AM, Hans Verkuilhverk...@xs4all.nl wrote: On Sunday 07 June 2009 00:20:26 Jon Smirl wrote: On Sat, Jun 6, 2009 at 9:00 AM, Hans Verkuilhverk...@xs4all.nl wrote: Hi all, For video4linux we

Re: RFC: proposal for new i2c.h macro to initialize i2c address lists on the fly

2009-06-07 Thread Hans Verkuil
On Sunday 07 June 2009 15:30:50 Jon Smirl wrote: On Sun, Jun 7, 2009 at 9:25 AM, Jon Smirljonsm...@gmail.com wrote: On Sun, Jun 7, 2009 at 2:35 AM, Hans Verkuilhverk...@xs4all.nl wrote: On Sunday 07 June 2009 00:20:26 Jon Smirl wrote: On Sat, Jun 6, 2009 at 9:00 AM, Hans

Re: RFC: proposal for new i2c.h macro to initialize i2c address lists on the fly

2009-06-07 Thread Andy Walls
On Sun, 2009-06-07 at 09:25 -0400, Jon Smirl wrote: On Sun, Jun 7, 2009 at 2:35 AM, Hans Verkuilhverk...@xs4all.nl wrote: On Sunday 07 June 2009 00:20:26 Jon Smirl wrote: On Sat, Jun 6, 2009 at 9:00 AM, Hans Verkuilhverk...@xs4all.nl wrote: Hi all, For video4linux we sometimes need

Re: RFC: proposal for new i2c.h macro to initialize i2c address lists on the fly

2009-06-07 Thread hermann pitton
Hi, Am Sonntag, den 07.06.2009, 16:00 -0400 schrieb Andy Walls: On Sun, 2009-06-07 at 09:25 -0400, Jon Smirl wrote: On Sun, Jun 7, 2009 at 2:35 AM, Hans Verkuilhverk...@xs4all.nl wrote: On Sunday 07 June 2009 00:20:26 Jon Smirl wrote: On Sat, Jun 6, 2009 at 9:00 AM, Hans

RFC: proposal for new i2c.h macro to initialize i2c address lists on the fly

2009-06-06 Thread Hans Verkuil
Hi all, For video4linux we sometimes need to probe for a single i2c address. Normally you would do it like this: static const unsigned short addrs[] = { addr, I2C_CLIENT_END }; client = i2c_new_probed_device(adapter, info, addrs); This is a bit awkward and I came up with this macro:

Re: RFC: proposal for new i2c.h macro to initialize i2c address lists on the fly

2009-06-06 Thread Trent Piepho
On Sat, 6 Jun 2009, Hans Verkuil wrote: For video4linux we sometimes need to probe for a single i2c address. Normally you would do it like this: static const unsigned short addrs[] = { addr, I2C_CLIENT_END }; client = i2c_new_probed_device(adapter, info, addrs); This is a bit

Re: RFC: proposal for new i2c.h macro to initialize i2c address lists on the fly

2009-06-06 Thread Mauro Carvalho Chehab
Em Sat, 6 Jun 2009 15:00:48 +0200 Hans Verkuil hverk...@xs4all.nl escreveu: Hi all, For video4linux we sometimes need to probe for a single i2c address. Normally you would do it like this: static const unsigned short addrs[] = { addr, I2C_CLIENT_END }; client =

Re: RFC: proposal for new i2c.h macro to initialize i2c address lists on the fly

2009-06-06 Thread Jon Smirl
On Sat, Jun 6, 2009 at 9:00 AM, Hans Verkuilhverk...@xs4all.nl wrote: Hi all, For video4linux we sometimes need to probe for a single i2c address. Normally you would do it like this: Why does video4linux need to probe to find i2c devices? Can't the address be determined by knowing the PCI ID

Re: RFC: proposal for new i2c.h macro to initialize i2c address lists on the fly

2009-06-06 Thread hermann pitton
Hi, Am Samstag, den 06.06.2009, 18:20 -0400 schrieb Jon Smirl: On Sat, Jun 6, 2009 at 9:00 AM, Hans Verkuilhverk...@xs4all.nl wrote: Hi all, For video4linux we sometimes need to probe for a single i2c address. Normally you would do it like this: Why does video4linux need to probe to