Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
software:driver:linux:adp8860 [28 Apr 2011 19:01] – only avalible via git Robin Getzresources:tools-software:linux-drivers:backlight:adp8860 [11 Feb 2016 21:13] (current) – [Status] Lars-Peter Clausen
Line 1: Line 1:
-====== ADP8860 driver ======+====== ADP8860 Back-light LED Linux Driver ======
  
 ===== Supported Devices ===== ===== Supported Devices =====
  
-This driver supports the [[:power-management:display-and-lighting:ADP8860]] [[:power-management:display-and-lighting:ADP8861]] [[:power-management:portable-power-solutions:ADP8863]].+  * [[adi>ADP8860]] 
 +  * [[adi>ADP8861]] 
 +  * [[adi>ADP8863]]
  
 +===== Evaluation Boards =====
  
 +  * [[adi>ADP8860DBCB-EVALZ]]
 +  * [[adi>ADP8860DBCP-EVALZ]]
 +  * [[adi>ADP8861DBCB-EVALZ]]
 +  * [[adi>ADP8863DBCB-EVALZ]]
 +  * [[adi>ADP8863DBCP-EVALZ]]
 ===== Description ===== ===== Description =====
  
-{{adp8860_typical_operating_circuit.png|}}+{{:software:driver:linux: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/Intensity in 128 steps  | ✔ | ✔ | ✔ | 
 + 
 +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/Intensity in 128 steps from [0..255]  | ✔ | ✔ | ✔ | 
 + 
 +====== Source Code ====== 
 + 
 +===== Status ===== 
 + 
 +^ Source ^ Mainlined? ^ 
 +| [[git.linux.org>drivers/video/backlight/adp8860_bl.c|git]] | [[git.linux.org>drivers/video/backlight/adp8860_bl.c|Yes]] | 
 + 
 +===== Files ===== 
 + 
 +^ Function ^ File ^ 
 +| driver  | [[git.linux.org>drivers/video/backlight/adp8860_bl.c]] | 
 +| include | [[git.linux.org>include/linux/i2c/adp8860.h]] | 
 + 
 +====== Instructions / Theory of operation ====== 
 + 
 + 
 +===== Backlight control ===== 
 + 
 +With the ADP8860 driver installed, you will find sysfs files in the\\ 
 +/sys/class/backlight/adp8860_bl/\\ 
 +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 /sys/class/leds/. The brightness file will 
 +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/Documentaion/leds-class.txt 
 + 
 +  ; **brightness** : get/set LED brightness (an integer between 0 and 255) 
 +  ; **max_brightness** : the maximum brightness value. 
 + 
 + 
 +====== Example platform device initialization ====== 
 + 
 +{{page>software/linux/docs/platform_and_bus_model#Platform Data&noheader&firstseconly&noeditbtn}} 
 + 
 +<WRAP info> 
 +**platform_data: Platform data specific to the ADP8860 device.**\\ 
 +Includes what LEDs are available, feature selections and default initialization. 
 +</WRAP> 
 + 
 +<code c> 
 +#include <linux/i2c/adp8860.h> 
 +</code> 
 + 
 +<source trunk/arch/blackfin/mach-bf537/boards/stamp.c:adp8860_leds{} c linux-kernel> 
 +<source trunk/arch/blackfin/mach-bf537/boards/stamp.c:adp8860_pdata{} c linux-kernel> 
 + 
 +{{page>software/linux/docs/platform_and_bus_model#Declaring I2C devices&firstseconly&noeditbtn}} 
 + 
 +<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("adp8860", 0x2A), 
 + .platform_data = (void *)&adp8860_pdata, 
 + }, 
 +#endif 
 +
 +</code> 
 +====== Adding Linux driver support ====== 
 + 
 + 
 +Configure kernel with "make menuconfig" (alternatively use "make xconfig" or 
 +"make qconfig"
 + 
 +<WRAP tip> 
 +The ADP8860 Backlight driver depends on I2C. 
 +It therefore requires selected I2C support to show up during kernel configuration. 
 +</WRAP> 
 + 
 +<xterm> 
 +Device Drivers  ---> 
 + Graphics support  ---> 
 + [*] Backlight & LCD device support  --- 
 +</xterm> 
 + 
 +====== ADP8860 Back-light LED Linux Driver ====== 
 + 
 +===== Supported Devices ===== 
 + 
 +  * [[adi>ADP8860]] 
 +  * [[adi>ADP8861]] 
 +  * [[adi>ADP8863]] 
 + 
 +===== Evaluation Boards ===== 
 + 
 +  * [[adi>ADP8860DBCB-EVALZ]] 
 +  * [[adi>ADP8860DBCP-EVALZ]] 
 +  * [[adi>ADP8861DBCB-EVALZ]] 
 +  * [[adi>ADP8863DBCB-EVALZ]] 
 +  * [[adi>ADP8863DBCP-EVALZ]] 
 +===== Description =====
  
 +{{:software:driver:linux:adp8860_typical_operating_circuit.png|}}
 ===== Configuration ===== ===== Configuration =====
  
Line 37: Line 189:
  
 ^  Source  ^  Mainlined?  ^ ^  Source  ^  Mainlined?  ^
-| [[bfgit>linux-kernel?drivers/video/backlight/adp8860_bl.c|git]] |  [[git.linux.org>drivers/video/backlight/adp8860_bl.c|Yes]]  |+| [[git.linux.org>drivers/video/backlight/adp8860_bl.c|git]] |  [[git.linux.org>drivers/video/backlight/adp8860_bl.c|Yes]]  |
  
 ===== Files ===== ===== Files =====
Line 96: Line 248:
 {{page>software/linux/docs/platform_and_bus_model#Platform Data&noheader&firstseconly&noeditbtn}} {{page>software/linux/docs/platform_and_bus_model#Platform Data&noheader&firstseconly&noeditbtn}}
  
-<note info>+<WRAP info>
 **platform_data: Platform data specific to the ADP8860 device.**\\ **platform_data: Platform data specific to the ADP8860 device.**\\
 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>
  
 <xterm> <xterm>
Line 144: Line 296:
 During test and driver development we used the ADP8860 Evaluation Mother/Daughter Board. During test and driver development we used the ADP8860 Evaluation Mother/Daughter Board.
  
-{{adp8870_adaptor_board_lr.jpg?512|}}+{{:software:driver:linux:adp8870_adaptor_board_lr.jpg?512|}}
  
 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 ======
- 
  
resources/tools-software/linux-drivers/backlight/adp8860.1304010067.txt.gz · Last modified: 28 Apr 2011 19:01 by Robin Getz