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)
commitd3b3e15da14ded61c9654db05863b04a2435f4cc
treec683f167f9e8049201773e4b2884d40cc30a4fd3
parenta920ff41cb3d2b03da095c4fa1a11b71417ae2a4
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