diff options
Diffstat (limited to 'arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c')
-rw-r--r-- | arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c b/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c index 97292d20f1f..72ce75505b1 100644 --- a/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c +++ b/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c | |||
@@ -28,16 +28,14 @@ | |||
28 | #include <asm/mach/arch.h> | 28 | #include <asm/mach/arch.h> |
29 | 29 | ||
30 | #include "devices-imx51.h" | 30 | #include "devices-imx51.h" |
31 | #include "devices.h" | ||
32 | 31 | ||
33 | #define MBIMX51_TSC2007_GPIO IMX_GPIO_NR(3, 30) | 32 | #define MBIMX51_TSC2007_GPIO IMX_GPIO_NR(3, 30) |
34 | #define MBIMX51_TSC2007_IRQ (MXC_INTERNAL_IRQS + MBIMX51_TSC2007_GPIO) | ||
35 | #define MBIMX51_LED0 IMX_GPIO_NR(3, 5) | 33 | #define MBIMX51_LED0 IMX_GPIO_NR(3, 5) |
36 | #define MBIMX51_LED1 IMX_GPIO_NR(3, 6) | 34 | #define MBIMX51_LED1 IMX_GPIO_NR(3, 6) |
37 | #define MBIMX51_LED2 IMX_GPIO_NR(3, 7) | 35 | #define MBIMX51_LED2 IMX_GPIO_NR(3, 7) |
38 | #define MBIMX51_LED3 IMX_GPIO_NR(3, 8) | 36 | #define MBIMX51_LED3 IMX_GPIO_NR(3, 8) |
39 | 37 | ||
40 | static struct gpio_led mbimx51_leds[] = { | 38 | static const struct gpio_led mbimx51_leds[] __initconst = { |
41 | { | 39 | { |
42 | .name = "led0", | 40 | .name = "led0", |
43 | .default_trigger = "heartbeat", | 41 | .default_trigger = "heartbeat", |
@@ -64,23 +62,11 @@ static struct gpio_led mbimx51_leds[] = { | |||
64 | }, | 62 | }, |
65 | }; | 63 | }; |
66 | 64 | ||
67 | static struct gpio_led_platform_data mbimx51_leds_info = { | 65 | static const struct gpio_led_platform_data mbimx51_leds_info __initconst = { |
68 | .leds = mbimx51_leds, | 66 | .leds = mbimx51_leds, |
69 | .num_leds = ARRAY_SIZE(mbimx51_leds), | 67 | .num_leds = ARRAY_SIZE(mbimx51_leds), |
70 | }; | 68 | }; |
71 | 69 | ||
72 | static struct platform_device mbimx51_leds_gpio = { | ||
73 | .name = "leds-gpio", | ||
74 | .id = -1, | ||
75 | .dev = { | ||
76 | .platform_data = &mbimx51_leds_info, | ||
77 | }, | ||
78 | }; | ||
79 | |||
80 | static struct platform_device *devices[] __initdata = { | ||
81 | &mbimx51_leds_gpio, | ||
82 | }; | ||
83 | |||
84 | static iomux_v3_cfg_t mbimx51_pads[] = { | 70 | static iomux_v3_cfg_t mbimx51_pads[] = { |
85 | /* UART2 */ | 71 | /* UART2 */ |
86 | MX51_PAD_UART2_RXD__UART2_RXD, | 72 | MX51_PAD_UART2_RXD__UART2_RXD, |
@@ -173,7 +159,7 @@ struct tsc2007_platform_data tsc2007_data = { | |||
173 | static struct i2c_board_info mbimx51_i2c_devices[] = { | 159 | static struct i2c_board_info mbimx51_i2c_devices[] = { |
174 | { | 160 | { |
175 | I2C_BOARD_INFO("tsc2007", 0x49), | 161 | I2C_BOARD_INFO("tsc2007", 0x49), |
176 | .irq = MBIMX51_TSC2007_IRQ, | 162 | .irq = gpio_to_irq(MBIMX51_TSC2007_GPIO), |
177 | .platform_data = &tsc2007_data, | 163 | .platform_data = &tsc2007_data, |
178 | }, { | 164 | }, { |
179 | I2C_BOARD_INFO("tlv320aic23", 0x1a), | 165 | I2C_BOARD_INFO("tlv320aic23", 0x1a), |
@@ -204,13 +190,14 @@ void __init eukrea_mbimx51_baseboard_init(void) | |||
204 | gpio_direction_output(MBIMX51_LED3, 1); | 190 | gpio_direction_output(MBIMX51_LED3, 1); |
205 | gpio_free(MBIMX51_LED3); | 191 | gpio_free(MBIMX51_LED3); |
206 | 192 | ||
207 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 193 | gpio_led_register_device(-1, &mbimx51_leds_info); |
208 | 194 | ||
209 | imx51_add_imx_keypad(&mbimx51_map_data); | 195 | imx51_add_imx_keypad(&mbimx51_map_data); |
210 | 196 | ||
211 | gpio_request(MBIMX51_TSC2007_GPIO, "tsc2007_irq"); | 197 | gpio_request(MBIMX51_TSC2007_GPIO, "tsc2007_irq"); |
212 | gpio_direction_input(MBIMX51_TSC2007_GPIO); | 198 | gpio_direction_input(MBIMX51_TSC2007_GPIO); |
213 | irq_set_irq_type(MBIMX51_TSC2007_IRQ, IRQF_TRIGGER_FALLING); | 199 | irq_set_irq_type(gpio_to_irq(MBIMX51_TSC2007_GPIO), |
200 | IRQF_TRIGGER_FALLING); | ||
214 | i2c_register_board_info(1, mbimx51_i2c_devices, | 201 | i2c_register_board_info(1, mbimx51_i2c_devices, |
215 | ARRAY_SIZE(mbimx51_i2c_devices)); | 202 | ARRAY_SIZE(mbimx51_i2c_devices)); |
216 | 203 | ||