TS-4900 LEDs: Difference between revisions

From embeddedTS Manuals
(Created page with "The kernel provides access to control the LEDs using the sysfs: <source lang=bash> # Set Red led on echo 1 > /sys/class/leds/red-led/brightness # Set Red led off echo 0 > /sys...")
 
m (Links auto-updated for 2022 re-branding ( https://github.com/embeddedarm/linux-3.10.17-imx6/blob/master/Documentation/leds/ledtrig-transient.txt →‎ https://github.com/embeddedTS/linux-3.10.17-imx6/blob/master/Documentation/leds/ledtrig-transient.txt https://github.com/embeddedarm/linux-3.10.17-imx6/blob/master/Documentation/leds/ledtrig-oneshot.txt →‎ https://github.com/embeddedTS/linux-3.10.17-imx6/blob/master/Documentation/leds/ledtrig-oneshot.txt))
 
(2 intermediate revisions by one other user not shown)
Line 12: Line 12:
</source>
</source>


The kernel provides various triggers that can be useful for debugging purposes:
The kernel provides various triggers that can be useful for debugging purposes.  The trigger for a given LED is in its directory:
<source lang=bash>
echo "heartbeat" > /sys/class/leds/red-led/trigger
</source>


{|class=wikitable
{|class=wikitable
! Trigger value
! Trigger value
!  
! LED toggles on
|-
|-
| none
| none
Line 34: Line 37:
|-
|-
| oneshot  
| oneshot  
| Blinks after delay. <ref> See the [https://github.com/embeddedarm/linux-3.10.17-imx6/blob/master/Documentation/leds/ledtrig-oneshot.txt Kernel documentation] for more details</ref>
| Blinks after delay. <ref> See the [https://github.com/embeddedTS/linux-3.10.17-imx6/blob/master/Documentation/leds/ledtrig-oneshot.txt Kernel documentation] for more details</ref>
|-
|-
| heartbeat
| heartbeat
Line 61: Line 64:
|-
|-
| transient
| transient
| Specify on/off with time to turn off.  <ref> See the [https://github.com/embeddedarm/linux-3.10.17-imx6/blob/master/Documentation/leds/ledtrig-transient.txt Kernel documentation] for more details</ref>
| Specify on/off with time to turn off.  <ref> See the [https://github.com/embeddedTS/linux-3.10.17-imx6/blob/master/Documentation/leds/ledtrig-transient.txt Kernel documentation] for more details</ref>
|-
|-
| flash/torch
| flash/torch
| Toggle on Camera activation.  Not currently used.   
| Toggle on Camera activation.  Not currently used.   
|}
|}
<References />

Latest revision as of 16:57, 17 January 2022

The kernel provides access to control the LEDs using the sysfs:

# Set Red led on
echo 1 > /sys/class/leds/red-led/brightness
# Set Red led off
echo 0 > /sys/class/leds/red-led/brightness

# Set Green led on
echo 1 > /sys/class/leds/green-led/brightness
# Set Green led off
echo 0 > /sys/class/leds/green-led/brightness

The kernel provides various triggers that can be useful for debugging purposes. The trigger for a given LED is in its directory:

echo "heartbeat" > /sys/class/leds/red-led/trigger
Trigger value LED toggles on
none Default, no action
mmc0 MicroSD card activity
mmc1 eMMC activity
mmc2 WIFI SDIO activity
timer 2hz blink
oneshot Blinks after delay. [1]
heartbeat Similar to timer, but varies the period based on system load
backlight Toggles on FB_BLANK
gpio Toggle based on a specified gpio. [2]
cpu0 Blink on CPU core 0 activity
cpu1 Blink on CPU core 1 activity
cpu2 Blink on CPU core 2 activity
cpu3 Blink on CPU core 3 activity
default-on Only turns on by default. Only useful for device tree.
transient Specify on/off with time to turn off. [3]
flash/torch Toggle on Camera activation. Not currently used.
  1. See the Kernel documentation for more details
  2. When this trigger is set, a "gpio" file appears in the same directory which can be used to specify what GPIO to follow when it blinks
  3. See the Kernel documentation for more details