]> git.baikalelectronics.ru Git - kernel.git/commit
i2c-algo-bit: Call pre/post_xfer for bit_test
authorAlex Deucher <alexdeucher@gmail.com>
Sun, 17 Apr 2011 08:20:19 +0000 (10:20 +0200)
committerJean Delvare <khali@endymion.delvare>
Sun, 17 Apr 2011 08:20:19 +0000 (10:20 +0200)
commit6802400f54500914c35baa160cc56647b6360cfb
treec683f167f9e8049201773e4b2884d40cc30a4fd3
parentaca9f870896069191741149460f854aaf7a32a19
i2c-algo-bit: Call pre/post_xfer for bit_test

Apparently some distros set i2c-algo-bit.bit_test to 1 by
default.  In some cases this causes i2c_bit_add_bus
to fail and prevents the i2c bus from being added.  In the
radeon case, we fail to add the ddc i2c buses which prevents
the driver from being able to detect attached monitors.
The i2c bus works fine even if bit_test fails.  This is likely
due to gpio switching that is required and handled in the
pre/post_xfer hooks, so call the pre/post_xfer hooks in the
bit test as well.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=36221

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@kernel.org [.38 down to .34]
drivers/i2c/algos/i2c-algo-bit.c