* [PATCH v1 04/11] platform/x86: make PCI dependency explicit [not found] <20181222001452.7474-1-okaya@kernel.org> @ 2018-12-22 0:14 ` Sinan Kaya 2018-12-22 0:14 ` [PATCH v1 05/11] platform/x86: intel_pmc: Hide PCI specific pieces behind CONFIG_PCI Sinan Kaya 2018-12-22 0:14 ` [PATCH v1 06/11] platform/x86: apple-gmux: hide PCI specific code Sinan Kaya 2 siblings, 0 replies; 6+ messages in thread From: Sinan Kaya @ 2018-12-22 0:14 UTC (permalink / raw) To: linux-next Cc: linux-acpi, Sinan Kaya, Darren Hart, Andy Shevchenko, open list:X86 PLATFORM DRIVERS, open list ipss driver is a PCI device driver but this has not been mentioned anywhere in Kconfig. Signed-off-by: Sinan Kaya <okaya@kernel.org> --- drivers/platform/x86/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig index e3b62c2ee8d1..b36ea14b41ad 100644 --- a/drivers/platform/x86/Kconfig +++ b/drivers/platform/x86/Kconfig @@ -1009,7 +1009,7 @@ config INTEL_MFLD_THERMAL config INTEL_IPS tristate "Intel Intelligent Power Sharing" - depends on ACPI + depends on ACPI && PCI ---help--- Intel Calpella platforms support dynamic power sharing between the CPU and GPU, maximizing performance in a given TDP. This driver, -- 2.19.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v1 05/11] platform/x86: intel_pmc: Hide PCI specific pieces behind CONFIG_PCI [not found] <20181222001452.7474-1-okaya@kernel.org> 2018-12-22 0:14 ` [PATCH v1 04/11] platform/x86: make PCI dependency explicit Sinan Kaya @ 2018-12-22 0:14 ` Sinan Kaya 2018-12-22 0:14 ` [PATCH v1 06/11] platform/x86: apple-gmux: hide PCI specific code Sinan Kaya 2 siblings, 0 replies; 6+ messages in thread From: Sinan Kaya @ 2018-12-22 0:14 UTC (permalink / raw) To: linux-next Cc: linux-acpi, Sinan Kaya, Zha Qipeng, Darren Hart, Andy Shevchenko, open list:INTEL PMC/P-Unit IPC DRIVER, open list In the configuration where CONFIG_PCI is unset, this driver is failing to compile due to PCI framework dependencies. Hide these behind CONFIG_PCI ifdef. Signed-off-by: Sinan Kaya <okaya@kernel.org> --- drivers/platform/x86/intel_pmc_ipc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/platform/x86/intel_pmc_ipc.c b/drivers/platform/x86/intel_pmc_ipc.c index 7964ba22ef8d..d85dfed3bf9c 100644 --- a/drivers/platform/x86/intel_pmc_ipc.c +++ b/drivers/platform/x86/intel_pmc_ipc.c @@ -504,6 +504,7 @@ static irqreturn_t ioc(int irq, void *dev_id) return IRQ_HANDLED; } +#ifdef CONFIG_PCI static int ipc_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) { struct intel_pmc_ipc_dev *pmc = &ipcdev; @@ -556,6 +557,7 @@ static struct pci_driver ipc_pci_driver = { .id_table = ipc_pci_ids, .probe = ipc_pci_probe, }; +#endif static ssize_t intel_pmc_ipc_simple_cmd_store(struct device *dev, struct device_attribute *attr, @@ -1007,18 +1009,22 @@ static int __init intel_pmc_ipc_init(void) pr_err("Failed to register PMC ipc platform driver\n"); return ret; } +#ifdef CONFIG_PCI ret = pci_register_driver(&ipc_pci_driver); if (ret) { pr_err("Failed to register PMC ipc pci driver\n"); platform_driver_unregister(&ipc_plat_driver); return ret; } +#endif return ret; } static void __exit intel_pmc_ipc_exit(void) { +#ifdef CONFIG_PCI pci_unregister_driver(&ipc_pci_driver); +#endif platform_driver_unregister(&ipc_plat_driver); } -- 2.19.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v1 06/11] platform/x86: apple-gmux: hide PCI specific code [not found] <20181222001452.7474-1-okaya@kernel.org> 2018-12-22 0:14 ` [PATCH v1 04/11] platform/x86: make PCI dependency explicit Sinan Kaya 2018-12-22 0:14 ` [PATCH v1 05/11] platform/x86: intel_pmc: Hide PCI specific pieces behind CONFIG_PCI Sinan Kaya @ 2018-12-22 0:14 ` Sinan Kaya 2018-12-22 8:03 ` Lukas Wunner 2 siblings, 1 reply; 6+ messages in thread From: Sinan Kaya @ 2018-12-22 0:14 UTC (permalink / raw) To: linux-next Cc: linux-acpi, Sinan Kaya, Darren Hart, Andy Shevchenko, open list:X86 PLATFORM DRIVERS, open list Code is scanning PCI bus to find out if it is switchable or not. If CONFIG_PCI is not set, assume unswitchable. Signed-off-by: Sinan Kaya <okaya@kernel.org> --- drivers/platform/x86/apple-gmux.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c index fd2ffebc868f..b552b54bf58b 100644 --- a/drivers/platform/x86/apple-gmux.c +++ b/drivers/platform/x86/apple-gmux.c @@ -742,8 +742,12 @@ static int gmux_probe(struct pnp_dev *pnp, const struct pnp_device_id *id) * If Thunderbolt is present, the external DP port is not fully * switchable. Force its AUX channel to the discrete GPU. */ +#ifdef CONFIG_PCI gmux_data->external_switchable = !bus_for_each_dev(&pci_bus_type, NULL, NULL, is_thunderbolt); +#else + gmux_data->external_switchable = false; +#endif if (!gmux_data->external_switchable) gmux_write8(gmux_data, GMUX_PORT_SWITCH_EXTERNAL, 3); -- 2.19.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v1 06/11] platform/x86: apple-gmux: hide PCI specific code 2018-12-22 0:14 ` [PATCH v1 06/11] platform/x86: apple-gmux: hide PCI specific code Sinan Kaya @ 2018-12-22 8:03 ` Lukas Wunner 2018-12-22 8:31 ` Sinan Kaya [not found] ` <CAHp75VfTmWN4bTNPaTL2KYYUWARvix67ynx2cKGzhO3o-0VY=g@mail.gmail.com> 0 siblings, 2 replies; 6+ messages in thread From: Lukas Wunner @ 2018-12-22 8:03 UTC (permalink / raw) To: Sinan Kaya Cc: linux-pci, linux-acpi, Darren Hart, Andy Shevchenko, platform-driver-x86, linux-kernel On Sat, Dec 22, 2018 at 12:14:47AM +0000, Sinan Kaya wrote: > Code is scanning PCI bus to find out if it is switchable or not. If > CONFIG_PCI is not set, assume unswitchable. > > Signed-off-by: Sinan Kaya <okaya@kernel.org> > --- > drivers/platform/x86/apple-gmux.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c > index fd2ffebc868f..b552b54bf58b 100644 > --- a/drivers/platform/x86/apple-gmux.c > +++ b/drivers/platform/x86/apple-gmux.c > @@ -742,8 +742,12 @@ static int gmux_probe(struct pnp_dev *pnp, const struct pnp_device_id *id) > * If Thunderbolt is present, the external DP port is not fully > * switchable. Force its AUX channel to the discrete GPU. > */ > +#ifdef CONFIG_PCI > gmux_data->external_switchable = > !bus_for_each_dev(&pci_bus_type, NULL, NULL, is_thunderbolt); > +#else > + gmux_data->external_switchable = false; > +#endif > if (!gmux_data->external_switchable) > gmux_write8(gmux_data, GMUX_PORT_SWITCH_EXTERNAL, 3); This driver is only used on 2008+ MacBook Pros and the 2013+ Mac Pro, all of which have PCI and are pretty much unusable with CONFIG_PCI=n. So it is okay to just add "depends on PCI" for this driver, as you did with other drivers, and I think that's preferrable to an #ifdef. You can also drop the "platform/x86: " prefix from the subject if you like, all previous commits to this driver just use "apple-gmux: ". If you are okay with these changes, feel free to add my Reviewed-by when respinning. Thanks, Lukas ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1 06/11] platform/x86: apple-gmux: hide PCI specific code 2018-12-22 8:03 ` Lukas Wunner @ 2018-12-22 8:31 ` Sinan Kaya [not found] ` <CAHp75VfTmWN4bTNPaTL2KYYUWARvix67ynx2cKGzhO3o-0VY=g@mail.gmail.com> 1 sibling, 0 replies; 6+ messages in thread From: Sinan Kaya @ 2018-12-22 8:31 UTC (permalink / raw) To: Lukas Wunner Cc: linux-pci, linux-acpi, Darren Hart, Andy Shevchenko, platform-driver-x86, linux-kernel On 12/22/2018 9:03 AM, Lukas Wunner wrote: > On Sat, Dec 22, 2018 at 12:14:47AM +0000, Sinan Kaya wrote: >> Code is scanning PCI bus to find out if it is switchable or not. If >> CONFIG_PCI is not set, assume unswitchable. >> >> Signed-off-by: Sinan Kaya <okaya@kernel.org> >> --- >> drivers/platform/x86/apple-gmux.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c >> index fd2ffebc868f..b552b54bf58b 100644 >> --- a/drivers/platform/x86/apple-gmux.c >> +++ b/drivers/platform/x86/apple-gmux.c >> @@ -742,8 +742,12 @@ static int gmux_probe(struct pnp_dev *pnp, const struct pnp_device_id *id) >> * If Thunderbolt is present, the external DP port is not fully >> * switchable. Force its AUX channel to the discrete GPU. >> */ >> +#ifdef CONFIG_PCI >> gmux_data->external_switchable = >> !bus_for_each_dev(&pci_bus_type, NULL, NULL, is_thunderbolt); >> +#else >> + gmux_data->external_switchable = false; >> +#endif >> if (!gmux_data->external_switchable) >> gmux_write8(gmux_data, GMUX_PORT_SWITCH_EXTERNAL, 3); > > This driver is only used on 2008+ MacBook Pros and the 2013+ Mac Pro, > all of which have PCI and are pretty much unusable with CONFIG_PCI=n. > > So it is okay to just add "depends on PCI" for this driver, as you did > with other drivers, and I think that's preferrable to an #ifdef. > > You can also drop the "platform/x86: " prefix from the subject if you > like, all previous commits to this driver just use "apple-gmux: ". > > If you are okay with these changes, feel free to add my Reviewed-by > when respinning. > This is how I updated this patch: commit 867d96cb6b75124b7ce11014425b8c57a8350e61 (HEAD) Author: Sinan Kaya <okaya@kernel.org> Date: Fri Dec 21 23:24:13 2018 +0000 apple-gmux: Make PCI dependency explicit This driver depends on the PCI infrastructure but the dependency has not been explicitly called out. Signed-off-by: Sinan Kaya <okaya@kernel.org> Reviewed-by: Lukas Wunner <lukas@wunner.de> diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig index b36ea14b41ad..86b75fa55dbc 100644 --- a/drivers/platform/x86/Kconfig +++ b/drivers/platform/x86/Kconfig @@ -1136,6 +1136,7 @@ config SAMSUNG_Q10 config APPLE_GMUX tristate "Apple Gmux Driver" depends on ACPI + depends on PCI depends on PNP depends on BACKLIGHT_CLASS_DEVICE depends on BACKLIGHT_APPLE=n || BACKLIGHT_APPLE > Thanks, > > Lukas > ^ permalink raw reply related [flat|nested] 6+ messages in thread
[parent not found: <CAHp75VfTmWN4bTNPaTL2KYYUWARvix67ynx2cKGzhO3o-0VY=g@mail.gmail.com>]
* Re: [PATCH v1 06/11] platform/x86: apple-gmux: hide PCI specific code [not found] ` <CAHp75VfTmWN4bTNPaTL2KYYUWARvix67ynx2cKGzhO3o-0VY=g@mail.gmail.com> @ 2018-12-25 13:33 ` Sinan Kaya 0 siblings, 0 replies; 6+ messages in thread From: Sinan Kaya @ 2018-12-25 13:33 UTC (permalink / raw) To: Andy Shevchenko Cc: Lukas Wunner, linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, Darren Hart, Andy Shevchenko, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org On Mon, Dec 24, 2018 at 5:05 AM Andy Shevchenko <andy.shevchenko@gmail.com> wrote: > > > > On Saturday, December 22, 2018, Lukas Wunner <lukas@wunner.de> wrote: >> >> On Sat, Dec 22, 2018 at 12:14:47AM +0000, Sinan Kaya wrote: >> > Code is scanning PCI bus to find out if it is switchable or not. If >> > CONFIG_PCI is not set, assume unswitchable. >> > >> >> You can also drop the "platform/x86: " prefix from the subject if you >> like, all previous commits to this driver just use "apple-gmux: ". >> >> If you are okay with these changes, feel free to add my Reviewed-by >> when respinning. >> > I'm not okay with dropping prefix. You can but may not, please, remove the prefix. > You mean 'keep the prefix' above, right? What is the consensus? > > -- > With Best Regards, > Andy Shevchenko > > ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-12-25 13:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20181222001452.7474-1-okaya@kernel.org>
2018-12-22 0:14 ` [PATCH v1 04/11] platform/x86: make PCI dependency explicit Sinan Kaya
2018-12-22 0:14 ` [PATCH v1 05/11] platform/x86: intel_pmc: Hide PCI specific pieces behind CONFIG_PCI Sinan Kaya
2018-12-22 0:14 ` [PATCH v1 06/11] platform/x86: apple-gmux: hide PCI specific code Sinan Kaya
2018-12-22 8:03 ` Lukas Wunner
2018-12-22 8:31 ` Sinan Kaya
[not found] ` <CAHp75VfTmWN4bTNPaTL2KYYUWARvix67ynx2cKGzhO3o-0VY=g@mail.gmail.com>
2018-12-25 13:33 ` Sinan Kaya
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox