Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel6
outlinefalse
stylenone
typelist
printabletrue

1. Overview

This application note explains how to enable the display backlight on and off, in those hardware design where the backlight is controlled by a GPIO and, therefore, can have one of the two states: off and on.

...

Code Block
        backlight {
                compatible = "gpio-backlight";
                pinctrl-names = "default";
                pinctrl-0 = <&pinctrl_backlight>;
                gpios = <&gpio2 31 GPIO_ACTIVE_HIGH>;
                default-on;
        };

3. Controlling Backlight

To turn the LCD backlight on, run the following command:

Code Block
/ # echo 0 > /sys/class/backlight/backlight/bl_power

To turn the LCD backlight off, run the following command:

...