Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2814639imu; Sun, 23 Dec 2018 08:23:05 -0800 (PST) X-Google-Smtp-Source: ALg8bN6zcUxONUxgyrH5qfy8DTpKlQBtTLX8JeWuVvVBRb3ipwzlDUCUBMky5AdbmvAfSTP9Kw+d X-Received: by 2002:a63:da14:: with SMTP id c20mr9184882pgh.233.1545582185547; Sun, 23 Dec 2018 08:23:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545582185; cv=none; d=google.com; s=arc-20160816; b=spHXVVZV94y+F2VSF6kJLu6J1pc2sPOvUBfdfA+9tNYdGmfeq3+w9gmansYWnzvLY6 pMOJjGadb2imTsQG/JhqLSbFAfz1j8iPql7r0iQBL+Bh9Hf2jzwYNHu0lW8EwWwpTgK5 ggIKTKVuL5evsSQKZRBbOFtmipDTQa5BMlL94bAx+KoCNuvO2QJVSpn26tkYZLgbsRnw G/n3WC5Nt9VUW5K06v092T0gsdgREcWkFK07fcfOigA527+rZV3QZYvXkKpVppWw1/Ef 2w6illQz3/ZniYeiFi1RLNOKGsoE1R45cBmAhOJn1CIi7eV9TC9IVyp2RGo2iVvzmAqz MKng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=RDPs2N+uGye210GOffYtYz8JxzNFiI0WnZeJwS8DN4k=; b=qQaw1X3ErLDvPQYtPq6RPbUiuBQEPLIE+w1CyVv+KA/KckC6y2HxDwfUoxS+C+tWHg w3qlXfbsdxmxEIIzKPKzMaIn6FHpgTda7HO5CkEwaPrzxpDlrDF3uwHv8YWClXELrDdy skwgx3d4ofQzyV4ddTo3/LHC6m0Wig4y48o1B6kx3p+0rAZibZn53btmWaUM9t384mkq 8jhIlOjwG/hdpkJm5AbUWCB+YJR+CWqwFX7M5HFA53208IckznoNRX8ZmgX3JbyHIV/+ Q6PDPnMNMcClPUce1/wDoF8bcyMgPrqSuAFnHipPBYnSmrIiTJtVxliBgegFmTUBynZZ /LVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WpqrNf7P; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n59si11231593plb.388.2018.12.23.08.22.50; Sun, 23 Dec 2018 08:23:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WpqrNf7P; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391744AbeLVRrS (ORCPT + 99 others); Sat, 22 Dec 2018 12:47:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:34182 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391572AbeLVRrQ (ORCPT ); Sat, 22 Dec 2018 12:47:16 -0500 Received: from [192.168.43.85] (unknown [5.92.228.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A912F21929; Sat, 22 Dec 2018 08:31:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1545467515; bh=cFY54z5gtflL2lN3u8LZOqTn0eShLB8Ka9p5zQ9+mc8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=WpqrNf7PE5stKXCg17cwvDo3X8cMKERhTxkLvaLxXhkooJSxnDT/vLGdyGIFcfRuU N2VTfScT9dHiE/NTCmEmLxr3Wd6BuB1Rs0ij7UXrGj+S+YJ8KHwqLf+6gLXkCe2Tj7 JVvzLu/zJVakFXJQm4wRe0r3YHC/gx+1UUSa4zhY= Subject: Re: [PATCH v1 06/11] platform/x86: apple-gmux: hide PCI specific code To: Lukas Wunner Cc: 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 References: <20181222001452.7474-1-okaya@kernel.org> <20181222001452.7474-7-okaya@kernel.org> <20181222080317.qicyihyauia6n63w@wunner.de> From: Sinan Kaya Message-ID: Date: Sat, 22 Dec 2018 09:31:51 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 MIME-Version: 1.0 In-Reply-To: <20181222080317.qicyihyauia6n63w@wunner.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >> --- >> 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 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 Reviewed-by: Lukas Wunner 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 >