From mboxrd@z Thu Jan 1 00:00:00 1970 From: Darren Hart Subject: Re: [PATCH 1/4 v3] GPIO: gpio-dwapb: Enable platform driver binding to MFD driver Date: Tue, 09 Sep 2014 10:05:33 -0700 Message-ID: References: <1410286081-16653-1-git-send-email-alvin.chen@intel.com> <1410286081-16653-2-git-send-email-alvin.chen@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: Received: from mga11.intel.com ([192.55.52.93]:58226 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752840AbaIIRGc (ORCPT ); Tue, 9 Sep 2014 13:06:32 -0400 In-Reply-To: <1410286081-16653-2-git-send-email-alvin.chen@intel.com> Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org To: Weike Chen , Linus Walleij , Alexandre Courbot , Grant Likely , Rob Herring , atull Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Boon Leong Ong , Hock Leong Kweh , Sebastian Andrzej Siewior , Mika Westerberg , Andriy Shevchenko , Arnd Bergmann On 9/9/14, 11:07, "Weike Chen" wrote: >The Synopsys DesignWare APB GPIO driver only supports open firmware >devices. >But, like Intel Quark X1000 SOC, which has a single PCI function exporting >a GPIO and an I2C controller, it is a Multifunction device. This patch is >to enable the current Synopsys DesignWare APB GPIO driver to support the >Multifunction device which exports the designware GPIO controller. > >Reviewed-by: Hock Leong Kweh >Signed-off-by: Weike Chen >--- > drivers/gpio/Kconfig | 1 - > drivers/gpio/gpio-dwapb.c | 226 >++++++++++++++++++++++-------- > include/linux/platform_data/gpio-dwapb.h | 32 +++++ > 3 files changed, 201 insertions(+), 58 deletions(-) > create mode 100644 include/linux/platform_data/gpio-dwapb.h > >diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig >index 9de1515..8250a44 100644 >--- a/drivers/gpio/Kconfig >+++ b/drivers/gpio/Kconfig >@@ -136,7 +136,6 @@ config GPIO_DWAPB > tristate "Synopsys DesignWare APB GPIO driver" > select GPIO_GENERIC > select GENERIC_IRQ_CHIP >- depends on OF_GPIO You cover this specific dependencies with inline ifdefs, but you lose the CONFIG_OF depends by dropping it, and there are no such checks in the probe routine. Assumptions of OF are not limited to probe in this driver. While I would like to see this assumption properly abstracted, the most expedient/immediate fix is probably to add a depends on OF above. -- Darren Intel Open Source Technology Center From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757431AbaIIRGe (ORCPT ); Tue, 9 Sep 2014 13:06:34 -0400 Received: from mga11.intel.com ([192.55.52.93]:58226 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752840AbaIIRGc (ORCPT ); Tue, 9 Sep 2014 13:06:32 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="383649124" User-Agent: Microsoft-MacOutlook/14.4.3.140616 Date: Tue, 09 Sep 2014 10:05:33 -0700 Subject: Re: [PATCH 1/4 v3] GPIO: gpio-dwapb: Enable platform driver binding to MFD driver From: Darren Hart To: Weike Chen , Linus Walleij , Alexandre Courbot , Grant Likely , Rob Herring , atull CC: , , , Boon Leong Ong , Hock Leong Kweh , Sebastian Andrzej Siewior , Mika Westerberg , Andriy Shevchenko , Arnd Bergmann Message-ID: Thread-Topic: [PATCH 1/4 v3] GPIO: gpio-dwapb: Enable platform driver binding to MFD driver References: <1410286081-16653-1-git-send-email-alvin.chen@intel.com> <1410286081-16653-2-git-send-email-alvin.chen@intel.com> In-Reply-To: <1410286081-16653-2-git-send-email-alvin.chen@intel.com> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/9/14, 11:07, "Weike Chen" wrote: >The Synopsys DesignWare APB GPIO driver only supports open firmware >devices. >But, like Intel Quark X1000 SOC, which has a single PCI function exporting >a GPIO and an I2C controller, it is a Multifunction device. This patch is >to enable the current Synopsys DesignWare APB GPIO driver to support the >Multifunction device which exports the designware GPIO controller. > >Reviewed-by: Hock Leong Kweh >Signed-off-by: Weike Chen >--- > drivers/gpio/Kconfig | 1 - > drivers/gpio/gpio-dwapb.c | 226 >++++++++++++++++++++++-------- > include/linux/platform_data/gpio-dwapb.h | 32 +++++ > 3 files changed, 201 insertions(+), 58 deletions(-) > create mode 100644 include/linux/platform_data/gpio-dwapb.h > >diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig >index 9de1515..8250a44 100644 >--- a/drivers/gpio/Kconfig >+++ b/drivers/gpio/Kconfig >@@ -136,7 +136,6 @@ config GPIO_DWAPB > tristate "Synopsys DesignWare APB GPIO driver" > select GPIO_GENERIC > select GENERIC_IRQ_CHIP >- depends on OF_GPIO You cover this specific dependencies with inline ifdefs, but you lose the CONFIG_OF depends by dropping it, and there are no such checks in the probe routine. Assumptions of OF are not limited to probe in this driver. While I would like to see this assumption properly abstracted, the most expedient/immediate fix is probably to add a depends on OF above. -- Darren Intel Open Source Technology Center