Page | 58
Sets GPIOs 136, 137, 138 and 139 as M4 (GPIO mode) and IDIS (input not
allowed)
1
)
Driver Design;
The
source
file:
leds-gpio.c
is
saved
under
/linux-2.6.32-sbc8140/drivers/leds/;
Call platform_driver_register to register gpio_leds driver;
static struct platform_driver gpio_led_driver = {
.probe = gpio_led_probe,
.remove = __devexit_p(gpio_led_remove),
.driver = {
.name = "leds-gpio",
.owner = THIS_MODULE,
},
};
static int __init gpio_led_init(void)
{
int ret;
#ifdef CONFIG_LEDS_GPIO_PLATFORM
ret = platform_driver_register(&gpio_led_driver);
if (ret)
return ret;
#endif
#ifdef CONFIG_LEDS_GPIO_OF
ret
=
of_register_platform_driver(&of_gpio_leds_driver);
#endif
#ifdef CONFIG_LEDS_GPIO_PLATFORM
if (ret)
platform_driver_unregister(&gpio_led_driver);
#endif
return ret;
}
static void __exit gpio_led_exit(void)
{
#ifdef CONFIG_LEDS_GPIO_PLATFORM
Содержание SBC8140
Страница 1: ...SBC8140 Single Board Computer User Manual Version 1 1 22nd Jan 2014...
Страница 12: ...Page 6 1 4 Interfaces on the SBC8140 Figure 4 SBC8140 Interfaces...
Страница 13: ...Page 7 1 5 System Block Diagram Figure 5 SBC8140 system block diagram...
Страница 15: ...Page 9 1 6 2 Expansion Board Figure 8 Expansion board dimensions...
Страница 128: ...Page 122...
Страница 130: ...Page 124 3 When the following appears select Continue 4 Please wait until the installation is completed...
Страница 131: ...Page 125...
Страница 139: ...Page 133 Appendix 5 FAQ Please visit http www elinux org SBC8600_FAQ...