X-Git-Url: https://git.karo-electronics.de/?p=karo-tx-uboot.git;a=blobdiff_plain;f=board%2Fkaro%2Ftx28%2Ftx28.c;h=273463efcfea927eeef54fab3897d0b804a1024e;hp=f1fca4a17a229438ccc9ed2de77161049c3605b5;hb=d92fe3e06395ff78d277124cfd383a5aebab0d7f;hpb=22b815e25c06ab2f1920e9e1c531fd8fc36f442f diff --git a/board/karo/tx28/tx28.c b/board/karo/tx28/tx28.c index f1fca4a17a..273463efcf 100644 --- a/board/karo/tx28/tx28.c +++ b/board/karo/tx28/tx28.c @@ -370,13 +370,18 @@ static int led_state = LED_STATE_DISABLED; void show_activity(int arg) { static ulong last; + int ret; if (led_state == LED_STATE_DISABLED) { return; } else if (led_state == LED_STATE_INIT) { last = get_timer(0); - gpio_set_value(TX28_LED_GPIO, 1); - led_state = LED_STATE_ON; + ret = gpio_request_one(TX28_LED_GPIO, + GPIOFLAG_OUTPUT_INIT_HIGH, "Activity"); + if (ret == 0) + led_state = LED_STATE_ON; + else + led_state = LED_STATE_DISABLED; } else { if (get_timer(last) > CONFIG_SYS_HZ) { last = get_timer(0);