The first mux/switch port would not get selected if it was the first port to be
accessed because the code believed it already had. We now initialize the last
channel to a bogus value to ensure the first access will properly select the
channel.
Signed-off-by: Kumar Gala <[email protected]>
---
commit 9040559b19987489000a75a5f8b4957ecbb0fa7f
tree 63056d09c30f32b71bf0a2a3d57a42c2380a9dd8
parent c2f0d4dc88921bb6bed9e289fbda132f587a4306
author Kumar Gala <[email protected]> Tue, 25 Apr 2006 11:58:51 -0500
committer Kumar Gala <[email protected]> Tue, 25 Apr 2006 11:58:51 -0500
drivers/i2c/chips/pca954x.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/i2c/chips/pca954x.c b/drivers/i2c/chips/pca954x.c
index f300493..4ee38bc 100644
--- a/drivers/i2c/chips/pca954x.c
+++ b/drivers/i2c/chips/pca954x.c
@@ -234,6 +234,10 @@ static int pca954x_detect(struct i2c_ada
data->chip_offset = i;
+ /* Set last_chan to an invalid channel to force an initial setting
+ * of the mux/switch on the first select_chan */
+ data->last_chan = 0xff;
+
if ((ret = i2c_attach_client(client)))
goto exit_free;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]