public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
* tvp5150 new style i2c driver
@ 2008-09-19 15:30 Luca Santini
       [not found] ` <48D3C5A3.3080802-wNesuFfO2Ajz1n+OaKNE4w@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Luca Santini @ 2008-09-19 15:30 UTC (permalink / raw)
  To: i2c-GZX6beZjE8VD60Wz+7aTrA

Hi,
i need to interface with a TI tvp5150 (video codec), wired via i2c on my custom board.

i'm on kernel 2.6.27git and i found there's a driver for the codec... but i get the 'SMBus not supported' error when i try to enable it. So old style coding...
I was trying to convert it to new-style when i found on the ML Archive someone had some similar problem....

do somebody have some pre-coded patch for me? 


After i made it work, how to communicate with it?



thanks,
Luca Santini


p.s. i have no idea how previous post fallen into the wrong thread !

_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c

^ permalink raw reply	[flat|nested] 10+ messages in thread
* need soem help realter to I2C client
@ 2008-09-19  6:33 kalhan trisal
  2008-09-19 12:42 ` Jean Delvare
  0 siblings, 1 reply; 10+ messages in thread
From: kalhan trisal @ 2008-09-19  6:33 UTC (permalink / raw)
  To: i2c-GZX6beZjE8VD60Wz+7aTrA

Hello, 
   I have platform which has 5 hw devices and I want single driver to control all the devices. I donot need probe as I know the devices are present and I know all the slave address. The interface for read write is using sysfs and I am planning to put it under hwmon. These all devices are separate chips.

   Can I do this please let me know.


 struct foo_data { 
    struct i2c_client client_data[5]; 
   }; 

int foo_detect_client(struct i2c_adapter *adapter, int address,  
                         unsigned short flags, int kind) 
{ 
     int err = 0; 
     int i; 
     int addrtemp[]= {0x42,0x45,0x46,0x47,0x48};
     struct i2c_client *new_client; 
     struct foo_data *data; 
     const char *client_name = "";
     
      For(i=0;i<5;i++)
      {
           new_client = &data->client_data[i];
           new_client->addr = addrtemp[i]; 
           new_client->data = data; //lets consider it is same 
           new_client->adapter = adapter; 
           new_client->driver = &foo_driver; 
           new_client->flags = 0; 
     
           strcpy(new_client->name,client_name); 
          /* Tell the i2c layer a new client has arrived */ 
          if ((err = i2c_attach_client(new_client))) 
      }
}

Thanks
Kalhan 

--- On Thu, 18/9/08, Rudolf Marek <r.marek-/xGekIyIa4Ap1Coe8Ar9gA@public.gmane.org> wrote:

> From: Rudolf Marek <r.marek-/xGekIyIa4Ap1Coe8Ar9gA@public.gmane.org>
> Subject: Re: need soem help realter to I2C
> To: kalhantrisal-/E1597aS9LQAvxtiuMwx3w@public.gmane.org
> Date: Thursday, 18 September, 2008, 8:01 PM
> Hello,
> 
> I'm very busy those days, but I think you will get the
> answer on I2C mailing 
> list. You dont need to be subscribed. But please be more
> specic what do you mean 
> by adapter, the sw entity in i2c subsys or real adapter?
> Are you writing your 
> own driver? Please explain there what you want to do more
> globaly.
> 
> Please mail your question there, I can reply later,
> 
> Here is the mail i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
> 
> Rudolf


      Unlimited freedom, unlimited storage. Get it now, on http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/

_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c

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

end of thread, other threads:[~2008-09-20  9:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-19 15:30 tvp5150 new style i2c driver Luca Santini
     [not found] ` <48D3C5A3.3080802-wNesuFfO2Ajz1n+OaKNE4w@public.gmane.org>
2008-09-19 20:26   ` Jean Delvare
     [not found]     ` <48D41902.9020804@spesonline.com>
     [not found]       ` <48D41902.9020804-wNesuFfO2Ajz1n+OaKNE4w@public.gmane.org>
2008-09-20  8:16         ` Jean Delvare
     [not found]           ` <20080920101623.791ed72f-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-09-20  9:10             ` Luca Santini
     [not found]               ` <48D4BDF9.8050003-wNesuFfO2Ajz1n+OaKNE4w@public.gmane.org>
2008-09-20  9:36                 ` Jean Delvare
  -- strict thread matches above, loose matches on Subject: below --
2008-09-19  6:33 need soem help realter to I2C client kalhan trisal
2008-09-19 12:42 ` Jean Delvare
     [not found]   ` <20080919144231.780fb37a-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-09-19 13:04     ` tvp5150 new style i2c driver Luca Santini
     [not found]       ` <48D3A36D.1090001-wNesuFfO2Ajz1n+OaKNE4w@public.gmane.org>
2008-09-19 13:23         ` Jean Delvare
2008-09-19 15:04     ` Luca Santini
     [not found]       ` <48D3BF65.1020201-wNesuFfO2Ajz1n+OaKNE4w@public.gmane.org>
2008-09-19 15:25         ` Jean Delvare
2008-09-19 15:27     ` Luca Santini

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