Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 258675
b: refs/heads/master
c: 5b8d628
h: refs/heads/master
i:
  258673: dd2a7b3
  258671: c3f161e
v: v3
  • Loading branch information
Uwe Kleine-König authored and Sascha Hauer committed Jul 7, 2011
1 parent 6072a0b commit 136faa7
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 54 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 47e837b54c01083ce153493882fb8d74d108ae4a
refs/heads/master: 5b8d628ca4036e76a2d892f2c1d01b58d232809e
4 changes: 4 additions & 0 deletions trunk/arch/arm/mach-mx5/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ config MACH_EUKREA_MBIMX51_BASEBOARD
bool
select IMX_HAVE_PLATFORM_IMX_KEYPAD
select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
select LEDS_GPIO_REGISTER
help
This adds board specific devices that can be found on Eukrea's
MBIMX51 evaluation board.
Expand All @@ -135,6 +136,7 @@ config MACH_EUKREA_MBIMXSD51_BASEBOARD
prompt "Eukrea MBIMXSD development board"
bool
select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
select LEDS_GPIO_REGISTER
help
This adds board specific devices that can be found on Eukrea's
MBIMXSD evaluation board.
Expand All @@ -151,13 +153,15 @@ config MX51_EFIKA_COMMON

config MACH_MX51_EFIKAMX
bool "Support MX51 Genesi Efika MX nettop"
select LEDS_GPIO_REGISTER
select MX51_EFIKA_COMMON
help
Include support for Genesi Efika MX nettop. This includes specific
configurations for the board and its peripherals.

config MACH_MX51_EFIKASB
bool "Support MX51 Genesi Efika Smartbook"
select LEDS_GPIO_REGISTER
select MX51_EFIKA_COMMON
help
Include support for Genesi Efika Smartbook. This includes specific
Expand Down
15 changes: 4 additions & 11 deletions trunk/arch/arm/mach-mx5/board-mx51_efikamx.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ static void __init mx51_efikamx_board_id(void)
}
}

static struct gpio_led mx51_efikamx_leds[] = {
static struct gpio_led mx51_efikamx_leds[] __initdata = {
{
.name = "efikamx:green",
.default_trigger = "default-on",
Expand All @@ -157,19 +157,12 @@ static struct gpio_led mx51_efikamx_leds[] = {
},
};

static struct gpio_led_platform_data mx51_efikamx_leds_data = {
static const struct gpio_led_platform_data
mx51_efikamx_leds_data __initconst = {
.leds = mx51_efikamx_leds,
.num_leds = ARRAY_SIZE(mx51_efikamx_leds),
};

static struct platform_device mx51_efikamx_leds_device = {
.name = "leds-gpio",
.id = -1,
.dev = {
.platform_data = &mx51_efikamx_leds_data,
},
};

static struct gpio_keys_button mx51_efikamx_powerkey[] = {
{
.code = KEY_POWER,
Expand Down Expand Up @@ -248,7 +241,7 @@ static void __init mx51_efikamx_init(void)
mx51_efikamx_leds[2].default_trigger = "mmc1";
}

platform_device_register(&mx51_efikamx_leds_device);
gpio_led_register_device(-1, &mx51_efikamx_leds_data);
imx_add_gpio_keys(&mx51_efikamx_powerkey_data);

if (system_rev == 0x11) {
Expand Down
16 changes: 4 additions & 12 deletions trunk/arch/arm/mach-mx5/board-mx51_efikasb.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ static void __init mx51_efikasb_usb(void)
mxc_register_device(&mxc_usbh2_device, &usbh2_config);
}

static struct gpio_led mx51_efikasb_leds[] = {
static const struct gpio_led mx51_efikasb_leds[] __initconst = {
{
.name = "efikasb:green",
.default_trigger = "default-on",
Expand All @@ -146,19 +146,12 @@ static struct gpio_led mx51_efikasb_leds[] = {
},
};

static struct gpio_led_platform_data mx51_efikasb_leds_data = {
static const struct gpio_led_platform_data
mx51_efikasb_leds_data __initconst = {
.leds = mx51_efikasb_leds,
.num_leds = ARRAY_SIZE(mx51_efikasb_leds),
};

static struct platform_device mx51_efikasb_leds_device = {
.name = "leds-gpio",
.id = -1,
.dev = {
.platform_data = &mx51_efikasb_leds_data,
},
};

static struct gpio_keys_button mx51_efikasb_keys[] = {
{
.code = KEY_POWER,
Expand Down Expand Up @@ -256,9 +249,8 @@ static void __init efikasb_board_init(void)
mx51_efikasb_usb();
imx51_add_sdhci_esdhc_imx(1, NULL);

platform_device_register(&mx51_efikasb_leds_device);
gpio_led_register_device(-1, &mx51_efikasb_leds_data);
imx_add_gpio_keys(&mx51_efikasb_keys_data);

}

static void __init mx51_efikasb_timer_init(void)
Expand Down
18 changes: 3 additions & 15 deletions trunk/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#define MBIMX51_LED2 IMX_GPIO_NR(3, 7)
#define MBIMX51_LED3 IMX_GPIO_NR(3, 8)

static struct gpio_led mbimx51_leds[] = {
static const struct gpio_led mbimx51_leds[] __initconst = {
{
.name = "led0",
.default_trigger = "heartbeat",
Expand All @@ -64,23 +64,11 @@ static struct gpio_led mbimx51_leds[] = {
},
};

static struct gpio_led_platform_data mbimx51_leds_info = {
static const struct gpio_led_platform_data mbimx51_leds_info __initconst = {
.leds = mbimx51_leds,
.num_leds = ARRAY_SIZE(mbimx51_leds),
};

static struct platform_device mbimx51_leds_gpio = {
.name = "leds-gpio",
.id = -1,
.dev = {
.platform_data = &mbimx51_leds_info,
},
};

static struct platform_device *devices[] __initdata = {
&mbimx51_leds_gpio,
};

static iomux_v3_cfg_t mbimx51_pads[] = {
/* UART2 */
MX51_PAD_UART2_RXD__UART2_RXD,
Expand Down Expand Up @@ -204,7 +192,7 @@ void __init eukrea_mbimx51_baseboard_init(void)
gpio_direction_output(MBIMX51_LED3, 1);
gpio_free(MBIMX51_LED3);

platform_add_devices(devices, ARRAY_SIZE(devices));
gpio_led_register_device(-1, &mbimx51_leds_info);

imx51_add_imx_keypad(&mbimx51_map_data);

Expand Down
19 changes: 4 additions & 15 deletions trunk/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = {
#define GPIO_LED1 IMX_GPIO_NR(3, 30)
#define GPIO_SWITCH1 IMX_GPIO_NR(3, 31)

static struct gpio_led eukrea_mbimxsd_leds[] = {
static const struct gpio_led eukrea_mbimxsd_leds[] __initconst = {
{
.name = "led1",
.default_trigger = "heartbeat",
Expand All @@ -83,19 +83,12 @@ static struct gpio_led eukrea_mbimxsd_leds[] = {
},
};

static struct gpio_led_platform_data eukrea_mbimxsd_led_info = {
static const struct gpio_led_platform_data
eukrea_mbimxsd_led_info __initconst = {
.leds = eukrea_mbimxsd_leds,
.num_leds = ARRAY_SIZE(eukrea_mbimxsd_leds),
};

static struct platform_device eukrea_mbimxsd_leds_gpio = {
.name = "leds-gpio",
.id = -1,
.dev = {
.platform_data = &eukrea_mbimxsd_led_info,
},
};

static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = {
{
.gpio = GPIO_SWITCH1,
Expand All @@ -112,10 +105,6 @@ static const struct gpio_keys_platform_data
.nbuttons = ARRAY_SIZE(eukrea_mbimxsd_gpio_buttons),
};

static struct platform_device *platform_devices[] __initdata = {
&eukrea_mbimxsd_leds_gpio,
};

static const struct imxuart_platform_data uart_pdata __initconst = {
.flags = IMXUART_HAVE_RTSCTS,
};
Expand Down Expand Up @@ -154,6 +143,6 @@ void __init eukrea_mbimxsd51_baseboard_init(void)
i2c_register_board_info(0, eukrea_mbimxsd_i2c_devices,
ARRAY_SIZE(eukrea_mbimxsd_i2c_devices));

platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
gpio_led_register_device(-1, &eukrea_mbimxsd_led_info);
imx_add_gpio_keys(&eukrea_mbimxsd_button_data);
}

0 comments on commit 136faa7

Please sign in to comment.