]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
I2C: OMAP: detect more devices when probing an i2c bus
authorNick Thompson <nick.thompson@ge.com>
Mon, 11 Apr 2011 22:37:41 +0000 (22:37 +0000)
committerHeiko Schocher <hs@denx.de>
Thu, 14 Apr 2011 06:33:23 +0000 (08:33 +0200)
commit0e57968a215d1b9d271f3fa5bebeddeaea0c8075
treecac33061d68c9d6af986a3e1b52326259f0a9ee2
parent73e5476e1edf1b860dbd9b5fc21ef32ac1b551ba
I2C: OMAP: detect more devices when probing an i2c bus

The omap24xx driver only seems to support devices that have a single subaddress
byte. With these types of devices, the first access in a bus transaction is
usually a write (writes the subaddress) followed by either a read or write to
access the devices registers.

Many such devices will respond to a read as the first access, but there are at
least some that will NACK such a read. (e.g. ADV7180.)

The probe function attempts to detect a devices ACK to a read access only and
fails to find devices that NACK a read.

This commit modifies the probe function to start a write instead. This detects
devices that respond to reads (since they must also respond to writes) as well
as those that only respond to writes. The bus is immediately set to idle after a
(N)ACK avoiding actually writing anything to the device.

Signed-off-by: Nick Thompson <nick.thompson@ge.com>
drivers/i2c/omap24xx_i2c.c