Changes between Version 1 and Version 2 of linux/backlight


Ignore:
Timestamp:
01/15/2018 09:44:24 AM (8 months ago)
Author:
Tim Harvey
Comment:

convert restored html to wiki markup

Legend:

Unmodified
Added
Removed
Modified
  • linux/backlight

    v1 v2  
    1 {{{#!html
    2           <div id="wikipage" class="trac-content"><p>
    3 </p><div class="wiki-toc">
    4 <ol>
    5   <li>
    6     <a href="#LinuxBacklightclassdigitaldisplaybacklights">Linux Backlight class digital display backlights</a>
    7   </li>
    8   <li>
    9     <a href="#OtherReferences">Other References</a>
    10   </li>
    11 </ol>
    12 </div><p>
    13 </p>
    14 <p>
    15 <span class="wikianchor" id="backlight_class"></span>
    16 </p>
    17 <h1 id="LinuxBacklightclassdigitaldisplaybacklights">Linux Backlight class digital display backlights</h1>
    18 <p>
     1[[PageOutline]]
     2
     3= Linux Backlight class digital display backlights =
    194A digital display which has a backlight may have a Linux backlight driver which provides a sysfs API. Typically these are implemented via PWM signals allowing a variable brightness or a GPIO signal allowing a simple on/off.
    20 </p>
    21 <p>
    22 Mapping A backlight driver to a PWM, GPIO, or other controller is done in the board support file or in the case of more modern kernels such as Ventana in the device-tree. See the backlight node in the <a class="ext-link" href="http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi#n31"><span class="icon">​</span>gw54xx device-tree</a> for example.
    23 </p>
    24 <p>
     5
     6Mapping A backlight driver to a PWM, GPIO, or other controller is done in the board support file or in the case of more modern kernels such as Ventana in the device-tree. See the backlight node in the [http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi#n31 ​gw54xx device-tree] for example.
     7
    258To list available backlight controllers:
    26 </p>
    27 <pre class="wiki">ls /sys/class/backlight
    28 </pre><p>
     9{{{#!bash
     10ls /sys/class/backlight
     11}}}
     12
    2913To see current/available brightness values:
    30 </p>
    31 <pre class="wiki">cat /sys/class/backlight/*/brightness # current brightness
     14{{{#!bash
     15cat /sys/class/backlight/*/brightness # current brightness
    3216cat /sys/class/backlight/*/max_brightness # max brightness
    33 </pre><p>
     17}}}
     18
    3419To set brightness (to a value equal or less than max_brightness)
    35 </p>
    36 <pre class="wiki">echo 0 &gt; /sys/class/backlight/*/brightness # turn off backlight
    37 </pre><p>
     20{{{#!bash
     21echo 0 > /sys/class/backlight/*/brightness # turn off backlight
     22}}}
     23
    3824References:
    39 </p>
    40 <ul><li><a class="ext-link" href="http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/leds/backlight/gpio-backlight.txt"><span class="icon">​</span>GPIO backlight</a>
    41 </li><li><a class="ext-link" href="http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt"><span class="icon">​</span>PWM backlight</a>
    42 </li><li><a class="ext-link" href="http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/ABI/stable/sysfs-class-backlight"><span class="icon">​</span>sysfs-class-backlight</a>
    43 </li></ul><h1 id="OtherReferences">Other References</h1>
    44 <p>
     25 * ​[http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/leds/backlight/gpio-backlight.txt GPIO backlight]
     26 * [http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt PWM backlight]
     27 * [http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/ABI/stable/sysfs-class-backlight sysfs-class-backlight]
     28
     29= Other References =
    4530Here are some other useful references from our wiki:
    46 </p>
    47 <ul><li><a class="wiki" href="/wiki/gpio">General Purpose I/O (GPIO)</a>
    48 </li><li><a class="wiki" href="/wiki/linux/pwm">Pulse-Width-Modulation (PWM)</a>
    49 </li><li><a class="wiki" href="/wiki/OpenWrt/gpio">GPIO in OpenWrt</a>
    50 </li><li><a class="wiki" href="/wiki/ventana/DigitalIO">Ventana product family Digital I/O</a>
    51 </li></ul
    52 }}}
     31* [wiki:gpio General Purpose I/O (GPIO)]
     32* [wiki:linux/pwm Pulse-Width-Modulation (PWM)]
     33* [wiki:OpenWrt/gpio GPIO in OpenWrt]
     34* [wiki:ventana/DigitalIO Ventana product family Digital I/O]