From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752516AbdFONIB (ORCPT ); Thu, 15 Jun 2017 09:08:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40584 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750777AbdFONHh (ORCPT ); Thu, 15 Jun 2017 09:07:37 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E47E580F7C Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=hdegoede@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E47E580F7C From: Hans de Goede To: Lee Jones Cc: Hans de Goede , linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH v2 2/2] mfd: intel_soc_pmic_chtwc: use 'depends on' instead of 'select' Date: Thu, 15 Jun 2017 15:07:32 +0200 Message-Id: <20170615130732.6769-2-hdegoede@redhat.com> In-Reply-To: <20170615130732.6769-1-hdegoede@redhat.com> References: <20170615130732.6769-1-hdegoede@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 15 Jun 2017 13:07:37 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann I ran into a build error on ARM with a platform that has a non-standard clk implementation: drivers/clk/clk.o: In function `clk_disable': clk.c:(.text.clk_disable+0x0): multiple definition of `clk_disable' arch/arm/mach-omap1/clock.o:clock.c:(.text.clk_disable+0x0): first defined here drivers/clk/clk.o: In function `clk_enable': clk.c:(.text.clk_enable+0x0): multiple definition of `clk_enable' arch/arm/mach-omap1/clock.o:clock.c:(.text.clk_enable+0x0): first defined here The problem is a device driver that uses 'select COMMON_CLK', which is generally a bad idea: selecting a subsystem should only be done from a platform, otherwise we run into circular dependencies. The same driver also selects 'GPIOLIB' and 'I2C', which has a similar effect. This turns all three into 'depends on', as it should be. Finally, we can limit the build to x86, unless we are compile testing. Fixes: 2f91ded5f8f4 ("mfd: Add Cherry Trail Whiskey Cove PMIC driver") Signed-off-by: Arnd Bergmann Signed-off-by: Hans de Goede --- Changes in v2: -Split into 2 seperate patches for config INTEL_SOC_PMIC and config INTEL_SOC_PMIC_CHTWC --- drivers/mfd/Kconfig | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 2499f8b5135a..1428814c33f9 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -481,13 +481,12 @@ config INTEL_SOC_PMIC_BXTWC on these systems. config INTEL_SOC_PMIC_CHTWC - bool "Support for Intel Cherry Trail Whiskey Cove PMIC" - depends on ACPI && HAS_IOMEM + tristate "Support for Intel Cherry Trail Whiskey Cove PMIC" + depends on ACPI && HAS_IOMEM && I2C=y && COMMON_CLK + depends on X86 || COMPILE_TEST select MFD_CORE - select I2C select REGMAP_I2C select REGMAP_IRQ - select COMMON_CLK select I2C_DESIGNWARE_PLATFORM help Select this option to enable support for the Intel Cherry Trail -- 2.13.0