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 static struct gpio_keys_button csb701_buttons
[] = {
19 static struct gpio_keys_platform_data csb701_gpio_keys_data
= {
20 .buttons
= csb701_buttons
,
21 .nbuttons
= ARRAY_SIZE(csb701_buttons
),
24 static struct gpio_led csb701_leds
[] = {
26 .name
= "csb701:yellow:heartbeat",
27 .default_trigger
= "heartbeat",
33 static struct platform_device csb701_gpio_keys
= {
36 .dev
.platform_data
= &csb701_gpio_keys_data
,
39 static struct gpio_led_platform_data csb701_leds_gpio_data
= {
41 .num_leds
= ARRAY_SIZE(csb701_leds
),
44 static struct platform_device csb701_leds_gpio
= {
47 .dev
.platform_data
= &csb701_leds_gpio_data
,
50 static struct platform_device
*devices
[] __initdata
= {
55 static int __init
csb701_init(void)
57 return platform_add_devices(devices
, ARRAY_SIZE(devices
));
60 module_init(csb701_init
);