1 #include <linux/kernel.h>
2 #include <linux/module.h>
3 #include <linux/platform_device.h>
4 #include <linux/gpio_keys.h>
5 #include <linux/input.h>
6 #include <linux/leds.h>
8 #include <asm/mach-types.h>
10 static struct gpio_keys_button csb701_buttons[] = {
21 static struct gpio_keys_platform_data csb701_gpio_keys_data = {
22 .buttons = csb701_buttons,
23 .nbuttons = ARRAY_SIZE(csb701_buttons),
26 static struct gpio_led csb701_leds[] = {
28 .name = "csb701:yellow:heartbeat",
29 .default_trigger = "heartbeat",
35 static struct platform_device csb701_gpio_keys = {
38 .dev.platform_data = &csb701_gpio_keys_data,
41 static struct gpio_led_platform_data csb701_leds_gpio_data = {
43 .num_leds = ARRAY_SIZE(csb701_leds),
46 static struct platform_device csb701_leds_gpio = {
49 .dev.platform_data = &csb701_leds_gpio_data,
52 static struct platform_device *devices[] __initdata = {
57 static int __init csb701_init(void)
59 if (!machine_is_csb726())
62 return platform_add_devices(devices, ARRAY_SIZE(devices));
65 module_init(csb701_init);