This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
software:driver:linux:adp8860 [28 Apr 2011 19:01] – only avalible via git Robin Getz | resources:tools-software:linux-drivers:backlight:adp8860 [11 Feb 2016 21:13] (current) – [Status] Lars-Peter Clausen | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== ADP8860 | + | ====== ADP8860 |
===== Supported Devices ===== | ===== Supported Devices ===== | ||
- | This driver supports the [[: | + | * [[adi>ADP8860]] |
+ | * [[adi>ADP8861]] | ||
+ | * [[adi>ADP8863]] | ||
+ | ===== Evaluation Boards ===== | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
===== Description ===== | ===== Description ===== | ||
- | {{adp8860_typical_operating_circuit.png|}} | + | {{: |
+ | ===== Configuration ===== | ||
+ | |||
+ | |||
+ | ===== Software configurable features ===== | ||
+ | |||
+ | Backlight: | ||
+ | ^ Feature ^ ADP8860 ^ ADP8863 ^ ADP8861 ^ | ||
+ | | Ambient Light Sensor Support (ALS) | ✔ | ✔ | ✘ | | ||
+ | | Three programmable ambient light sensing \\ zones for optimal backlight power savings | ✔ | ✔ | ✘ | | ||
+ | | Configurable Fade On/Off times | ✔ | ✔ | ✔ | | ||
+ | | Configurable Fade Law functions | ||
+ | | Configurable ALS filter settings | ✔ | ✔ | ✘ | | ||
+ | | Configurable Brightness/ | ||
+ | |||
+ | LED: | ||
+ | ^ Feature ^ ADP8860 ^ ADP8863 ^ ADP8861 ^ | ||
+ | | Up to 7 LEDs configurable | ||
+ | | Configurable Fade On/Off times | ✔ | ✔ | ✔ | | ||
+ | | LED Blink On/Off times | ✔ | ✔ | ✔ | | ||
+ | | Configurable Fade Law functions | ||
+ | | Configurable Brightness/ | ||
+ | |||
+ | ====== Source Code ====== | ||
+ | |||
+ | ===== Status ===== | ||
+ | |||
+ | ^ Source ^ Mainlined? ^ | ||
+ | | [[git.linux.org> | ||
+ | |||
+ | ===== Files ===== | ||
+ | |||
+ | ^ Function ^ File ^ | ||
+ | | driver | ||
+ | | include | [[git.linux.org> | ||
+ | |||
+ | ====== Instructions / Theory of operation ====== | ||
+ | |||
+ | |||
+ | ===== Backlight control ===== | ||
+ | |||
+ | With the ADP8860 driver installed, you will find sysfs files in the\\ | ||
+ | / | ||
+ | directory. You will be able to query and set the current screen\\ | ||
+ | brightness: | ||
+ | |||
+ | ; **brightness** : get/set screen brightness (an integer between 0 and 126)\\ writing 127 will enable the Ambient Light Sensor. | ||
+ | ; **actual_brightness** : reading from this file will query the HW to get real brightness value. | ||
+ | ; **max_brightness** : the maximum brightness value. | ||
+ | ; **bl_power** : Current FB Power mode (0: full on, 1..3: power saving modes; 4: full off). | ||
+ | |||
+ | ==== ADP8860 Specific Backlight controls ==== | ||
+ | |||
+ | The ADP8860 features 3 individually programmable Ambient Light Sensing Zones: | ||
+ | |||
+ | |||
+ | ; **l1_daylight_dim** : Ambient Light | ||
+ | Zone Daylight: Backlight DIM Intensity (an integer between 0 and 127, typically set to 0). | ||
+ | ; **l1_daylight_max** : Ambient Light Zone Daylight: Backlight Intensity (an integer between 0 and 127). | ||
+ | ; **l2_office_dim** : Ambient Light Zone Office: Backlight DIM Intensity (an integer between 0 and 127, typically set to 0) | ||
+ | ; **l2_office_max** : Ambient Light Zone Office: Backlight Intensity (an integer between 0 and 127) | ||
+ | ; **l3_dark_dim** : Ambient Light Zone Dark: Backlight DIM Intensity (an integer between 0 and 127, typically set to 0) | ||
+ | ; **l3_dark_max** : Ambient Light Zone Dark: Backlight Intensity (an integer between 0 and 127) | ||
+ | |||
+ | |||
+ | ; **ambient_light_level** : Get conversion value of the first light sensor. This value is updated every 80 ms \\ (when the light sensor is enabled). Returns integer between 0 (dark) and 8000 (max ambient brightness) | ||
+ | ; **ambient_light_zone** : Get/Set current Ambient Light Zone. Reading returns integer between 1..3 \\ (1 = Daylight, 2 = office, 3 = dark). Writing a value between 1..3 forces the Backlight controller \\ to enter the corresponding Ambient Light Zone. Writing 0 returns to normal operation. | ||
+ | |||
+ | ===== LED handling under Linux ===== | ||
+ | |||
+ | LEDs not assigned to the Backlight are optionally exposed to the Linux LEDs Class.\\ | ||
+ | |||
+ | The LED class allows control of LEDs from userspace. | ||
+ | LEDs appear in / | ||
+ | set the brightness of the LED (taking a value 0-255). | ||
+ | The LEDS class also introduces the optional concept of an LED trigger. A trigger | ||
+ | is a kernel based source of led events, such as ide-disk or backlight control.\\ | ||
+ | For more information read linux/ | ||
+ | |||
+ | ; **brightness** : get/set LED brightness (an integer between 0 and 255) | ||
+ | ; **max_brightness** : the maximum brightness value. | ||
+ | |||
+ | |||
+ | ====== Example platform device initialization ====== | ||
+ | |||
+ | {{page> | ||
+ | |||
+ | <WRAP info> | ||
+ | **platform_data: | ||
+ | Includes what LEDs are available, feature selections and default initialization. | ||
+ | </ | ||
+ | |||
+ | <code c> | ||
+ | #include < | ||
+ | </ | ||
+ | |||
+ | <source trunk/ | ||
+ | <source trunk/ | ||
+ | |||
+ | {{page> | ||
+ | |||
+ | <code C> | ||
+ | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | ||
+ | #if defined(CONFIG_BACKLIGHT_ADP8860) || defined(CONFIG_BACKLIGHT_ADP8860_MODULE) | ||
+ | { | ||
+ | I2C_BOARD_INFO(" | ||
+ | .platform_data = (void *)& | ||
+ | }, | ||
+ | #endif | ||
+ | } | ||
+ | </ | ||
+ | ====== Adding Linux driver support ====== | ||
+ | |||
+ | |||
+ | Configure kernel with "make menuconfig" | ||
+ | "make qconfig" | ||
+ | |||
+ | <WRAP tip> | ||
+ | The ADP8860 Backlight driver depends on I2C. | ||
+ | It therefore requires selected I2C support to show up during kernel configuration. | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | Device Drivers | ||
+ | Graphics support | ||
+ | [*] Backlight & LCD device support | ||
+ | </ | ||
+ | |||
+ | ====== ADP8860 Back-light LED Linux Driver ====== | ||
+ | |||
+ | ===== Supported Devices ===== | ||
+ | |||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | |||
+ | ===== Evaluation Boards ===== | ||
+ | |||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | * [[adi> | ||
+ | ===== Description ===== | ||
+ | {{: | ||
===== Configuration ===== | ===== Configuration ===== | ||
Line 37: | Line 189: | ||
^ Source | ^ Source | ||
- | | [[bfgit>linux-kernel?drivers/ | + | | [[git.linux.org>drivers/ |
===== Files ===== | ===== Files ===== | ||
Line 96: | Line 248: | ||
{{page> | {{page> | ||
- | <note info> | + | <WRAP info> |
**platform_data: | **platform_data: | ||
Includes what LEDs are available, feature selections and default initialization. | Includes what LEDs are available, feature selections and default initialization. | ||
- | </note> | + | </WRAP> |
<code c> | <code c> | ||
Line 127: | Line 279: | ||
"make qconfig" | "make qconfig" | ||
- | <note tip> | + | <WRAP tip> |
The ADP8860 Backlight driver depends on I2C. | The ADP8860 Backlight driver depends on I2C. | ||
It therefore requires selected I2C support to show up during kernel configuration. | It therefore requires selected I2C support to show up during kernel configuration. | ||
- | </note> | + | </WRAP> |
< | < | ||
Line 144: | Line 296: | ||
During test and driver development we used the ADP8860 Evaluation Mother/ | During test and driver development we used the ADP8860 Evaluation Mother/ | ||
- | {{adp8870_adaptor_board_lr.jpg? | + | {{: |
It can be easily wired to the Blackfin STAMP TWI/I2C header. | It can be easily wired to the Blackfin STAMP TWI/I2C header. | ||
Line 268: | Line 420: | ||
====== More Information ====== | ====== More Information ====== | ||
- | |||