* Simple i2c question
@ 2009-09-12 8:53 Dimitar Penev
0 siblings, 0 replies; only message in thread
From: Dimitar Penev @ 2009-09-12 8:53 UTC (permalink / raw)
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA
Hi Guys,
I hope my question is not too basic for this mailing list but I am really
confused by the Linux i2c framework
Let me describe what I want to do and what I know so it is easier to point
me to the solution.
I have manufactured a Blackfin CPU based board running uClinux on it.
I have pca9539 chip on this board. I know that there is already a driver for
this chip.
Originally I had kernel version 2.6.25 and during the kernel boot the
probe/detect functions of this driver was executed.
Inside this driver I have added two global functions one for read and
another one for write of a byte in the PCA9539.
I was using i2c_smbus_read_byte_data, i2c_smbus_write_byte_data functions to
do this.
As 'client' argument for those smbus functions I was using the client
provided during invocation of the driver detect function.
I exported the new functions and this way I could control my PCA9539 from
the kernel space.
However I decide to try the new Linux kernel 2.6.28.10. I noticed that the
i2c framework has changed
and now my probe/detect functions are not invoked. I studied the i2c
framework a bit and I know about the device instantiate using
i2c_register_board_info function.
Then I realize that I have to register bus 0 driver so I get my probe
function invoked. Still not clear how to do it though.
Meanwhile I have noticed that actually the pca9539 chip driver is creating
sysfs entries for access from the users space.
So now I think that most probably I don't need pca9539 driver at all. (I
need i2c at the kernel space)
Now my question:
I want to have kernel space control over my pca9539. I would prefer a simple
way for example to use
i2c_smbus_read_byte_data / i2c_smbus_write_byte_data. However I don't know
how to define my 'i2c_client' argument in this case.
Can you please give me some pointers so I clean the picture in my mind.
Best Regards
Dimitar
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-09-12 8:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-12 8:53 Simple i2c question Dimitar Penev
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.