All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Rétornaz" <philippe.retornaz@epfl.ch>
To: s.hauer@pengutronix.de
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
Subject: [PATCH 2/2] mx31moboard: Add MC13783 power button support
Date: Fri,  8 Jul 2011 16:23:57 +0200	[thread overview]
Message-ID: <1310135037-24289-3-git-send-email-philippe.retornaz@epfl.ch> (raw)
In-Reply-To: <1310135037-24289-2-git-send-email-philippe.retornaz@epfl.ch>

Add the power-on button on mx31moboard using MC13783 PMIC.

Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch>
---
 arch/arm/mach-imx/mach-mx31moboard.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c
index 12ee755..447143b 100644
--- a/arch/arm/mach-imx/mach-mx31moboard.c
+++ b/arch/arm/mach-imx/mach-mx31moboard.c
@@ -28,6 +28,7 @@
 #include <linux/spi/spi.h>
 #include <linux/types.h>
 #include <linux/memblock.h>
+#include <linux/input.h>
 
 #include <linux/usb/otg.h>
 #include <linux/usb/ulpi.h>
@@ -264,14 +265,21 @@ 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,
+		MC13XXX_USE_ADC | MC13XXX_USE_LED | MC13XXX_USE_BUTTON,
 };
 
 static struct spi_board_info moboard_spi_board_info[] __initdata = {
-- 
1.6.3.3


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: philippe.retornaz@epfl.ch (Philippe Rétornaz)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] mx31moboard: Add MC13783 power button support
Date: Fri,  8 Jul 2011 16:23:57 +0200	[thread overview]
Message-ID: <1310135037-24289-3-git-send-email-philippe.retornaz@epfl.ch> (raw)
In-Reply-To: <1310135037-24289-2-git-send-email-philippe.retornaz@epfl.ch>

Add the power-on button on mx31moboard using MC13783 PMIC.

Signed-off-by: Philippe R?tornaz <philippe.retornaz@epfl.ch>
---
 arch/arm/mach-imx/mach-mx31moboard.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c
index 12ee755..447143b 100644
--- a/arch/arm/mach-imx/mach-mx31moboard.c
+++ b/arch/arm/mach-imx/mach-mx31moboard.c
@@ -28,6 +28,7 @@
 #include <linux/spi/spi.h>
 #include <linux/types.h>
 #include <linux/memblock.h>
+#include <linux/input.h>
 
 #include <linux/usb/otg.h>
 #include <linux/usb/ulpi.h>
@@ -264,14 +265,21 @@ 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,
+		MC13XXX_USE_ADC | MC13XXX_USE_LED | MC13XXX_USE_BUTTON,
 };
 
 static struct spi_board_info moboard_spi_board_info[] __initdata = {
-- 
1.6.3.3

  reply	other threads:[~2011-07-08 14:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-08 14:23 [PATCH v2 0/2] mc13783: add pwr button support Philippe Rétornaz
2011-07-08 14:23 ` Philippe Rétornaz
2011-07-08 14:23 ` [PATCH 1/2] mc13783: add power " Philippe Rétornaz
2011-07-08 14:23   ` Philippe Rétornaz
2011-07-08 14:23   ` Philippe Rétornaz [this message]
2011-07-08 14:23     ` [PATCH 2/2] mx31moboard: Add MC13783 " Philippe Rétornaz
2011-07-08 14:30   ` [PATCH 1/2] mc13783: add " Uwe Kleine-König
2011-07-08 14:30     ` Uwe Kleine-König
2011-07-08 14:45     ` Philippe Rétornaz
2011-07-08 14:45       ` Philippe Rétornaz
2011-07-08 15:25       ` Uwe Kleine-König
2011-07-08 15:25         ` Uwe Kleine-König
  -- strict thread matches above, loose matches on Subject: below --
2010-05-31 19:28 [PATCH 0/2] mc13783: add pwr " Philippe Rétornaz
2010-05-31 19:28 ` [PATCH 1/2] mc13783: add power " Philippe Rétornaz
2010-05-31 19:29   ` [PATCH 2/2] mx31moboard: Add MC13783 " Philippe Rétornaz
2010-05-31 19:29     ` Philippe Rétornaz
2010-06-03  8:31     ` Sascha Hauer
2010-06-03  8:31       ` Sascha Hauer
2010-06-03  9:23       ` Philippe Rétornaz
2010-06-03  9:23         ` Philippe Rétornaz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1310135037-24289-3-git-send-email-philippe.retornaz@epfl.ch \
    --to=philippe.retornaz@epfl.ch \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=sameo@linux.intel.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.