Skip to main content

Android timer-triggered LED

Enabling LED timer trigger support in Android requires:

  1. LED class driver implementing the blinking.

  2. Patch the kernel to send uevents on sysfs changes:

    1. [1/3] sysfs: introduce a sysfs_create_file_uevent new API

    2. [2/3] drivers: add a new device_create_file_uevent API

    3. [3/3] ledtrig-timer: convert to use device_create_file_uevent API

  3. Vold patch for changing the ownership of the delay_on/delay_off files upon receiving that uevent.

  4. liblights setting up the “timer” trigger every time blinking is required (setting the brightness to 0 would disable the trigger).

This was discussed here –, but the patches have not entered the mainline kernel.

It turns that’s not as straightforward as I thought.