All of lore.kernel.org
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javier@osg.samsung.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: Tony Lindgren <tony@atomide.com>,
	linux-i2c@vger.kernel.org,
	Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	Linux Media Mailing List <linux-media@vger.kernel.org>,
	linux-pm@vger.kernel.org, Alan Stern <stern@rowland.harvard.edu>
Subject: Re: tvp5150 regression after commit 9f924169c035
Date: Wed, 13 Apr 2016 18:39:44 -0400	[thread overview]
Message-ID: <570ECAB0.4050107@osg.samsung.com> (raw)
In-Reply-To: <20160412223254.GK1526@katana>

Hello Wolfram,

On 04/12/2016 06:32 PM, Wolfram Sang wrote:
> 
>> I'll try to find some time next week to dig deeper on this. Just
>> thought that may be related to the issue you found but it seems
>> that's not the case.
> 
> Any updates on this?
>

Sorry, I've been sick and then busy with other stuff so I didn't have time
to dig deeper on this.
 
> Thanks,
> 
>    Wolfram
> 

I'll write what I found so far in case someone with better knowledge about
the runtime PM API and the OMAP I2C controller driver can have an idea of
what could be causing this.

The problem is that after commit 9f924169c035 ("i2c: always enable RuntimePM
for the adapter device"), i2c_smbus_read_byte_data() fails and returns -110
(ETIMEDOUT) error in the tvp5150 I2C driver.

The call trace is the following:

i2c_device_probe
  tvp5150_probe
    tvp5150_read
      i2c_smbus_read_byte_data
        i2c_smbus_xfer
	  i2c_transfer
	    omap_i2c_xfer
              omap_i2c_xfer_msg

The fail in omap_i2c_xfer_msg() is due the wait_for_completion_timeout()
timeout, so it seems the omap_i2c_isr_thread() is not calling complete()
for the cmd_complete completion when runtime PM is enabled (no idea why).

If I revert commit 9f924169c035 then things works again or if I use the
following patch that basically disables runtime PM for the OMAP adapter
after it has been enabled by the I2C core due commit 9f924169c035: 

diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 37a88f0ae179..0b72b21b379d 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -1445,6 +1445,8 @@ omap_i2c_probe(struct platform_device *pdev)
 		goto err_unuse_clocks;
 	}
 
+	pm_runtime_disable(&adap->dev);
+
 	dev_info(omap->dev, "bus %d rev%d.%d at %d kHz\n", adap->nr,
 		 major, minor, omap->speed);

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

  reply	other threads:[~2016-04-13 22:39 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-03 13:46 tvp5150 regression after commit 9f924169c035 Javier Martinez Canillas
2016-02-03 14:23 ` Wolfram Sang
2016-02-03 14:42   ` Javier Martinez Canillas
2016-02-08 10:54 ` Wolfram Sang
2016-02-12 22:09   ` Javier Martinez Canillas
2016-02-12 22:13     ` Tony Lindgren
2016-02-12 22:28       ` Javier Martinez Canillas
2016-02-12 22:40         ` Tony Lindgren
2016-02-12 23:08           ` Javier Martinez Canillas
2016-02-12 23:46             ` Tony Lindgren
2016-02-13  2:47               ` Javier Martinez Canillas
2016-04-12 22:32                 ` Wolfram Sang
2016-04-13 22:39                   ` Javier Martinez Canillas [this message]
2016-04-14 11:12                     ` Wolfram Sang
2016-04-14 13:41                       ` Javier Martinez Canillas
2016-04-14 14:19                         ` Wolfram Sang
2016-04-14 14:27                           ` Javier Martinez Canillas
2016-04-14 15:12                             ` Tony Lindgren
2016-04-14 23:59                               ` Javier Martinez Canillas
2016-04-15 14:58                                 ` Tony Lindgren
2016-04-15 16:48                                   ` Javier Martinez Canillas
2016-04-15 17:08                                     ` Tony Lindgren
2016-02-12 22:22     ` Wolfram Sang
2016-02-12 22:26       ` Javier Martinez Canillas

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=570ECAB0.4050107@osg.samsung.com \
    --to=javier@osg.samsung.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mchehab@osg.samsung.com \
    --cc=stern@rowland.harvard.edu \
    --cc=tony@atomide.com \
    --cc=wsa@the-dreams.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.