linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>,
	Alexey Khoroshilov <khoroshilov@ispras.ru>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	ldv-project@linuxtesting.org
Subject: Re: [PATCH] i2c: designware: balance clk enable/disable on removal
Date: Fri, 12 Feb 2016 19:54:00 +0100	[thread overview]
Message-ID: <20160212185400.GH1520@katana> (raw)
In-Reply-To: <1454337845.32507.20.camel@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1559 bytes --]

On Mon, Feb 01, 2016 at 04:44:05PM +0200, Andy Shevchenko wrote:
> On Mon, 2016-02-01 at 16:21 +0200, Jarkko Nikula wrote:
> > On 01/30/2016 12:31 AM, Alexey Khoroshilov wrote:
> > > It seems clk_disable_unprepare() is missed in dw_i2c_plat_remove(),
> > > so the patch adds it.
> > > 
> > > Found by Linux Driver Verification project (linuxtesting.org).
> > > 
> > > Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
> > > ---
> > >   drivers/i2c/busses/i2c-designware-platdrv.c | 1 +
> > >   1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c
> > > b/drivers/i2c/busses/i2c-designware-platdrv.c
> > > index 438f1b4964c0..8f19b7b81fe0 100644
> > > --- a/drivers/i2c/busses/i2c-designware-platdrv.c
> > > +++ b/drivers/i2c/busses/i2c-designware-platdrv.c
> > > @@ -267,6 +267,7 @@ static int dw_i2c_plat_remove(struct
> > > platform_device *pdev)
> > >   	i2c_del_adapter(&dev->adapter);
> > > 
> > >   	i2c_dw_disable(dev);
> > > +	i2c_dw_plat_prepare_clk(dev, false);
> > > 
> > I tried this quickly and it appears more work is needed. When 
> > CONFIG_PM_SLEEP is set then autosuspending will do the unprepare and 
> > this patch causes double unprepare at remove. But when
> > CONFIG_PM_SLEEP 
> > is not set then indeed those clk calls are out of sync.
> 
> Besides that I would suggest to check carefully error patch in the
> probe(), i.e. handling error from i2c_dw_probe(). There maybe similar
> issue is hidden.

So, waiting for V2 on this one.


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-02-12 18:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-29 22:31 [PATCH] i2c: designware: balance clk enable/disable on removal Alexey Khoroshilov
2016-02-01 14:21 ` Jarkko Nikula
2016-02-01 14:44   ` Andy Shevchenko
2016-02-12 18:54     ` Wolfram Sang [this message]
2016-02-13 22:16       ` Alexey Khoroshilov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160212185400.GH1520@katana \
    --to=wsa@the-dreams.de \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=khoroshilov@ispras.ru \
    --cc=ldv-project@linuxtesting.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).