Difference between revisions of "BackLight"
m (→Introduction) |
|||
Line 2: | Line 2: | ||
==Introduction== | ==Introduction== | ||
− | Backlight control is done through the i.MXL/i.MX27 integrated backlight PWM (inside LCDC module). The output signal of this PWM is redirected to the CONTRAST pin of your LCD connector. | + | |
+ | Backlight control is done through the i.MXL/i.MX27 integrated backlight PWM (inside LCDC module). The output signal of this PWM is redirected to the CONTRAST pin of your LCD connector. | ||
+ | |||
In short the driver is mainly exporting a ''/sys'' interface to user space, allowing you to change the Duty Cycle of the PWM output signal and so the backlight intensity of the LCD. | In short the driver is mainly exporting a ''/sys'' interface to user space, allowing you to change the Duty Cycle of the PWM output signal and so the backlight intensity of the LCD. | ||
==Installation== | ==Installation== | ||
This driver is now installed by default on the standard Armadeus rootfs. So, following instructions are only given as reference. | This driver is now installed by default on the standard Armadeus rootfs. So, following instructions are only given as reference. | ||
+ | <pre class="host"> | ||
$ make linux26-menuconfig | $ make linux26-menuconfig | ||
+ | </pre> | ||
+ | |||
* in '''Device Drivers ---> Graphics support ---> Backlight & LCD device support''', select '''<M> Lowlevel Backlight controls''' | * in '''Device Drivers ---> Graphics support ---> Backlight & LCD device support''', select '''<M> Lowlevel Backlight controls''' | ||
* in '''Device Drivers ---> Armadeus specific drivers ---> Support for specific Armadeus drivers''', select '''<M> i.MX backlight driver''' | * in '''Device Drivers ---> Armadeus specific drivers ---> Support for specific Armadeus drivers''', select '''<M> i.MX backlight driver''' | ||
Line 13: | Line 18: | ||
==Usage== | ==Usage== | ||
+ | |||
On your APF, load the module: | On your APF, load the module: | ||
+ | <pre class="apf"> | ||
# modprobe imx_bl | # modprobe imx_bl | ||
i.MX Backlight driver v0.X initialized. | i.MX Backlight driver v0.X initialized. | ||
+ | </pre> | ||
All backlight controls are done through the ''/sys'' interface: | All backlight controls are done through the ''/sys'' interface: | ||
+ | <pre class="apf"> | ||
# ls /sys/class/backlight/imxl-bl/ | # ls /sys/class/backlight/imxl-bl/ | ||
− | |||
actual_brightness max_brightness subsystem | actual_brightness max_brightness subsystem | ||
brightness power uevent | brightness power uevent | ||
+ | </pre> | ||
* To see the actual brightness: | * To see the actual brightness: | ||
+ | <pre class="apf"> | ||
# cat /sys/class/backlight/imxl-bl/actual_brightness | # cat /sys/class/backlight/imxl-bl/actual_brightness | ||
+ | </pre> | ||
* To see the max allowed brightness: | * To see the max allowed brightness: | ||
+ | <pre class="apf"> | ||
# cat /sys/class/backlight/imxl-bl/max_brightness | # cat /sys/class/backlight/imxl-bl/max_brightness | ||
+ | </pre> | ||
* To change the brightness: | * To change the brightness: | ||
+ | <pre class="apf"> | ||
# echo 100 > /sys/class/backlight/imxl-bl/brightness | # echo 100 > /sys/class/backlight/imxl-bl/brightness | ||
+ | </pre> | ||
There is a small test script in ''target/linux/modules/backlight/test/'' | There is a small test script in ''target/linux/modules/backlight/test/'' | ||
==Links== | ==Links== | ||
+ | |||
* [http://en.wikipedia.org/wiki/Pulse-width_modulation#Power_delivery How a PWM is working] | * [http://en.wikipedia.org/wiki/Pulse-width_modulation#Power_delivery How a PWM is working] | ||
* http://www.armadeus.com/wiki/index.php?title=FrameBuffer#Tips | * http://www.armadeus.com/wiki/index.php?title=FrameBuffer#Tips | ||
[[Category:Linux drivers]] | [[Category:Linux drivers]] |
Revision as of 18:07, 5 February 2009
This page will explain you how to configure and use the Linux driver controlling the BackLight of your LCD
Contents
Introduction
Backlight control is done through the i.MXL/i.MX27 integrated backlight PWM (inside LCDC module). The output signal of this PWM is redirected to the CONTRAST pin of your LCD connector.
In short the driver is mainly exporting a /sys interface to user space, allowing you to change the Duty Cycle of the PWM output signal and so the backlight intensity of the LCD.
Installation
This driver is now installed by default on the standard Armadeus rootfs. So, following instructions are only given as reference.
$ make linux26-menuconfig
- in Device Drivers ---> Graphics support ---> Backlight & LCD device support, select <M> Lowlevel Backlight controls
- in Device Drivers ---> Armadeus specific drivers ---> Support for specific Armadeus drivers, select <M> i.MX backlight driver
- If built in kernel, reflash your kernel image; if selected as module either reflash your rootfs or copy backlight.ko, imx_bl.ko and .../lib/modules/2.6.18.1/modules.dep to your target (for more infos: Linux_drivers_generalities).
Usage
On your APF, load the module:
# modprobe imx_bl i.MX Backlight driver v0.X initialized.
All backlight controls are done through the /sys interface:
# ls /sys/class/backlight/imxl-bl/ actual_brightness max_brightness subsystem brightness power uevent
- To see the actual brightness:
# cat /sys/class/backlight/imxl-bl/actual_brightness
- To see the max allowed brightness:
# cat /sys/class/backlight/imxl-bl/max_brightness
- To change the brightness:
# echo 100 > /sys/class/backlight/imxl-bl/brightness
There is a small test script in target/linux/modules/backlight/test/