All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Partha Basak <p-basak2@ti.com>
Cc: Keshava Munegowda <keshava_mgowda@ti.com>,
	Kevin Hilman <khilman@ti.com>, <linux-usb@vger.kernel.org>,
	<linux-omap@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Felipe Balbi <balbi@ti.com>, Anand Gadiyar <gadiyar@ti.com>,
	<sameo@linux.intel.com>, <parthab@india.ti.com>,
	<tony@atomide.com>, Benoit Cousson <b-cousson@ti.com>,
	<paul@pwsan.com>
Subject: RE: [PATCH 4/4] mfd: global Suspend and resume support of ehci and ohci
Date: Wed, 29 Jun 2011 14:47:47 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.44L0.1106291446220.2064-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <2f837bd4c0fb09f310feb414479f3350@mail.gmail.com>

On Wed, 29 Jun 2011, Partha Basak wrote:

> >-----Original Message-----
> >From: Alan Stern [mailto:stern@rowland.harvard.edu]
> >Sent: Wednesday, June 29, 2011 11:03 PM
> >To: Munegowda, Keshava
> >Cc: Kevin Hilman; linux-usb@vger.kernel.org; linux-omap@vger.kernel.org;
> >linux-kernel@vger.kernel.org; balbi@ti.com; gadiyar@ti.com;
> >sameo@linux.intel.com; parthab@india.ti.com; tony@atomide.com; b-
> >cousson@ti.com; paul@pwsan.com
> >Subject: Re: [PATCH 4/4] mfd: global Suspend and resume support of ehci
> >and ohci
> >
> >On Wed, 29 Jun 2011, Munegowda, Keshava wrote:
> >
> >> for usb host case , I am seeing that the pm_runtime_get_sync
> >>
> >>
> >> static int rpm_resume(struct device *dev, int rpmflags)
> >> {
> >>   ............
> >>  ..........
> >> 	if (dev->pwr_domain) {
> >> 		callback = dev->pwr_domain->ops.runtime_resume;
> >> 		if(!strcmp(dev_name(dev),"usbhs_omap"))
> >> 			 pr_err("dev->pwr_domain->ops.runtime_resume");
> >> 	}
> >> 	else if (dev->type && dev->type->pm) {
> >> 		callback = dev->type->pm->runtime_resume;
> >> 		if(!strcmp(dev_name(dev),"usbhs_omap"))
> >> 			 pr_err("dev->type->pm->runtime_resume");
> >> 	}
> >> 	else if (dev->class && dev->class->pm) {
> >> 		callback = dev->class->pm->runtime_resume;
> >> 		if(!strcmp(dev_name(dev),"usbhs_omap"))
> >> 			 pr_err("ev->class->pm->runtime_resume");
> >> 	}
> >> 	else if (dev->bus && dev->bus->pm) {
> >> 		callback = dev->bus->pm->runtime_resume;
> >> 	if(!strcmp(dev_name(dev),"usbhs_omap"))
> >> 		 pr_err("dev->bus->pm->runtime_resume");
> >> 	}
> >> 	else
> >> 		callback = NULL;
> >> }
> >>
> >>
> >> I am seeing that below if statement was hitting true:
> >>
> >> 	if (dev->pwr_domain) {
> >> 		callback = dev->pwr_domain->ops.runtime_resume;
> >> 		if(!strcmp(dev_name(dev),"usbhs_omap"))
> >> 			 pr_err("dev->pwr_domain->ops.runtime_resume");
> >>
> >>
> >> due to this; the driver->runtime_resume was not getting called.
> >>
> >> Any idea on why I am seeing only the dev->pwr_domain is set not
> >> dev->bus && dev->bus->pm is hitting here?
> >
> >Because the PM domain takes precedence over the subsystem for PM
> >callbacks.  If the subsystem routine should be called then the PM
> >domain code has to call it.
> 
> This is taken care of in the pm-domain code:
> static int _od_runtime_resume(struct device *dev)
> {
> 	struct platform_device *pdev = to_platform_device(dev);
> 
> 	omap_device_enable(pdev);
> 
> 	return pm_generic_runtime_resume(dev);
> }
> pm_generic_runtime_resume will in turn call the driver call back.
> 
> int pm_generic_runtime_resume(struct device *dev)
> {
> 	const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm :
> NULL;
> 	int ret;
> 
> 	ret = pm && pm->runtime_resume ? pm->runtime_resume(dev) : 0;
> 
> 	return ret;
> }

You appear to be contradicting what Keshava wrote: "due to this; the
driver->runtime_resume was not getting called."

You can't both be right.

Alan Stern



WARNING: multiple messages have this Message-ID (diff)
From: Alan Stern <stern@rowland.harvard.edu>
To: Partha Basak <p-basak2@ti.com>
Cc: Keshava Munegowda <keshava_mgowda@ti.com>,
	Kevin Hilman <khilman@ti.com>,
	linux-usb@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-kernel@vger.kernel.org, Felipe Balbi <balbi@ti.com>,
	Anand Gadiyar <gadiyar@ti.com>,
	sameo@linux.intel.com, parthab@india.ti.com, tony@atomide.com,
	Benoit Cousson <b-cousson@ti.com>,
	paul@pwsan.com
Subject: RE: [PATCH 4/4] mfd: global Suspend and resume support of ehci and ohci
Date: Wed, 29 Jun 2011 14:47:47 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.44L0.1106291446220.2064-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <2f837bd4c0fb09f310feb414479f3350@mail.gmail.com>

On Wed, 29 Jun 2011, Partha Basak wrote:

> >-----Original Message-----
> >From: Alan Stern [mailto:stern@rowland.harvard.edu]
> >Sent: Wednesday, June 29, 2011 11:03 PM
> >To: Munegowda, Keshava
> >Cc: Kevin Hilman; linux-usb@vger.kernel.org; linux-omap@vger.kernel.org;
> >linux-kernel@vger.kernel.org; balbi@ti.com; gadiyar@ti.com;
> >sameo@linux.intel.com; parthab@india.ti.com; tony@atomide.com; b-
> >cousson@ti.com; paul@pwsan.com
> >Subject: Re: [PATCH 4/4] mfd: global Suspend and resume support of ehci
> >and ohci
> >
> >On Wed, 29 Jun 2011, Munegowda, Keshava wrote:
> >
> >> for usb host case , I am seeing that the pm_runtime_get_sync
> >>
> >>
> >> static int rpm_resume(struct device *dev, int rpmflags)
> >> {
> >>   ............
> >>  ..........
> >> 	if (dev->pwr_domain) {
> >> 		callback = dev->pwr_domain->ops.runtime_resume;
> >> 		if(!strcmp(dev_name(dev),"usbhs_omap"))
> >> 			 pr_err("dev->pwr_domain->ops.runtime_resume");
> >> 	}
> >> 	else if (dev->type && dev->type->pm) {
> >> 		callback = dev->type->pm->runtime_resume;
> >> 		if(!strcmp(dev_name(dev),"usbhs_omap"))
> >> 			 pr_err("dev->type->pm->runtime_resume");
> >> 	}
> >> 	else if (dev->class && dev->class->pm) {
> >> 		callback = dev->class->pm->runtime_resume;
> >> 		if(!strcmp(dev_name(dev),"usbhs_omap"))
> >> 			 pr_err("ev->class->pm->runtime_resume");
> >> 	}
> >> 	else if (dev->bus && dev->bus->pm) {
> >> 		callback = dev->bus->pm->runtime_resume;
> >> 	if(!strcmp(dev_name(dev),"usbhs_omap"))
> >> 		 pr_err("dev->bus->pm->runtime_resume");
> >> 	}
> >> 	else
> >> 		callback = NULL;
> >> }
> >>
> >>
> >> I am seeing that below if statement was hitting true:
> >>
> >> 	if (dev->pwr_domain) {
> >> 		callback = dev->pwr_domain->ops.runtime_resume;
> >> 		if(!strcmp(dev_name(dev),"usbhs_omap"))
> >> 			 pr_err("dev->pwr_domain->ops.runtime_resume");
> >>
> >>
> >> due to this; the driver->runtime_resume was not getting called.
> >>
> >> Any idea on why I am seeing only the dev->pwr_domain is set not
> >> dev->bus && dev->bus->pm is hitting here?
> >
> >Because the PM domain takes precedence over the subsystem for PM
> >callbacks.  If the subsystem routine should be called then the PM
> >domain code has to call it.
> 
> This is taken care of in the pm-domain code:
> static int _od_runtime_resume(struct device *dev)
> {
> 	struct platform_device *pdev = to_platform_device(dev);
> 
> 	omap_device_enable(pdev);
> 
> 	return pm_generic_runtime_resume(dev);
> }
> pm_generic_runtime_resume will in turn call the driver call back.
> 
> int pm_generic_runtime_resume(struct device *dev)
> {
> 	const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm :
> NULL;
> 	int ret;
> 
> 	ret = pm && pm->runtime_resume ? pm->runtime_resume(dev) : 0;
> 
> 	return ret;
> }

You appear to be contradicting what Keshava wrote: "due to this; the
driver->runtime_resume was not getting called."

You can't both be right.

Alan Stern



  reply	other threads:[~2011-06-29 18:47 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-01 13:27 [PATCH 0/4] arm: omap: usb: Hwmod and Runtime PM support for EHCI & OHCI Keshava Munegowda
2011-06-01 13:27 ` Keshava Munegowda
2011-06-01 13:27 ` [PATCH 1/4] arm: omap: usb: ehci and ohci hwmod structures for omap3 and omap4 Keshava Munegowda
2011-06-01 13:27   ` Keshava Munegowda
2011-06-01 13:27   ` [PATCH 2/4] arm: omap: usb: register hwmods of usbhs Keshava Munegowda
2011-06-01 13:27     ` Keshava Munegowda
2011-06-01 13:27     ` [PATCH 3/4] arm: omap: usb: device name change for the clk names " Keshava Munegowda
2011-06-01 13:27       ` Keshava Munegowda
2011-06-01 13:27       ` [PATCH 4/4] mfd: global Suspend and resume support of ehci and ohci Keshava Munegowda
2011-06-01 13:27         ` Keshava Munegowda
2011-06-01 13:31         ` Felipe Balbi
2011-06-01 13:38           ` Munegowda, Keshava
2011-06-01 13:54         ` Rafael J. Wysocki
2011-06-01 14:32           ` Felipe Balbi
2011-06-05 17:19             ` Rafael J. Wysocki
2011-06-05 18:50               ` Felipe Balbi
2011-06-05 19:30                 ` Alan Stern
2011-06-05 19:30                   ` Alan Stern
2011-06-05 19:54                   ` Felipe Balbi
2011-06-05 19:54                     ` Felipe Balbi
2011-06-06 16:06                     ` Alan Stern
2011-06-06 16:06                       ` Alan Stern
2011-06-06 17:25                       ` Felipe Balbi
2011-06-06 18:03                         ` Alan Stern
2011-06-06 18:03                           ` Alan Stern
2011-06-06  9:45                   ` Mark Brown
2011-06-06  9:45                     ` Mark Brown
2011-06-02  0:06         ` Kevin Hilman
2011-06-02  0:06           ` Kevin Hilman
2011-06-29 15:22           ` Munegowda, Keshava
2011-06-29 16:37             ` Munegowda, Keshava
2011-06-29 16:37               ` Munegowda, Keshava
2011-06-29 17:33               ` Alan Stern
2011-06-29 17:33                 ` Alan Stern
2011-06-29 18:17                 ` Partha Basak
2011-06-29 18:47                   ` Alan Stern [this message]
2011-06-29 18:47                     ` Alan Stern
2011-06-29 19:20               ` Kevin Hilman
2011-06-29 19:20                 ` Kevin Hilman
2011-06-30 12:40                 ` Munegowda, Keshava
2011-06-30 12:40                   ` Munegowda, Keshava
2011-06-01 20:05       ` [PATCH 3/4] arm: omap: usb: device name change for the clk names of usbhs Kevin Hilman
2011-06-01 20:05         ` Kevin Hilman
2011-06-01 20:01     ` [PATCH 2/4] arm: omap: usb: register hwmods " Kevin Hilman
2011-06-01 20:01       ` Kevin Hilman
2011-06-01 20:04     ` Kevin Hilman
2011-06-01 20:04       ` Kevin Hilman
2011-06-01 19:56   ` [PATCH 1/4] arm: omap: usb: ehci and ohci hwmod structures for omap3 and omap4 Kevin Hilman
2011-06-01 19:56     ` Kevin Hilman
2011-06-02  6:55     ` Munegowda, Keshava

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=Pine.LNX.4.44L0.1106291446220.2064-100000@iolanthe.rowland.org \
    --to=stern@rowland.harvard.edu \
    --cc=b-cousson@ti.com \
    --cc=balbi@ti.com \
    --cc=gadiyar@ti.com \
    --cc=keshava_mgowda@ti.com \
    --cc=khilman@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=p-basak2@ti.com \
    --cc=parthab@india.ti.com \
    --cc=paul@pwsan.com \
    --cc=sameo@linux.intel.com \
    --cc=tony@atomide.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 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.