diff mbox

[2/2] mx31moboard: Add MC13783 power button support

Message ID 1275334140-29339-3-git-send-email-philippe.retornaz@epfl.ch (mailing list archive)
State New, archived
Headers show

Commit Message

Philippe Rétornaz May 31, 2010, 7:29 p.m. UTC
None
diff mbox

Patch

diff --git a/arch/arm/mach-mx3/mach-mx31moboard.c b/arch/arm/mach-mx3/mach-mx31moboard.c
index 62b5e40..7a8f078 100644
--- a/arch/arm/mach-mx3/mach-mx31moboard.c
+++ b/arch/arm/mach-mx3/mach-mx31moboard.c
@@ -31,6 +31,7 @@ 
 #include <linux/mfd/mc13783.h>
 #include <linux/spi/spi.h>
 #include <linux/types.h>
+#include <linux/input.h>
 
 #include <linux/usb/otg.h>
 #include <linux/usb/ulpi.h>
@@ -262,12 +263,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 | MC13783_BUTTON_EMUL_CAD,
+	.b1on_key = KEY_POWER,
+};
+
 static struct mc13783_platform_data moboard_pmic = {
 	.regulators = moboard_regulators,
 	.num_regulators = ARRAY_SIZE(moboard_regulators),
 	.leds = &moboard_leds,
+	.buttons = &moboard_buttons,
 	.flags = MC13783_USE_REGULATOR | MC13783_USE_RTC |
-		MC13783_USE_ADC | MC13783_USE_LED,
+		MC13783_USE_ADC | MC13783_USE_LED | MC13783_USE_BUTTON,
 };
 
 static struct spi_board_info moboard_spi_board_info[] __initdata = {