bl Manhwa spoiler

On the Apalis Standard, two dedicated pins are used for backlight control, BKL1_ON, and BKL1_PWM. Note that so far all Apalis modules use the same PWM instance on the pins PWM4 and BKL1_PWM, hence PWM4 can not be used independently when BKL1_PWM is in use.

The Linux kernel exposes backlights through a sysfs ABI called backlight (located under /sys/class/backlight/, see also the kernel documentation located in the source tree under Documentation/ABI/stable/sysfs-class-backlight). The Linux BSP of all modules make use of the backlight API, however, there are subtle differences mostly arising from the different kernel version used.

Backlight blcharacter

systemd versions 208 and later automatically preserves the current setting across boots with the systemd-backlight@.service. The service is enabled by default.

On our Colibri carrier boards, BL_ON together with PWM are used for adjusting LCD brightness. On the Colibri Evaluation Board and Iris Carrier Board, the BL_ON signal also controls the VGA DAC operation.

Some displays have their maximum brightness if the PWM signal is constant at 3.3V while other displays are inverted and have their maximum brightness when the PWM signal is at 0V. The PWM signal logic of the displays sold by Toradex is documented in the table under PWM Logic.

Backlight

Backlight BLlezhin

The backlight driver controls both BL_ON/BKL1_ON and the PWM and targets a display which is brightest at 0% aka inverted. However, apart from the behavior at the extremes, it works just fine with a display which is brightest at 100% aka not inverted as well.

The adapter PCB for the Capacitive Multi-Touch Display 7" display has a PWM/digital to backlight LED current converter. This converter requires the PWM Frequency to be > 10 kHz or it will fall into its digital mode at least for some duty cycles keeping the backlight dark.

The device tree contains the backlight configuration. This includes a mapping of brightness values to duty cycles with the value 0 generating a duty cycle of 0% and the value in max_brightness generating a duty cycle of 100%. Also, the PWM frequency and polarity can be configured.

The following can be used to switch the duty cycle to 0% and back to the level determined by what is in the brightness file.