Hi ,

        If you are using a character driver to do so, your probe
arguments are wrong. You should pass only the adapter structure as
argument to the probe function and call your custom attach function. In
this function you can do the client structure settings and then call the
kernel function  i2c_attach_client(client);The client structure is a
kernel structure. Be careful while setting the values of this structure.
This should register your client driver.

Have a nice time programming !!!!!
Regards,
JINU JOY THOMAS



Message: 3
Date: Wed, 16 Jan 2008 06:34:11 -0800 (PST)
From: Zgembo Adislic <[EMAIL PROTECTED]>
Subject: Re: regarding battery gas gauge
To: Jinu Joy Thomas <[EMAIL PROTECTED]>,
        [email protected]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"

Hi, 

Thank you for your relpay! I have implemented init, probe and attach
function. But I am having some problems with i2c_probe function. After
this function is called i2c_probe(adap, &addr_data, ds2782_attach) it
does not call ds2782_attach function. This function returns -1 and it
never calls ds2782_attach. So I can not register my i2c device. 

Any idea??

Tnx,
Benjamin



Jinu Joy Thomas <[EMAIL PROTECTED]> wrote:     regarding battery
gas gauge     
  Hi,
  
          About the battery gas gauge driver , you can make a character
driver and call the i2c functions which are exported in the MVL kernel.
The I2C protocol also is the same just use the slave address 7Eh and
register the i2c client device and you can call i2c reads and writes
using the i2c functions
  In the init function 
          Register the character driver
          i2c_add_driver  
  In probe function
          Attach the client using the address 7Eh and the file
operations structure and calling i2c_attach_client
  You need to only specify the read and write functions in the file
structure
  In the read function
          Set the msg structure with relevant information and call
i2c_transfer
  In the write function (only if required)
          Same as above
  
  I have worked on the bq27200 chip for DM6446 EVM. 
  
  Regards,
  Jinu Joy
  
 
**********************************************************************
 This email and any files transmitted with it are confidential and
 intended solely for the use of the individual or entity to whom they
 are addressed. If you have received this email in error please notify
 [EMAIL PROTECTED]
 **********************************************************************
  
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


       
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try
it now.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://linux.omap.com/pipermail/davinci-linux-open-source/attachments/20
080116/2b67faad/attachment.htm

------------------------------

_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


End of Davinci-linux-open-source Digest, Vol 25, Issue 31
*********************************************************
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to