All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Bjorn Helgaas <helgaas@kernel.org>,
	Jeffy Chen <jeffy.chen@rock-chips.com>,
	linux-kernel@vger.kernel.org, bhelgaas@google.com,
	Heiko Stuebner <heiko@sntech.de>,
	linux-pci@vger.kernel.org, shawn.lin@rock-chips.com,
	briannorris@chromium.org, dianders@chromium.org,
	linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH v5 1/3] PCI: rockchip: Add support for pcie wake irq
Date: Fri, 13 Oct 2017 10:58:26 -0700	[thread overview]
Message-ID: <20171013175825.GR4394@atomide.com> (raw)
In-Reply-To: <2453698.N4jfPaHx71@aspire.rjw.lan>

* Rafael J. Wysocki <rjw@rjwysocki.net> [171013 06:32]:
> [+cc Tony]
> 
> On Friday, October 13, 2017 5:04:41 AM CEST Bjorn Helgaas wrote:
> > [+cc Rafael, linux-pm]
> > On Mon, Sep 11, 2017 at 11:10:27PM +0800, Jeffy Chen wrote:
> > > Add support for PCIE_WAKE pin in rockchip pcie driver.
...
> > > @@ -995,6 +996,15 @@ static int rockchip_pcie_setup_irq(struct rockchip_pcie *rockchip)
> > >  		return err;
> > >  	}
> > >  
> > > +	/* Must init wakeup before setting dedicated wakeup irq. */
> > > +	device_init_wakeup(dev, true);
> > > +	irq = platform_get_irq_byname(pdev, "wakeup");
> > > +	if (irq >= 0) {
> > > +		err = dev_pm_set_dedicated_wake_irq(dev, irq);
> > 
> > I'm a little skeptical about dev_pm_set_dedicated_wake_irq(), not
> > because I know anything at all about it, but because there are only
> > five callers in the whole tree, three of which are in UART code, and
> > none in anything resembling PCI code.

Well it should work for any device that can provide an out of band wakeup
interrupt such as a dedicated GPIO line.

> > Is Rockchip really that special, or are we going about this the wrong
> > way?

Maybe this can be set up in a generic way somewhere similar to what
the I2C bus is doing?

See i2c_device_probe() for dev_pm_set_dedicated_wake_irq() in
drivers/i2c/i2c-core-base.c.

Regards,

Tony

WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 1/3] PCI: rockchip: Add support for pcie wake irq
Date: Fri, 13 Oct 2017 10:58:26 -0700	[thread overview]
Message-ID: <20171013175825.GR4394@atomide.com> (raw)
In-Reply-To: <2453698.N4jfPaHx71@aspire.rjw.lan>

* Rafael J. Wysocki <rjw@rjwysocki.net> [171013 06:32]:
> [+cc Tony]
> 
> On Friday, October 13, 2017 5:04:41 AM CEST Bjorn Helgaas wrote:
> > [+cc Rafael, linux-pm]
> > On Mon, Sep 11, 2017 at 11:10:27PM +0800, Jeffy Chen wrote:
> > > Add support for PCIE_WAKE pin in rockchip pcie driver.
...
> > > @@ -995,6 +996,15 @@ static int rockchip_pcie_setup_irq(struct rockchip_pcie *rockchip)
> > >  		return err;
> > >  	}
> > >  
> > > +	/* Must init wakeup before setting dedicated wakeup irq. */
> > > +	device_init_wakeup(dev, true);
> > > +	irq = platform_get_irq_byname(pdev, "wakeup");
> > > +	if (irq >= 0) {
> > > +		err = dev_pm_set_dedicated_wake_irq(dev, irq);
> > 
> > I'm a little skeptical about dev_pm_set_dedicated_wake_irq(), not
> > because I know anything at all about it, but because there are only
> > five callers in the whole tree, three of which are in UART code, and
> > none in anything resembling PCI code.

Well it should work for any device that can provide an out of band wakeup
interrupt such as a dedicated GPIO line.

> > Is Rockchip really that special, or are we going about this the wrong
> > way?

Maybe this can be set up in a generic way somewhere similar to what
the I2C bus is doing?

See i2c_device_probe() for dev_pm_set_dedicated_wake_irq() in
drivers/i2c/i2c-core-base.c.

Regards,

Tony

  reply	other threads:[~2017-10-13 17:58 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-11 15:10 [PATCH v5 0/3] PCI: rockchip: Move PCIE_WAKE handling into rockchip pcie driver Jeffy Chen
2017-09-11 15:10 ` Jeffy Chen
2017-09-11 15:10 ` Jeffy Chen
2017-09-11 15:10 ` Jeffy Chen
2017-09-11 15:10 ` [PATCH v5 1/3] PCI: rockchip: Add support for pcie wake irq Jeffy Chen
2017-09-11 15:10   ` Jeffy Chen
2017-09-11 15:10   ` Jeffy Chen
2017-09-12  0:39   ` Shawn Lin
2017-09-12  0:39     ` Shawn Lin
2017-09-12  0:39     ` Shawn Lin
2017-10-13  1:56   ` Brian Norris
2017-10-13  1:56     ` Brian Norris
2017-10-13  1:56     ` Brian Norris
2017-10-13  2:32     ` Bjorn Helgaas
2017-10-13  2:32       ` Bjorn Helgaas
2017-10-13  2:32       ` Bjorn Helgaas
2017-10-13  6:31       ` Brian Norris
2017-10-13  6:31         ` Brian Norris
2017-10-13  3:04   ` Bjorn Helgaas
2017-10-13  3:04     ` Bjorn Helgaas
2017-10-13  3:04     ` Bjorn Helgaas
2017-10-13 13:21     ` Rafael J. Wysocki
2017-10-13 13:21       ` Rafael J. Wysocki
2017-10-13 17:58       ` Tony Lindgren [this message]
2017-10-13 17:58         ` Tony Lindgren
2017-10-13 18:33       ` jeffy
2017-10-13 18:33         ` jeffy
2017-10-13 19:19         ` Bjorn Helgaas
2017-10-13 19:19           ` Bjorn Helgaas
2017-10-13 19:19           ` Bjorn Helgaas
2017-10-13 19:26           ` jeffy
2017-10-13 19:26             ` jeffy
2017-10-13 20:44           ` Brian Norris
2017-10-13 20:44             ` Brian Norris
2017-09-11 15:10 ` [PATCH v5 2/3] dt-bindings: PCI: Add definition of " Jeffy Chen
2017-09-11 19:24   ` Rob Herring
2017-09-11 15:10 ` [PATCH v5 3/3] arm64: dts: rockchip: Handle pcie wake in pcie driver for Gru Jeffy Chen
2017-09-11 15:10   ` Jeffy Chen
2017-09-12  0:40   ` Shawn Lin
2017-09-12  0:40     ` Shawn Lin

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=20171013175825.GR4394@atomide.com \
    --to=tony@atomide.com \
    --cc=bhelgaas@google.com \
    --cc=briannorris@chromium.org \
    --cc=dianders@chromium.org \
    --cc=heiko@sntech.de \
    --cc=helgaas@kernel.org \
    --cc=jeffy.chen@rock-chips.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=rjw@rjwysocki.net \
    --cc=shawn.lin@rock-chips.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.