From patchwork Thu Jul 21 15:10:02 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=83=C2=A9tornaz?= X-Patchwork-Id: 995062 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p6LEbeKM002287 for ; Thu, 21 Jul 2011 14:37:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751520Ab1GUOhl (ORCPT ); Thu, 21 Jul 2011 10:37:41 -0400 Received: from smtp0.epfl.ch ([128.178.224.219]:55254 "HELO smtp0.epfl.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751455Ab1GUOhk (ORCPT ); Thu, 21 Jul 2011 10:37:40 -0400 Received: (qmail 26018 invoked by uid 107); 21 Jul 2011 14:37:38 -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; Thu, 21 Jul 2011 16:37:38 +0200 From: =?utf-8?q?Philippe=20R=C3=A9tornaz?= To: s.hauer@pengutronix.de Cc: linux-arm-kernel@lists.infradead.org, amit.kucheria@canonical.com, dmitry.torokhov@gmail.com, sameo@linux.intel.com, linux-input@vger.kernel.org, broonie@opensource.wolfsonmicro.com, u.kleine-koenig@pengutronix.de, philippe.retornaz@epfl.ch Subject: [PATCH 2/6] mx31moboard: Add MC13783 power button support Date: Thu, 21 Jul 2011 17:10:02 +0200 Message-Id: <1311261006-28048-3-git-send-email-philippe.retornaz@epfl.ch> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1311261006-28048-2-git-send-email-philippe.retornaz@epfl.ch> References: <1311261006-28048-1-git-send-email-philippe.retornaz@epfl.ch> <1311261006-28048-2-git-send-email-philippe.retornaz@epfl.ch> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 21 Jul 2011 14:37:42 +0000 (UTC) Add the power-on button on mx31moboard using MC13783 PMIC. Signed-off-by: Philippe Rétornaz --- arch/arm/mach-imx/mach-mx31moboard.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c index 12ee755..68055de 100644 --- a/arch/arm/mach-imx/mach-mx31moboard.c +++ b/arch/arm/mach-imx/mach-mx31moboard.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -264,12 +265,19 @@ static struct mc13783_leds_platform_data moboard_leds = { .tc2_period = MC13783_LED_PERIOD_10MS, }; +static struct mc13783_buttons_platform_data moboard_buttons = { + .b1on_flags = MC13783_BUTTON_DBNC_750MS | MC13783_BUTTON_ENABLE | + MC13783_BUTTON_POL_INVERT, + .b1on_key = KEY_POWER, +}; + static struct mc13xxx_platform_data moboard_pmic = { .regulators = { .regulators = moboard_regulators, .num_regulators = ARRAY_SIZE(moboard_regulators), }, .leds = &moboard_leds, + .buttons = &moboard_buttons, .flags = MC13XXX_USE_REGULATOR | MC13XXX_USE_RTC | MC13XXX_USE_ADC | MC13XXX_USE_LED, };