-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ARM] pxa: add support for CSB701 baseboard
CSB701 is one of baseboards that can be used with CSB726 SOM. This currently adds support for button and LED on the board. More to come later. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Eric Miao <eric.miao@marvell.com>
- Loading branch information
Dmitry Eremin-Solenikov
authored and
Eric Miao
committed
Mar 13, 2009
1 parent
aac4297
commit 3b31fab
Showing
3 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#include <linux/kernel.h> | ||
#include <linux/module.h> | ||
#include <linux/platform_device.h> | ||
#include <linux/gpio_keys.h> | ||
#include <linux/input.h> | ||
#include <linux/leds.h> | ||
|
||
static struct gpio_keys_button csb701_buttons[] = { | ||
{ | ||
.code = 0x7, | ||
.gpio = 1, | ||
.active_low = 1, | ||
.desc = "SW2", | ||
.type = EV_SW, | ||
.wakeup = 1, | ||
}, | ||
}; | ||
|
||
static struct gpio_keys_platform_data csb701_gpio_keys_data = { | ||
.buttons = csb701_buttons, | ||
.nbuttons = ARRAY_SIZE(csb701_buttons), | ||
}; | ||
|
||
static struct gpio_led csb701_leds[] = { | ||
{ | ||
.name = "csb701:yellow:heartbeat", | ||
.default_trigger = "heartbeat", | ||
.gpio = 11, | ||
.active_low = 1, | ||
}, | ||
}; | ||
|
||
static struct platform_device csb701_gpio_keys = { | ||
.name = "gpio-keys", | ||
.id = -1, | ||
.dev.platform_data = &csb701_gpio_keys_data, | ||
}; | ||
|
||
static struct gpio_led_platform_data csb701_leds_gpio_data = { | ||
.leds = csb701_leds, | ||
.num_leds = ARRAY_SIZE(csb701_leds), | ||
}; | ||
|
||
static struct platform_device csb701_leds_gpio = { | ||
.name = "leds-gpio", | ||
.id = -1, | ||
.dev.platform_data = &csb701_leds_gpio_data, | ||
}; | ||
|
||
static struct platform_device *devices[] __initdata = { | ||
&csb701_gpio_keys, | ||
&csb701_leds_gpio, | ||
}; | ||
|
||
static int __init csb701_init(void) | ||
{ | ||
return platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
} | ||
|
||
module_init(csb701_init); | ||
|