netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v10 0/7] PCI: rockchip: Move PCIe WAKE# handling into pci core
@ 2017-10-27  7:26 Jeffy Chen
  2017-10-27  7:26 ` [RFC PATCH v10 3/7] mwifiex: Disable wakeup irq handling for pcie Jeffy Chen
  2017-10-28  9:07 ` [RFC PATCH v10 0/7] PCI: rockchip: Move PCIe WAKE# handling into pci core Rafael J. Wysocki
  0 siblings, 2 replies; 4+ messages in thread
From: Jeffy Chen @ 2017-10-27  7:26 UTC (permalink / raw)
  To: linux-kernel, bhelgaas
  Cc: linux-pm, tony, shawn.lin, briannorris, rjw, dianders, Jeffy Chen,
	Xinming Hu, linux-pci, Rob Herring, Catalin Marinas, Kalle Valo,
	Heiko Stuebner, linux-acpi, linux-rockchip, Nishant Sarmukadam,
	Will Deacon, Matthias Kaehlcke, devicetree, Ganapathi Bhat,
	Frank Rowand, Len Brown, Amitkumar Karwar, linux-arm-kernel


Currently we are handling wake irq in mrvl wifi driver. Move it into
pci core.

Tested on my chromebook bob(with cros 4.4 kernel and mrvl wifi).


Changes in v10:
Use device_set_wakeup_capable() instead of device_set_wakeup_enable(),
since dedicated wakeirq will be lost in device_set_wakeup_enable(false).

Changes in v9:
Add section for PCI devices and rewrite the commit message.
Rewrite the commit message.
Fix check error in .cleanup().
Move dedicated wakeirq setup to setup() callback and use
device_set_wakeup_enable() to enable/disable.

Changes in v8:
Add optional "pci", and rewrite commit message.
Rewrite the commit message.
Add pci-of.c and use platform_pm_ops to handle the PCIe WAKE# signal.

Changes in v7:
Move PCIE_WAKE handling into pci core.

Changes in v6:
Fix device_init_wake error handling, and add some comments.

Changes in v5:
Move to pci.txt
Use "wakeup" instead of "wake"
Rebase.

Changes in v3:
Fix error handling.

Changes in v2:
Use dev_pm_set_dedicated_wake_irq.

Jeffy Chen (7):
  dt-bindings: PCI: Add definition of PCIe WAKE# irq and PCI irq
  of/irq: Adjust of_pci_irq parsing for multiple interrupts
  mwifiex: Disable wakeup irq handling for pcie
  arm64: dts: rockchip: Move PCIe WAKE# irq to pcie driver for Gru
  PCI: Make pci_platform_pm_ops's callbacks optional
  PCI / PM: Move acpi wakeup code to pci core
  PCI / PM: Add support for the PCIe WAKE# signal for OF

 Documentation/devicetree/bindings/pci/pci.txt |   8 ++
 arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi  |  15 +--
 drivers/net/wireless/marvell/mwifiex/main.c   |   4 +
 drivers/of/of_pci_irq.c                       |  13 ++-
 drivers/pci/Makefile                          |   2 +-
 drivers/pci/pci-acpi.c                        | 121 ++++++++++++------------
 drivers/pci/pci-driver.c                      |   9 ++
 drivers/pci/pci-of.c                          | 127 ++++++++++++++++++++++++++
 drivers/pci/pci.c                             | 112 +++++++++++++++++++----
 drivers/pci/pci.h                             |  31 +++++--
 drivers/pci/probe.c                           |  12 ++-
 drivers/pci/remove.c                          |   2 +
 include/linux/pci.h                           |   2 +
 13 files changed, 361 insertions(+), 97 deletions(-)
 create mode 100644 drivers/pci/pci-of.c

-- 
2.11.0



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [RFC PATCH v10 3/7] mwifiex: Disable wakeup irq handling for pcie
  2017-10-27  7:26 [RFC PATCH v10 0/7] PCI: rockchip: Move PCIe WAKE# handling into pci core Jeffy Chen
@ 2017-10-27  7:26 ` Jeffy Chen
  2017-10-28  9:07 ` [RFC PATCH v10 0/7] PCI: rockchip: Move PCIe WAKE# handling into pci core Rafael J. Wysocki
  1 sibling, 0 replies; 4+ messages in thread
From: Jeffy Chen @ 2017-10-27  7:26 UTC (permalink / raw)
  To: linux-kernel, bhelgaas
  Cc: linux-pm, tony, shawn.lin, briannorris, rjw, dianders, Jeffy Chen,
	Xinming Hu, Kalle Valo, Ganapathi Bhat, Amitkumar Karwar,
	linux-wireless, Nishant Sarmukadam, netdev

We are going to handle the wakeup irq in the pci core.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---

Changes in v10: None
Changes in v9: None
Changes in v8: None
Changes in v7: None
Changes in v6: None
Changes in v5: None
Changes in v3: None
Changes in v2: None

 drivers/net/wireless/marvell/mwifiex/main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/wireless/marvell/mwifiex/main.c b/drivers/net/wireless/marvell/mwifiex/main.c
index ee40b739b289..ba081c16f85c 100644
--- a/drivers/net/wireless/marvell/mwifiex/main.c
+++ b/drivers/net/wireless/marvell/mwifiex/main.c
@@ -1568,6 +1568,10 @@ static void mwifiex_probe_of(struct mwifiex_adapter *adapter)
 		goto err_exit;
 
 	adapter->dt_node = dev->of_node;
+
+	if (adapter->iface_type != MWIFIEX_PCIE)
+		goto err_exit;
+
 	adapter->irq_wakeup = irq_of_parse_and_map(adapter->dt_node, 0);
 	if (!adapter->irq_wakeup) {
 		dev_dbg(dev, "fail to parse irq_wakeup from device tree\n");
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [RFC PATCH v10 0/7] PCI: rockchip: Move PCIe WAKE# handling into pci core
  2017-10-27  7:26 [RFC PATCH v10 0/7] PCI: rockchip: Move PCIe WAKE# handling into pci core Jeffy Chen
  2017-10-27  7:26 ` [RFC PATCH v10 3/7] mwifiex: Disable wakeup irq handling for pcie Jeffy Chen
@ 2017-10-28  9:07 ` Rafael J. Wysocki
       [not found]   ` <1872710.P2f02irZl9-yvgW3jdyMHm1GS7QM15AGw@public.gmane.org>
  1 sibling, 1 reply; 4+ messages in thread
From: Rafael J. Wysocki @ 2017-10-28  9:07 UTC (permalink / raw)
  To: Jeffy Chen
  Cc: linux-kernel, bhelgaas, linux-pm, tony, shawn.lin, briannorris,
	dianders, Xinming Hu, linux-pci, Rob Herring, Catalin Marinas,
	Kalle Valo, Heiko Stuebner, linux-acpi, linux-rockchip,
	Nishant Sarmukadam, Will Deacon, Matthias Kaehlcke, devicetree,
	Ganapathi Bhat, Frank Rowand, Len Brown, Amitkumar Karwar,
	linux-arm-kernel, net

On Friday, October 27, 2017 9:26:05 AM CEST Jeffy Chen wrote:
> 
> Currently we are handling wake irq in mrvl wifi driver. Move it into
> pci core.
> 
> Tested on my chromebook bob(with cros 4.4 kernel and mrvl wifi).
> 
> 
> Changes in v10:
> Use device_set_wakeup_capable() instead of device_set_wakeup_enable(),
> since dedicated wakeirq will be lost in device_set_wakeup_enable(false).
> 
> Changes in v9:
> Add section for PCI devices and rewrite the commit message.
> Rewrite the commit message.
> Fix check error in .cleanup().
> Move dedicated wakeirq setup to setup() callback and use
> device_set_wakeup_enable() to enable/disable.
> 
> Changes in v8:
> Add optional "pci", and rewrite commit message.
> Rewrite the commit message.
> Add pci-of.c and use platform_pm_ops to handle the PCIe WAKE# signal.
> 
> Changes in v7:
> Move PCIE_WAKE handling into pci core.
> 
> Changes in v6:
> Fix device_init_wake error handling, and add some comments.
> 
> Changes in v5:
> Move to pci.txt
> Use "wakeup" instead of "wake"
> Rebase.
> 
> Changes in v3:
> Fix error handling.
> 
> Changes in v2:
> Use dev_pm_set_dedicated_wake_irq.
> 
> Jeffy Chen (7):
>   dt-bindings: PCI: Add definition of PCIe WAKE# irq and PCI irq
>   of/irq: Adjust of_pci_irq parsing for multiple interrupts
>   mwifiex: Disable wakeup irq handling for pcie
>   arm64: dts: rockchip: Move PCIe WAKE# irq to pcie driver for Gru
>   PCI: Make pci_platform_pm_ops's callbacks optional
>   PCI / PM: Move acpi wakeup code to pci core
>   PCI / PM: Add support for the PCIe WAKE# signal for OF

Overall, I don't quite like the direction this is going into, but I need to
have a deeper look.  Which may take some time, so please bear with me.

Thanks,
Rafael


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC PATCH v10 0/7] PCI: rockchip: Move PCIe WAKE# handling into pci core
       [not found]   ` <1872710.P2f02irZl9-yvgW3jdyMHm1GS7QM15AGw@public.gmane.org>
@ 2017-10-30  2:15     ` jeffy
  0 siblings, 0 replies; 4+ messages in thread
From: jeffy @ 2017-10-30  2:15 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	bhelgaas-hpIqsD4AKlfQT0dZR+AlfA, linux-pm-u79uwXL29TY76Z2rM5mHXA,
	tony-4v6yS6AI5VpBDgjK7y7TUQ, shawn.lin-TNX95d0MmH7DzftRWevZcw,
	briannorris-F7+t8E8rja9g9hUCZPvPmw,
	dianders-F7+t8E8rja9g9hUCZPvPmw, Xinming Hu,
	linux-pci-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Catalin Marinas,
	Kalle Valo, Heiko Stuebner, linux-acpi-u79uwXL29TY76Z2rM5mHXA,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Nishant Sarmukadam, Will Deacon, Matthias Kaehlcke,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Ganapathi Bhat, Frank Rowand,
	Len Brown, Amitkumar Karwar,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, net

Hi Rafael,

thanks for your reply.

On 10/28/2017 05:07 PM, Rafael J. Wysocki wrote:
> Overall, I don't quite like the direction this is going into, but I need to
> have a deeper look.  Which may take some time, so please bear with me.
>
ok, i'll wait for your comments, thanks :)

> Thanks,
> Rafael


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-10-30  2:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-27  7:26 [RFC PATCH v10 0/7] PCI: rockchip: Move PCIe WAKE# handling into pci core Jeffy Chen
2017-10-27  7:26 ` [RFC PATCH v10 3/7] mwifiex: Disable wakeup irq handling for pcie Jeffy Chen
2017-10-28  9:07 ` [RFC PATCH v10 0/7] PCI: rockchip: Move PCIe WAKE# handling into pci core Rafael J. Wysocki
     [not found]   ` <1872710.P2f02irZl9-yvgW3jdyMHm1GS7QM15AGw@public.gmane.org>
2017-10-30  2:15     ` jeffy

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).