Thanks for the response. My /proc/devices lists the i2c bus driver
and I can see the node of this driver in /dev/ as /dev/i2c-0 /dev/i2c-1. I can verify both these nodes from
I have another i2c chip driver which is also appearing in /sys/bus/i2c/devices/0-001c. I can verify the device of this driver (& its the same device I am trying to access) from
I don't see any node for this device in /dev/
or perhaps I am asking the wrong question or doing it the wrong way. My problem is simple (i think so). I have a i2c accelerometer attached on i2c bus of my board. I can see the driver for this i2c chip in my linux system as I have mentioned above (/sys/bus/i2c/devices/0-001c/name). Now I want to access this chip through this driver, for which I believe in need a device node in /dev/ to open from a user space program, but I can't see the node !!
I was reading an article (http://www.linuxjournal.com/article/7252?page=0,0
) that i2c chip drivers expose their parameter values (readable/writable) in sysfs (each exposed parameter will create a file in sysfs). My question, should such i2c chip driver will be accessed through sysfs and if yes then how. Wouldn't my user space program will be highly dependent on one particular driver implementation.
Any thought or help is appreciated.