From patchwork Sat Jul 9 23:06:36 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_R=C3=A9tornaz?= X-Patchwork-Id: 104034 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C51181007D1 for ; Sun, 10 Jul 2011 08:38:30 +1000 (EST) Received: from canuck.infradead.org ([134.117.69.58]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QfgAA-000379-Qv; Sat, 09 Jul 2011 22:38:16 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QfgAA-0007Mi-DM; Sat, 09 Jul 2011 22:38:14 +0000 Received: from smtp0.epfl.ch ([128.178.224.219]) by canuck.infradead.org with smtp (Exim 4.76 #1 (Red Hat Linux)) id 1Qfg9Y-0007Fr-Vq for linux-arm-kernel@lists.infradead.org; Sat, 09 Jul 2011 22:37:38 +0000 Received: (qmail 22290 invoked by uid 107); 9 Jul 2011 22:37:31 -0000 X-Virus-Scanned: ClamAV Received: from lsro1pc40.epfl.ch (HELO discarded) (128.178.145.86) (authenticated) by smtp0.epfl.ch (AngelmatoPhylax SMTP proxy) with ESMTPA; Sun, 10 Jul 2011 00:37:31 +0200 From: =?utf-8?q?Philippe=20R=C3=A9tornaz?= To: s.hauer@pengutronix.de Subject: [PATCH 3/3] mc13xxx: implicitly enable leds and buttons Date: Sun, 10 Jul 2011 01:06:36 +0200 Message-Id: <1310252796-10596-4-git-send-email-philippe.retornaz@epfl.ch> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1310252796-10596-3-git-send-email-philippe.retornaz@epfl.ch> References: <1310252796-10596-1-git-send-email-philippe.retornaz@epfl.ch> <1310252796-10596-2-git-send-email-philippe.retornaz@epfl.ch> <1310252796-10596-3-git-send-email-philippe.retornaz@epfl.ch> MIME-Version: 1.0 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110709_183737_395306_98919F79 X-CRM114-Status: GOOD ( 12.97 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [128.178.224.219 listed in list.dnswl.org] -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain Cc: linux-input@vger.kernel.org, broonie@opensource.wolfsonmicro.com, sameo@linux.intel.com, dmitry.torokhov@gmail.com, u.kleine-koenig@pengutronix.de, philippe.retornaz@epfl.ch, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org The leds and buttons subdevices cannot be used without additional platform data. Use the presence of the platform data to enable the device instead of an additional flag. Signed-off-by: Philippe Rétornaz --- arch/arm/mach-imx/mach-mx31moboard.c | 2 +- drivers/mfd/mc13xxx-core.c | 4 ++-- include/linux/mfd/mc13783.h | 1 - include/linux/mfd/mc13xxx.h | 2 -- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c index 447143b..c4cd6b8 100644 --- a/arch/arm/mach-imx/mach-mx31moboard.c +++ b/arch/arm/mach-imx/mach-mx31moboard.c @@ -279,7 +279,7 @@ static struct mc13xxx_platform_data moboard_pmic = { .leds = &moboard_leds, .buttons = &moboard_buttons, .flags = MC13XXX_USE_REGULATOR | MC13XXX_USE_RTC | - MC13XXX_USE_ADC | MC13XXX_USE_LED | MC13XXX_USE_BUTTON, + MC13XXX_USE_ADC, }; static struct spi_board_info moboard_spi_board_info[] __initdata = { diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c index 44edf78..130781f 100644 --- a/drivers/mfd/mc13xxx-core.c +++ b/drivers/mfd/mc13xxx-core.c @@ -774,11 +774,11 @@ err_revision: if (pdata->flags & MC13XXX_USE_TOUCHSCREEN) mc13xxx_add_subdevice(mc13xxx, "%s-ts"); - if (pdata->flags & MC13XXX_USE_LED) + if (pdata->leds) mc13xxx_add_subdevice_pdata(mc13xxx, "%s-led", pdata->leds, sizeof(*pdata->leds)); - if (pdata->flags & MC13XXX_USE_BUTTON) + if (pdata->buttons) mc13xxx_add_subdevice_pdata(mc13xxx, "%s-pwrbutton", pdata->buttons, sizeof(*pdata->buttons)); diff --git a/include/linux/mfd/mc13783.h b/include/linux/mfd/mc13783.h index bd4fbac..61dca4c 100644 --- a/include/linux/mfd/mc13783.h +++ b/include/linux/mfd/mc13783.h @@ -114,7 +114,6 @@ static inline int mc13783_irq_ack(struct mc13783 *mc13783, int irq) #define MC13783_USE_ADC MC13XXX_USE_ADC #define MC13783_USE_RTC MC13XXX_USE_RTC #define MC13783_USE_REGULATOR MC13XXX_USE_REGULATOR -#define MC13783_USE_LED MC13XXX_USE_LED #define MC13783_ADC_MODE_TS 1 #define MC13783_ADC_MODE_SINGLE_CHAN 2 diff --git a/include/linux/mfd/mc13xxx.h b/include/linux/mfd/mc13xxx.h index 22d8930..6c4b854 100644 --- a/include/linux/mfd/mc13xxx.h +++ b/include/linux/mfd/mc13xxx.h @@ -159,8 +159,6 @@ struct mc13xxx_platform_data { #define MC13XXX_USE_ADC (1 << 2) #define MC13XXX_USE_RTC (1 << 3) #define MC13XXX_USE_REGULATOR (1 << 4) -#define MC13XXX_USE_LED (1 << 5) -#define MC13XXX_USE_BUTTON (1 << 6) unsigned int flags; struct mc13xxx_regulator_platform_data regulators;