From patchwork Thu Jun 15 13:07:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 105648 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp794151qgd; Thu, 15 Jun 2017 06:07:46 -0700 (PDT) X-Received: by 10.99.1.88 with SMTP id 85mr5423513pgb.110.1497532066071; Thu, 15 Jun 2017 06:07:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497532066; cv=none; d=google.com; s=arc-20160816; b=NmA9Rg4v5airzZI6pVKNe+lgmm+KpJnLlpNknaTFo+EfznpyKqVjWVvnWRtQ47Gcnq 6k1r9xjNPtb9cvubUrxNoPo7xPTB/JaGq7ATKAwXxh+1WNZHteqnNSWu60G51VchsyQm nHkDRrrC3H7a5fvhbntlkVTtHtqGa85KazPaKsbXMCLiki5yOvYoCm3g+tSybqdlJrdW jEdKCG0yNEdwE2XXWT0WdzE38TMvAQwoTmlsnYFw+h4SppEntpaWi2sWG6J11BWdumct CWOIK4YXceOmKyNycJ3xPZdNtBQ/ATPmDX8pqr4bljbKZjLlS7pKf+CCEqni0Ax+bbvN algA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-filter:dmarc-filter:arc-authentication-results; bh=Ac9u8H5V06Ixu9vwgaDpSIZGZWJAugybamK5i714BWY=; b=t9tU7wThmd9mTMHRCtosZAEyn9OwzRgEUYsARHydxg3nB5QF93l2KXAc8+k99Wsrwd y9QOr79T5v5apz9g/tPwgnseNvEcYcXVVPuSMySet/t4oPlG8pcC68etc+66XMvNhY8u 5A/5rKvtMyuyiuyfkEXAfLcoB42TEFe0Mx2XGpuba4LQby9X8Xdys32fMYBVoZanvJXQ o3iR6p57FhiWEP4tY5o9GP1z4aBTJci6vGyjqLdcrDuyX3tI/F/SemMCJ2lN2TN8wRhU T9oBxcr11GgnmQ0Yy9HUbLyc8vS5qqzBiLK/AHNgu0+4K/mgYUqjcFoZH44wYNvCovaq tGvw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m4si78077pgn.260.2017.06.15.06.07.45; Thu, 15 Jun 2017 06:07:46 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752204AbdFONHi (ORCPT + 25 others); Thu, 15 Jun 2017 09:07:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60840 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750923AbdFONHg (ORCPT ); Thu, 15 Jun 2017 09:07:36 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 965EDC0587D8; Thu, 15 Jun 2017 13:07:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 965EDC0587D8 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=hdegoede@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 965EDC0587D8 Received: from shalem.localdomain.com (ovpn-117-239.ams2.redhat.com [10.36.117.239]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7950982AED; Thu, 15 Jun 2017 13:07:34 +0000 (UTC) From: Hans de Goede To: Lee Jones Cc: Hans de Goede , linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH v2 1/2] mfd: intel_soc_pmic: use 'depends on' instead of 'select' Date: Thu, 15 Jun 2017 15:07:31 +0200 Message-Id: <20170615130732.6769-1-hdegoede@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 15 Jun 2017 13:07:35 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk 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: 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(-) -- 2.13.0 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, From patchwork Thu Jun 15 13:07:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 105649 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp794448qgd; Thu, 15 Jun 2017 06:08:19 -0700 (PDT) X-Received: by 10.99.115.16 with SMTP id o16mr5193297pgc.31.1497532099116; Thu, 15 Jun 2017 06:08:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497532099; cv=none; d=google.com; s=arc-20160816; b=egeLAFFcPOocB5Mo6Oau4Y4K65y3NIu4Zsk5GiVzWr2fpm+i1TvASDEVUW7cmH03LF fTto4yiR/9A8ub+ynt5+eYa5bn4IziyZiTYl4MZrojafJGVXhrUt22lqr3IXP3q+ywk+ 90WPtUZdeOinfvWjsa4LV1akLFpDcKPjNjSA/jw/dgeA+6QsGuHFGGHj4luYDZz6jllt OPpCd6ULcQ+yDyUvY+/XC8tmAWr8rMyKnOQhblwa5QCXRKKjD7FgletihDUhTKrqHMbk UFij4ygB2QkmZ40liLPxCY40xAtSn6XAkLSPFr02S/unHE/ZNe+pXRBJFEmaotxADzMg 4xUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-filter:dmarc-filter :arc-authentication-results; bh=T+hipavwZGoKl99LS9i+ARX2SVziEdE03IJzlqP009A=; b=hqq6oHFZk0VkzJ6AWZruUdSL1lqUHsUDblK72hhyaaQsao5VlxpZLaxNGpKDcIBm9s VujkIRaQ8xM8AZSC0i7TYfv9KPdfASh4Yanzx57xnWSimXv2FuKiCuJ7NikJa9OltcxR KHWJGqleP7nh5sM8eSsnI3KxizeBQ61BoZOjReMT+FhKw2Fjc8YNNIecVfA3Szc4T4x3 Jf0xn+JEqgb7Lwwyw5H9J7Z/QcAdf9V+9yoFAZ+T1/p2tLdKbCxQzKQfVgZ1fi65lkQm d8WiyR/SPBWvWqfB9hvyyioSaspLnIEz4ESMn7fTwavXMFbTcIlvr9RgEARICrdUSyXA aiww== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k190si71525pge.371.2017.06.15.06.08.18; Thu, 15 Jun 2017 06:08:19 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752518AbdFONIB (ORCPT + 25 others); 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 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E47E580F7C; Thu, 15 Jun 2017 13:07:36 +0000 (UTC) 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 Received: from shalem.localdomain.com (ovpn-117-239.ams2.redhat.com [10.36.117.239]) by smtp.corp.redhat.com (Postfix) with ESMTP id DA3FA82ACC; Thu, 15 Jun 2017 13:07:35 +0000 (UTC) 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-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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 Precedence: bulk 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(-) -- 2.13.0 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