]> git.karo-electronics.de Git - karo-tx-linux.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)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 21 Apr 2011 21:32:47 +0000 (14:32 -0700)
commit93be96977dd8ef5bee7cf746e699d03627496e23
tree4f69e0f9edac609c0bfa8644d00619bbb8e3146e
parentc421122f3dea5b5c42133f67a8084e6c0793a35c
i2c-algo-bit: Call pre/post_xfer for bit_test

commit d3b3e15da14ded61c9654db05863b04a2435f4cc upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/i2c/algos/i2c-algo-bit.c