X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/73a104c025f3230baa7e6e01250ca8825ee4342f..9dd6c43103f12ece08732fbc4661efc4b17b4d18:/target/linux/ifxmips/files/drivers/leds/leds-ifxmips.c?ds=sidebyside diff --git a/target/linux/ifxmips/files/drivers/leds/leds-ifxmips.c b/target/linux/ifxmips/files/drivers/leds/leds-ifxmips.c index 04e4ef8d0..0716f3d77 100644 --- a/target/linux/ifxmips/files/drivers/leds/leds-ifxmips.c +++ b/target/linux/ifxmips/files/drivers/leds/leds-ifxmips.c @@ -18,6 +18,7 @@ * */ +#include #include #include #include @@ -31,12 +32,13 @@ #include #include -#include -#include -#include +#include +#include +#include #define DRVNAME "ifxmips_led" +/* might need to be changed depending on shift register used on the pcb */ #if 1 #define IFXMIPS_LED_CLK_EDGE IFXMIPS_LED_FALLING #else @@ -98,7 +100,8 @@ void ifxmips_led_setup_gpio(void) { int i = 0; - /* we need to setup pins SH,D,ST (4,5,6) */ + /* leds are controlled via a shift register + we need to setup pins SH,D,ST (4,5,6) to make it work */ for (i = 4; i < 7; i++) { ifxmips_port_set_altsel0(IFXMIPS_LED_GPIO_PORT, i); ifxmips_port_clear_altsel1(IFXMIPS_LED_GPIO_PORT, i);