Re: [RFC 1/2] dvb-core: add generic helper function for I2C register

2011-11-14 Thread Jean Delvare
Hi Antti, As an additional note, it just occurred to me that what you are working on is somewhat related to Mark Brown's regmap. Look in drivers/base/regmap and see if maybe you can reuse and/or extend Mark's approach. -- Jean Delvare -- To unsubscribe from this list: send the line "unsubscribe

Re: [RFC 1/2] dvb-core: add generic helper function for I2C register

2011-11-10 Thread Jean Delvare
On Wed, 09 Nov 2011 10:02:08 -0200, Mauro Carvalho Chehab wrote: > Em 09-11-2011 08:37, Jean Delvare escreveu: > > Speaking of struct i2c_client, I seem to remember that the dvb > > subsystem doesn't use it much at the moment. This might be an issue if > > you intend to get the generic code into i2

Re: [RFC 1/2] dvb-core: add generic helper function for I2C register

2011-11-09 Thread Malcolm Priestley
On 09/11/11 10:52, Jean Delvare wrote: On Wed, 09 Nov 2011 12:41:36 +0200, Antti Palosaari wrote: On 11/09/2011 11:56 AM, Mauro Carvalho Chehab wrote: Due to the way I2C locks are bound, doing something like the above and something like: struct i2c_msg msg[2] = { {

Re: [RFC 1/2] dvb-core: add generic helper function for I2C register

2011-11-09 Thread Antti Palosaari
Hello, I compared all I2C-client drivers I have done and here are the results: name = name of driver module reg = reg addr len (bytes) val = reg val len (bytes) auto = auto increment other = register banks, etc. name reg val auto other qt1010 11? af9013 21Y ec

Re: [RFC 1/2] dvb-core: add generic helper function for I2C register

2011-11-09 Thread Mauro Carvalho Chehab
Em 09-11-2011 08:37, Jean Delvare escreveu: > On Wed, 09 Nov 2011 07:56:13 -0200, Mauro Carvalho Chehab wrote: >> Em 08-11-2011 21:54, Antti Palosaari escreveu: >>> Function that splits and sends most typical I2C register write. >>> >>> Signed-off-by: Antti Palosaari >>> --- >>> drivers/media/dvb

Re: [RFC 1/2] dvb-core: add generic helper function for I2C register

2011-11-09 Thread Antti Palosaari
On 11/09/2011 12:37 PM, Jean Delvare wrote: On Wed, 09 Nov 2011 07:56:13 -0200, Mauro Carvalho Chehab wrote: ret = i2c_transfer(i2c_cfg->adapter, msg, 2); Produces a different result. In the latter case, I2C core avoids having any other transaction in the middle of the 2 messages. This

Re: [RFC 1/2] dvb-core: add generic helper function for I2C register

2011-11-09 Thread Jean Delvare
On Wed, 09 Nov 2011 12:41:36 +0200, Antti Palosaari wrote: > On 11/09/2011 11:56 AM, Mauro Carvalho Chehab wrote: > > Due to the way I2C locks are bound, doing something like the above and > > something like: > > > > struct i2c_msg msg[2] = { > > { > > .addr = i2c_cfg->a

Re: [RFC 1/2] dvb-core: add generic helper function for I2C register

2011-11-09 Thread Antti Palosaari
On 11/09/2011 11:56 AM, Mauro Carvalho Chehab wrote: Due to the way I2C locks are bound, doing something like the above and something like: struct i2c_msg msg[2] = { { .addr = i2c_cfg->addr, .flags = 0, .buf = buf, }, {

Re: [RFC 1/2] dvb-core: add generic helper function for I2C register

2011-11-09 Thread Jean Delvare
On Wed, 09 Nov 2011 07:56:13 -0200, Mauro Carvalho Chehab wrote: > Em 08-11-2011 21:54, Antti Palosaari escreveu: > > Function that splits and sends most typical I2C register write. > > > > Signed-off-by: Antti Palosaari > > --- > > drivers/media/dvb/dvb-core/Makefile |2 +- > > drivers

Re: [RFC 1/2] dvb-core: add generic helper function for I2C register

2011-11-09 Thread Mauro Carvalho Chehab
Em 08-11-2011 21:54, Antti Palosaari escreveu: > Function that splits and sends most typical I2C register write. > > Signed-off-by: Antti Palosaari > --- > drivers/media/dvb/dvb-core/Makefile |2 +- > drivers/media/dvb/dvb-core/dvb_generic.c | 48 > ++ > d

Re: [RFC 1/2] dvb-core: add generic helper function for I2C register

2011-11-08 Thread Michael Krufky
On Tue, Nov 8, 2011 at 6:54 PM, Antti Palosaari wrote: > Function that splits and sends most typical I2C register write. > > Signed-off-by: Antti Palosaari > --- >  drivers/media/dvb/dvb-core/Makefile      |    2 +- >  drivers/media/dvb/dvb-core/dvb_generic.c |   48 >

[RFC 1/2] dvb-core: add generic helper function for I2C register

2011-11-08 Thread Antti Palosaari
Function that splits and sends most typical I2C register write. Signed-off-by: Antti Palosaari --- drivers/media/dvb/dvb-core/Makefile |2 +- drivers/media/dvb/dvb-core/dvb_generic.c | 48 ++ drivers/media/dvb/dvb-core/dvb_generic.h | 21 +