Skip to content

Commit

Permalink
Merge pull request torvalds#44 from HarveyHunt/ci20-v3.18-leds
Browse files Browse the repository at this point in the history
Use the new Ci20's LEDs to show CPU and NAND activity
  • Loading branch information
ZubairLK committed Jul 7, 2015
2 parents 0f231e7 + 2f6e4c1 commit 78e5479
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
16 changes: 16 additions & 0 deletions arch/mips/boot/dts/ci20.dts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,22 @@
type = <RFKILL_TYPE_BLUETOOTH>;
vrfkill-supply = <&bt_reset>;
};

leds {
compatible = "gpio-leds";
led1 {
gpios = <&gpc 0 0>;
linux,default-trigger = "cpu0";
};
led2 {
gpios = <&gpc 1 0>;
linux,default-trigger = "cpu1";
};
led3 {
gpios = <&gpc 2 0>;
linux,default-trigger = "nand-disk";
};
};
};

&ext {
Expand Down
8 changes: 6 additions & 2 deletions arch/mips/kernel/idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <linux/export.h>
#include <linux/init.h>
#include <linux/irqflags.h>
#include <linux/leds.h>
#include <linux/printk.h>
#include <linux/sched.h>
#include <asm/cpu.h>
Expand Down Expand Up @@ -259,10 +260,13 @@ void __init check_wait(void)

void arch_cpu_idle(void)
{
if (cpu_wait)
if (cpu_wait) {
ledtrig_cpu(CPU_LED_IDLE_START);
cpu_wait();
else
ledtrig_cpu(CPU_LED_IDLE_END);
} else {
local_irq_enable();
}
}

#ifdef CONFIG_CPU_IDLE
Expand Down

0 comments on commit 78e5479

Please sign in to comment.