From patchwork Fri Mar 17 15:37:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 9630983 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D5CC560245 for ; Fri, 17 Mar 2017 15:39:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC4FF286B3 for ; Fri, 17 Mar 2017 15:39:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A1370286B5; Fri, 17 Mar 2017 15:39:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 41856286B3 for ; Fri, 17 Mar 2017 15:39:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751156AbdCQPiW (ORCPT ); Fri, 17 Mar 2017 11:38:22 -0400 Received: from mga14.intel.com ([192.55.52.115]:7971 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751023AbdCQPiU (ORCPT ); Fri, 17 Mar 2017 11:38:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1489765100; x=1521301100; h=from:to:cc:subject:date:message-id; bh=yhCvtqefdIqFVqNyevPbF8a+5REv2up77sb8/aUNtlM=; b=OPcq6EgoLBfaS+icNeDJdMdEHD+Tvs6WuEC5SHt7dl/boIc02FqrqPDT BNnOsG2ziF8tR1zflusDeZHyzXeLzQ==; Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Mar 2017 08:37:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,177,1486454400"; d="scan'208";a="1109580600" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga001.jf.intel.com with ESMTP; 17 Mar 2017 08:37:17 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 5ACEB14F; Fri, 17 Mar 2017 17:37:16 +0200 (EET) From: Andy Shevchenko To: Lee Jones , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, platform-driver-x86@vger.kernel.org Cc: Andy Shevchenko , "Rafael J. Wysocki" , Linus Walleij , Zhang Rui , Eduardo Valentin Subject: [PATCH v3 1/3] mfd: intel_soc_pmic: Fix a mess with compilation units Date: Fri, 17 Mar 2017 17:37:13 +0200 Message-Id: <20170317153715.48555-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.11.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Crystal Cove and Whiskey Cove are two different PMICs which are installed on Intel Atom SoC based platforms. Moreover there are two independent drivers that by some reason were supposed (*) to get into one kernel module. Fix the mess by clarifying Kconfig option for Crystal Cove and split Whiskey Cove out of it. (*) It looks like the configuration was never tested with INTEL_SOC_PMIC=n. The line in Makefile is actually wrong. Cc: "Rafael J. Wysocki" (supporter:ACPI) Cc: Linus Walleij (maintainer:GPIO SUBSYSTEM) Cc: Zhang Rui (supporter:THERMAL) Cc: Eduardo Valentin (supporter:THERMAL) Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Acked-by: Zhang Rui --- - make option visible - fix dependencies drivers/acpi/Kconfig | 2 +- drivers/gpio/Kconfig | 2 +- drivers/mfd/Kconfig | 14 ++++++++++++-- drivers/mfd/Makefile | 2 +- drivers/platform/x86/Kconfig | 2 +- drivers/thermal/Kconfig | 2 +- 6 files changed, 17 insertions(+), 7 deletions(-) diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 83e5f7e1a20d..03708e08fcb4 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -512,7 +512,7 @@ config XPOWER_PMIC_OPREGION config BXT_WC_PMIC_OPREGION bool "ACPI operation region support for BXT WhiskeyCove PMIC" - depends on INTEL_SOC_PMIC + depends on INTEL_SOC_PMIC_BXTWC help This config adds ACPI operation region support for BXT WhiskeyCove PMIC. diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 05043071fc98..9b1bcb4d0df7 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -1054,7 +1054,7 @@ config GPIO_UCB1400 config GPIO_WHISKEY_COVE tristate "GPIO support for Whiskey Cove PMIC" - depends on (X86 || COMPILE_TEST) && INTEL_SOC_PMIC + depends on (X86 || COMPILE_TEST) && INTEL_SOC_PMIC_BXTWC select GPIOLIB_IRQCHIP help Support for GPIO pins on Whiskey Cove PMIC. diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 55ecdfb74d31..e43afb8956ea 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -425,18 +425,28 @@ config LPC_SCH System Management Bus and General Purpose I/O. config INTEL_SOC_PMIC - bool "Support for Intel Atom SoC PMIC" + bool "Support for Crystal Cove PMIC" depends on GPIOLIB depends on I2C=y select MFD_CORE select REGMAP_I2C select REGMAP_IRQ help - Select this option to enable support for the PMIC device + Select this option to enable support for Crystal Cove PMIC on some Intel SoC systems. The PMIC provides ADC, GPIO, thermal, charger and related power management functions on these systems. +config INTEL_SOC_PMIC_BXTWC + tristate "Support for Intel Broxton Whiskey Cove PMIC" + select MFD_CORE + select REGMAP_IRQ + help + Select this option to enable support for Whiskey Cove PMIC + on Intel Broxton systems. The PMIC provides ADC, GPIO, + thermal, charger and related power management functions + on these systems. + config MFD_INTEL_LPSS tristate select COMMON_CLK diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile index 31ce07611a6f..201aeaf5112a 100644 --- a/drivers/mfd/Makefile +++ b/drivers/mfd/Makefile @@ -207,8 +207,8 @@ obj-$(CONFIG_MFD_RT5033) += rt5033.o obj-$(CONFIG_MFD_SKY81452) += sky81452.o intel-soc-pmic-objs := intel_soc_pmic_core.o intel_soc_pmic_crc.o -intel-soc-pmic-$(CONFIG_INTEL_PMC_IPC) += intel_soc_pmic_bxtwc.o obj-$(CONFIG_INTEL_SOC_PMIC) += intel-soc-pmic.o +obj-$(CONFIG_INTEL_SOC_PMIC_BXTWC) += intel_soc_pmic_bxtwc.o obj-$(CONFIG_MFD_MT6397) += mt6397-core.o obj-$(CONFIG_MFD_ALTERA_A10SR) += altera-a10sr.o diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig index e1bffc9bb194..883fbe7a2466 100644 --- a/drivers/platform/x86/Kconfig +++ b/drivers/platform/x86/Kconfig @@ -1019,7 +1019,7 @@ config INTEL_PMC_IPC config INTEL_BXTWC_PMIC_TMU tristate "Intel BXT Whiskey Cove TMU Driver" depends on REGMAP - depends on INTEL_SOC_PMIC && INTEL_PMC_IPC + depends on INTEL_SOC_PMIC_BXTWC && INTEL_PMC_IPC ---help--- Select this driver to use Intel BXT Whiskey Cove PMIC TMU feature. This driver enables the alarm wakeup functionality in the TMU unit diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index 776b34396144..751e50a3d946 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -365,7 +365,7 @@ endmenu config INTEL_BXT_PMIC_THERMAL tristate "Intel Broxton PMIC thermal driver" - depends on X86 && INTEL_SOC_PMIC && REGMAP + depends on X86 && INTEL_SOC_PMIC_BXTWC && REGMAP help Select this driver for Intel Broxton PMIC with ADC channels monitoring system temperature measurements and alerts.