Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752445AbdL0Par (ORCPT ); Wed, 27 Dec 2017 10:30:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:39542 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752091AbdL0Pao (ORCPT ); Wed, 27 Dec 2017 10:30:44 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8FB00218CA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=robh@kernel.org X-Google-Smtp-Source: ACJfBosVON66fINnHQ25wC+21Es7433UmfI1ThcOR5VF5z4SiTwRdtoNWUlipyAcL8RM0iF0d7K9rc09JiR8os4n2fY= MIME-Version: 1.0 In-Reply-To: <5A42F847.5060305@rock-chips.com> References: <20171226023646.17722-1-jeffy.chen@rock-chips.com> <20171226023646.17722-5-jeffy.chen@rock-chips.com> <20171226235607.4rgp4ebrrktt6d56@rob-hp-laptop> <5A42F847.5060305@rock-chips.com> From: Rob Herring Date: Wed, 27 Dec 2017 09:30:22 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH v12 4/5] PCI / PM: Add support for the PCIe WAKE# signal for OF To: JeffyChen Cc: "linux-kernel@vger.kernel.org" , Bjorn Helgaas , linux-pm@vger.kernel.org, Tony Lindgren , Shawn Lin , Brian Norris , "Rafael J. Wysocki" , Doug Anderson , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , linux-pci@vger.kernel.org, Frank Rowand , Andy Shevchenko Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1830 Lines: 63 On Tue, Dec 26, 2017 at 7:32 PM, JeffyChen wrote: > Hi Rob, > > Thanks for your reply. > > On 12/27/2017 07:56 AM, Rob Herring wrote: >>> >>> > >>> > drivers/of/of_pci_irq.c | 49 +++++++++++++++++++++++++++++++ >> >> Please move this to drivers/pci/of.c (or perhaps create pci/of_irq.c). >> >>> > drivers/pci/Makefile | 1 + >>> > drivers/pci/pci-driver.c | 10 +++++++ >>> > drivers/pci/pci-of.c | 75 >>> > ++++++++++++++++++++++++++++++++++++++++++++++++ >> >> We already have drivers/pci/of.c. It's not clear what the difference is >> from the filenames. Either merge with of.c or perhaps of-pm.c. > > > this new file does something similar to the pci-acpi.c and pci-mid.c.. pci-acpi.c has similar things to pci/of.c. The naming is just not consistent. Also, I plan to move the rest of drivers/of/of_pci* to drivers/pci. > and i am agree the naming is not clear, maybe we can rename both of those > files to something like pci-pm-***.c? At least pci-acpi.c is more than just PM functions, so that doesn't make sense. Given that all the ACPI related functions are in 1 file, we should do the same for DT. > > Hi Rafael, do you think this would make sense? > > [...] >>> >+static int __init of_pci_init(void) >>> >+{ >>> >+ if (!acpi_disabled) >>> >+ return 0; >>> >+ >>> >+ pci_set_platform_pm(&of_pci_platform_pm); >> >> I guess no DT based system will override this? > > > i think the !acpi_disabled means acpi been disabled or CONFIG_ACPI is > undefined. > > and pci-acpi.c would only work when we have CONFIG_ACPI. > > but i have no idea about pci-mid.c or would it possible to have more > platform pm ops in the future...maybe we should add some dependency in the > Kconfig? It's probably fine given there are only 2 other implementations so far. Rob