diff options
author | Fabio Estevam <festevam@gmail.com> | 2011-05-28 10:51:32 -0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-07-07 04:01:06 -0400 |
commit | 5dc3394c192cb8845a4594a4d029231392634d8a (patch) | |
tree | d97164fe1556a1fc29b7e084baca67a7ac87ebfe /arch/arm/mach-mx5 | |
parent | d17572741bacb851f0a689c7751ce909835ad96c (diff) |
ARM: mx5/mx53_loco: Add support for LED
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx5')
-rw-r--r-- | arch/arm/mach-mx5/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-mx5/board-mx53_loco.c | 17 |
2 files changed, 17 insertions, 1 deletions
diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig index f25e9d7bf0f5..79765122b6ff 100644 --- a/arch/arm/mach-mx5/Kconfig +++ b/arch/arm/mach-mx5/Kconfig | |||
@@ -203,6 +203,7 @@ config MACH_MX53_LOCO | |||
203 | select IMX_HAVE_PLATFORM_IMX_UART | 203 | select IMX_HAVE_PLATFORM_IMX_UART |
204 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 204 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
205 | select IMX_HAVE_PLATFORM_GPIO_KEYS | 205 | select IMX_HAVE_PLATFORM_GPIO_KEYS |
206 | select LEDS_GPIO_REGISTER | ||
206 | help | 207 | help |
207 | Include support for MX53 LOCO platform. This includes specific | 208 | Include support for MX53 LOCO platform. This includes specific |
208 | configurations for the board and its peripherals. | 209 | configurations for the board and its peripherals. |
diff --git a/arch/arm/mach-mx5/board-mx53_loco.c b/arch/arm/mach-mx5/board-mx53_loco.c index 359c3e248add..57576f709f20 100644 --- a/arch/arm/mach-mx5/board-mx53_loco.c +++ b/arch/arm/mach-mx5/board-mx53_loco.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #define MX53_LOCO_UI1 IMX_GPIO_NR(2, 14) | 38 | #define MX53_LOCO_UI1 IMX_GPIO_NR(2, 14) |
39 | #define MX53_LOCO_UI2 IMX_GPIO_NR(2, 15) | 39 | #define MX53_LOCO_UI2 IMX_GPIO_NR(2, 15) |
40 | #define LOCO_FEC_PHY_RST IMX_GPIO_NR(7, 6) | 40 | #define LOCO_FEC_PHY_RST IMX_GPIO_NR(7, 6) |
41 | #define LOCO_LED IMX_GPIO_NR(7, 7) | ||
41 | 42 | ||
42 | static iomux_v3_cfg_t mx53_loco_pads[] = { | 43 | static iomux_v3_cfg_t mx53_loco_pads[] = { |
43 | /* FEC */ | 44 | /* FEC */ |
@@ -163,7 +164,7 @@ static iomux_v3_cfg_t mx53_loco_pads[] = { | |||
163 | MX53_PAD_GPIO_7__SPDIF_PLOCK, | 164 | MX53_PAD_GPIO_7__SPDIF_PLOCK, |
164 | MX53_PAD_GPIO_17__SPDIF_OUT1, | 165 | MX53_PAD_GPIO_17__SPDIF_OUT1, |
165 | /* GPIO */ | 166 | /* GPIO */ |
166 | MX53_PAD_PATA_DA_1__GPIO7_7, | 167 | MX53_PAD_PATA_DA_1__GPIO7_7, /* LED */ |
167 | MX53_PAD_PATA_DA_2__GPIO7_8, | 168 | MX53_PAD_PATA_DA_2__GPIO7_8, |
168 | MX53_PAD_PATA_DATA5__GPIO2_5, | 169 | MX53_PAD_PATA_DATA5__GPIO2_5, |
169 | MX53_PAD_PATA_DATA6__GPIO2_6, | 170 | MX53_PAD_PATA_DATA6__GPIO2_6, |
@@ -225,6 +226,19 @@ static const struct imxi2c_platform_data mx53_loco_i2c_data __initconst = { | |||
225 | .bitrate = 100000, | 226 | .bitrate = 100000, |
226 | }; | 227 | }; |
227 | 228 | ||
229 | static const struct gpio_led mx53loco_leds[] __initconst = { | ||
230 | { | ||
231 | .name = "green", | ||
232 | .default_trigger = "heartbeat", | ||
233 | .gpio = LOCO_LED, | ||
234 | }, | ||
235 | }; | ||
236 | |||
237 | static const struct gpio_led_platform_data mx53loco_leds_data __initconst = { | ||
238 | .leds = mx53loco_leds, | ||
239 | .num_leds = ARRAY_SIZE(mx53loco_leds), | ||
240 | }; | ||
241 | |||
228 | static void __init mx53_loco_board_init(void) | 242 | static void __init mx53_loco_board_init(void) |
229 | { | 243 | { |
230 | imx53_soc_init(); | 244 | imx53_soc_init(); |
@@ -240,6 +254,7 @@ static void __init mx53_loco_board_init(void) | |||
240 | imx53_add_sdhci_esdhc_imx(0, NULL); | 254 | imx53_add_sdhci_esdhc_imx(0, NULL); |
241 | imx53_add_sdhci_esdhc_imx(2, NULL); | 255 | imx53_add_sdhci_esdhc_imx(2, NULL); |
242 | imx_add_gpio_keys(&loco_button_data); | 256 | imx_add_gpio_keys(&loco_button_data); |
257 | gpio_led_register_device(-1, &mx53loco_leds_data); | ||
243 | } | 258 | } |
244 | 259 | ||
245 | static void __init mx53_loco_timer_init(void) | 260 | static void __init mx53_loco_timer_init(void) |