Skip to contentSkip to conversation

ds1682

DISCUSSION Dan Mor 1 participant 1 message Sep 15, 2009 I2C subsystem host drivers

lore
Share & tools
lore

Dan Mor

author
#0 lore raw

Hi Guys,

I am trying to use ds1682 Linux driver under 2.6.27.30 Fedora Core 10 Kernel.
I am new to sysfs driver approach. I successfully compiled the module and loaded it.

The device doesn't recognized by default and no sub directories created. I add insmode parameters to the driver and loading it with force=i2c_bus, i2c_address parameters.
In this case, it works.

I can read/write from/to devices by: cat /sys/..../elapsed_time, etc.

My question is, how can I read/write from/to sysfs from the C test application?
I am trying to: "open" "/sys/..../elapsed_time" and "read" from it but apparently I am doing something wrong.
Do you have some C code examples of how to communicate with sysfs devices?

Regards,
Dan