i2c: pca954x: put the mux to disconnected state after resume
authorJisheng Zhang <jszhang@marvell.com>
Fri, 25 Jul 2014 11:57:46 +0000 (19:57 +0800)
committerWolfram Sang <wsa@the-dreams.de>
Fri, 1 Aug 2014 17:54:59 +0000 (19:54 +0200)
commitf5e596cd9f0ec6c03660fe4196d395bc3da919a4
tree0683ff7c576ad5bf0dcc5752f6f4d01780b562a0
parent52976fa74b9da790686ee116424458c238564cb1
i2c: pca954x: put the mux to disconnected state after resume

pca954x may be power lost during suspend, so after resume we also suffer
the issue fixed by commit cd823db8b1161ef0d756514d280715a576d65cc3,

 "pca954x power-on default is channel 0 connected. If multiple pca954x
 muxes are connected to the same physical I2C bus, the parent bus will
 see channel 0 devices behind both muxes by default."

What's more, when resume bootloader may also operate the mux, so the
the channel connected after that may not be the one driver thought.

We fix this problem by putting the mux to disconnected state and
clearing last_chan in the resume hook.

Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/muxes/i2c-mux-pca954x.c