RE: Newbie Question About Dev-Interface Method

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > I'm assuming that a kernel space chip driver like our gpio expander
> (pca953x.c) also uses the same adapter driver as my user-space
> application since that expander chip is on the same bus.
> 
> Let's clarify right away: i2c-dev (which handles /dev/i2c-* nodes) is
> NOT an adapter driver. It is a bridge driver between user-space and
> your adapter driver. Your adapter driver is most likely one living in
> drivers/i2c/busses, and depends on the actual hardware you run on.

OK, thanks that's clear. I was confused by the terminology in the 
dev-interface document. When it said to open an adapter, I thought
that meant I was using the associated adapter driver.

> 
> Incorrect. The address isn't written to the adapter, it is a setting
> local to i2c-dev and even specific to the file handle you got when
> opening a /dev/i2c-* node. Each subsequent read, write or smbus call in
> your user-space driver automatically includes the slave address, which
> is only valid for the read, write or smbus call in question.

Excellent! - in the words of a famous Swiss restaurant's wine menu, this
leaves me nothing to hope for!

Jean, thank you for your help, it saved me a ton pouring over source 
code and allowed me to get on with the job at hand. Much appreciated.

Regards,

Rory
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux