From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933386AbdIYHWr (ORCPT ); Mon, 25 Sep 2017 03:22:47 -0400 Received: from mail.free-electrons.com ([62.4.15.54]:59947 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932578AbdIYHWp (ORCPT ); Mon, 25 Sep 2017 03:22:45 -0400 Date: Mon, 25 Sep 2017 09:22:34 +0200 From: Alexandre Belloni To: "Levin, Alexander (Sasha Levin)" Cc: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" , Wolfram Sang Subject: Re: [PATCH review for 4.4 19/26] i2c: at91: ensure state is restored after suspending Message-ID: <20170925072234.i7ba5nxbpfgqh2ar@piout.net> References: <20170925011322.10133-1-alexander.levin@verizon.com> <20170925011322.10133-19-alexander.levin@verizon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170925011322.10133-19-alexander.levin@verizon.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, I don't think it is worth backporting this patch to 4.4. Cutting VDD core will only happen after mainline v4.12 or v4.9 for the vendor kernel. On 25/09/2017 at 01:13:43 +0000, Levin, Alexander (Sasha Levin) wrote: > From: Alexandre Belloni > > [ Upstream commit e3ccc921b7d8fd1fcd10a00720e09823d8078666 ] > > When going to suspend, the I2C registers may be lost because the power to > VDDcore is cut. Restore them when resuming. > > Signed-off-by: Alexandre Belloni > Acked-by: Ludovic Desroches > Signed-off-by: Wolfram Sang > Signed-off-by: Sasha Levin > --- > drivers/i2c/busses/i2c-at91.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c > index 10835d1f559b..dee0fc421054 100644 > --- a/drivers/i2c/busses/i2c-at91.c > +++ b/drivers/i2c/busses/i2c-at91.c > @@ -1131,6 +1131,7 @@ static int at91_twi_suspend_noirq(struct device *dev) > > static int at91_twi_resume_noirq(struct device *dev) > { > + struct at91_twi_dev *twi_dev = dev_get_drvdata(dev); > int ret; > > if (!pm_runtime_status_suspended(dev)) { > @@ -1142,6 +1143,8 @@ static int at91_twi_resume_noirq(struct device *dev) > pm_runtime_mark_last_busy(dev); > pm_request_autosuspend(dev); > > + at91_init_twi_bus(twi_dev); > + > return 0; > } > > -- > 2.11.0 -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com