Page | 56
static void gpio_keys_work_func(struct work_struct *work)
{
…
gpio_keys_report_event(bdata);
…
}
static void gpio_keys_report_event(struct gpio_button_data
*bdata)
{
struct gpio_keys_button *button = bdata->button;
struct input_dev *input = bdata->input;
unsigned int type = button->type ?: EV_KEY;
int state = (gpio_get_value(button->gpio) ? 1 : 0) ^
button->active_low;
input_event(input, type, button->code, !!state);
input_sync(input);
3.5.2
GPIO_LEDs Driver
1.
Device Definitions;
The
source
file:
board-omap3sbc8140.c
is
saved
under
/linux-2.6.32-sbc8140/arch/arm/mach-omap2/;
static struct gpio_led gpio_leds[] = {
{
.name = "led0",
.default_trigger = "heartbeat",
.gpio = 136,
.active_low = true,
},
{
.name = "led1",
.gpio = 137, /* gets replaced
*/
.active_low = true,
},
{
.name = "led2",
.gpio = 138, /* gets replaced
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...