From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752358AbdFONsB (ORCPT ); Thu, 15 Jun 2017 09:48:01 -0400 Received: from mail-wr0-f169.google.com ([209.85.128.169]:35592 "EHLO mail-wr0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751623AbdFONsA (ORCPT ); Thu, 15 Jun 2017 09:48:00 -0400 Date: Thu, 15 Jun 2017 14:47:54 +0100 From: Lee Jones To: Hans de Goede Cc: linux-kernel@vger.kernel.org, Arnd Bergmann Subject: Re: [PATCH v2 1/2] mfd: intel_soc_pmic: use 'depends on' instead of 'select' Message-ID: <20170615134754.bphyw7xydtacrdgw@dell> References: <20170615130732.6769-1-hdegoede@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170615130732.6769-1-hdegoede@redhat.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 15 Jun 2017, Hans de Goede wrote: > 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: 5f125f1f5705 ("mfd: intel_soc_pmic: Select designware i2c-bus 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 | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) Applied, thanks. > diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig > index 95e868360e9a..2499f8b5135a 100644 > --- a/drivers/mfd/Kconfig > +++ b/drivers/mfd/Kconfig > @@ -453,14 +453,12 @@ config LPC_SCH > > config INTEL_SOC_PMIC > bool "Support for Crystal Cove PMIC" > - depends on HAS_IOMEM > - select GPIOLIB > - select I2C > + depends on HAS_IOMEM && I2C=y && GPIOLIB && COMMON_CLK > + depends on X86 || COMPILE_TEST > select MFD_CORE > select REGMAP_I2C > select REGMAP_IRQ > - select COMMON_CLK > - select I2C_DESIGNWARE_PLATFORM > + select I2C_DESIGNWARE_PLATFORM if ACPI > help > Select this option to enable support for Crystal Cove PMIC > on some Intel SoC systems. The PMIC provides ADC, GPIO, -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog