Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1717102 > unrolled thread

Re: [PATCH] mfd: intel-lpss: Put I2C and SPI controllers into reset state on suspend

Started byLee Jones <lee.jones@linaro.org>
First post2017-08-22 09:50 +0200
Last post2017-08-22 09:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] mfd: intel-lpss: Put I2C and SPI controllers into reset  state on suspend Lee Jones <lee.jones@linaro.org> - 2017-08-22 09:50 +0200

#1717102 — Re: [PATCH] mfd: intel-lpss: Put I2C and SPI controllers into reset state on suspend

FromLee Jones <lee.jones@linaro.org>
Date2017-08-22 09:50 +0200
SubjectRe: [PATCH] mfd: intel-lpss: Put I2C and SPI controllers into reset state on suspend
Message-ID<uhc6J-7GF-3@gated-at.bofh.it>
On Sun, 23 Jul 2017, Furquan Shaikh wrote:

> Commit 274e43edcda6f ("mfd: intel-lpss: Do not put device in reset
> state on suspend") changed the behavior on suspend by not putting LPSS
> controllers into reset. This was done because S3/S0ix fail if UART
> device is put into reset and no_console_suspend flag is enabled.
> 
> Because of the above change, I2C controller gets into a bad state if
> it observes that the I2C lines are pulled low when power to I2C device
> is cut off during suspend (generally, I2C lines are pulled to power
> rail of the I2C device in order to ensure that there is no leakage
> because of the pulls when device is turned off). This results in the
> controller timing out for all future I2C operations after resume. It
> is primarily because of the following sequence of operations:
> 
> During suspend:
> 1. I2C controller is disabled, but it is not put into reset.
> 2. Power to I2C device is cut off.
> 3. #2 results in the I2C lines being pulled low.
> 
> ==> At this point the I2C controller gets into a bad state
> 
> On resume:
> 1. Power to I2C device is enabled.
> 2. #2 results in the I2C lines being pulled high.
> 3. I2C controller is enabled.
> 
> However, even after enabling the I2C controller, all future I2C xfers
> fail since the controller is in a bad state and does not attempt to
> make any transactions and hence times out.
> 
> In order to ensure that the controller does not get into a bad state,
> this change puts it into reset if the controller type is not
> UART. With this change, the order of operations is:
> 
> During suspend:
> 1. I2C controller is disabled and put into reset.
> 2. Power to I2C device is cut off.
> 3. #2 results in the I2C lines being pulled low.
> 
> On resume:
> 1. Power to I2C device is enabled.
> 2. #2 results in the I2C lines being pulled high.
> 3. I2C controller is enabled and taken out of reset.
> 
> Signed-off-by: Furquan Shaikh <furquan@google.com>
> ---
>  drivers/mfd/intel-lpss.c | 8 ++++++++
>  1 file changed, 8 insertions(+)

Applied, thanks.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web