Page | 51
Reference
linux-2.6.32-sbc8140/sound/soc/
linux-2.6.32-sbc8140/sound/soc/omap/omap3sbc8140.c
linux-2.6.32-sbc8140/sound/soc/codecs/twl4030.c
3.5
Driver Development
This section will introduce how to develop drivers with two examples,
GPIO_Keys and GPIO_LEDs.
3.5.1
GPIO_Keys Driver
1.
Device Definition;
The
source
file:
board-omap3sbc8140.c
is
saved
under
/linux-2.6.32-sbc8140/arch/arm/mach-omap2/;
static struct gpio_keys_button gpio_buttons[] = {
{
.code = KEY_F1,
.gpio = 26,
.desc = "menu",
.active_low = true,
},
{
.code = KEY_ESC,
.gpio = 29,
.desc = "back",
.active_low = true,
},
};
static struct gpio_keys_platform_data gpio_key_info = {
.buttons = gpio_buttons,
.nbuttons = ARRAY_SIZE(gpio_buttons),
};
static struct platform_device keys_gpio = {
.name = "gpio-keys",
.id = -1,
.dev = {
Summary of Contents for SBC8140
Page 1: ...SBC8140 Single Board Computer User Manual Version 1 1 22nd Jan 2014...
Page 12: ...Page 6 1 4 Interfaces on the SBC8140 Figure 4 SBC8140 Interfaces...
Page 13: ...Page 7 1 5 System Block Diagram Figure 5 SBC8140 system block diagram...
Page 15: ...Page 9 1 6 2 Expansion Board Figure 8 Expansion board dimensions...
Page 128: ...Page 122...
Page 131: ...Page 125...
Page 139: ...Page 133 Appendix 5 FAQ Please visit http www elinux org SBC8600_FAQ...