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
resources:tools-software:linux-drivers:backlight:adp8860 [05 Sep 2012 11:22] – change source git repo Michael Hennerichresources:tools-software:linux-drivers:backlight:adp8860 [11 Feb 2016 21:13] (current) – [Status] Lars-Peter Clausen
Line 43: Line 43:
 ===== Status ===== ===== Status =====
  
- Source   Mainlined?  +^ Source ^ Mainlined? ^ 
-| [[git.linux.org>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 103: Line 103:
 {{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 127:
 } }
 </code> </code>
- 
 ====== Adding Linux driver support ====== ====== Adding Linux driver support ======
  
Line 134: Line 133:
 "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>
 Device Drivers  ---> Device Drivers  --->
  Graphics support  --->  Graphics support  --->
- [*] Backlight & LCD device support  ---====== ADP8860 Back-light LED Linux Driver ======+ [*] Backlight & LCD device support  --- 
 +</xterm> 
 + 
 +====== ADP8860 Back-light LED Linux Driver ======
  
 ===== Supported Devices ===== ===== Supported Devices =====
Line 246: 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 277: 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 418: Line 420:
  
 ====== More Information ====== ====== More Information ======
- 
-> 
- <*>   Lowlevel Backlight controls 
- <M>   Backlight Driver for ADP8860 using WLED 
-</xterm> 
- 
-====== Hardware configuration ====== 
- 
-During test and driver development we used the ADP8860 Evaluation Mother/Daughter Board. 
- 
-{{:software:driver:linux:adp8870_adaptor_board_lr.jpg?512|}} 
- 
-It can be easily wired to the Blackfin STAMP TWI/I2C header. 
- 
-^ BF537-STAMP (P10) TWI/I2C header  ^^ ADP886x Adaptor Board (J30) ^ 
-^ PIN ^ Function ^ PIN/Function ^ 
-| 5 | SCL | SCL | 
-| 6 | SDA| SDA | 
-| 20 | GND | GND | 
- 
-Leave J31 and J32 open (these jumpers connect the SCL and SDA to the cypress chip used as USB bridge).  Then apply your own SCL, SDA, and GND to the big J30 connector on the left edge of the board. 
- 
-The ADP8860 chip still needs Vin (to power the chip), Vddio (to pull nRST and nINT high), and Vboard (to power the ALS sensor on the daughter card).  These are provided through the USB port and then get regulated down (Vin becomes 3.6V, Vddio is 2.7V, and Vboard is around 4 V). So even though you won't be using the USB to program the part, it would still be easiest to plug the board into a USB port just to power Vin, Vddio, and Vboard.  Of course, if you want, you can power these supplies from a lab bench power supply.  In that case, move LK1, 2, and 3 to the "EXT" position and apply the signals to J29. 
- 
- 
-====== Driver testing ====== 
- 
-===== Driver compiled as a module ===== 
- 
-**ADP8860 driver is build as a module** 
-<xterm> 
-root:/> **modprobe adp8860_bl** 
-adp8860_bl 0-002a: Rev.7 Backlight 
-Registered led device: adp8860-led7 
-root:/> 
-</xterm> 
- 
-==== Example Backlight usage ==== 
- 
-<xterm> 
-root:/> cd sys/class/backlight/adp8860_bl/ 
-root:/sys/devices/platform/i2c-bfin-twi.0/i2c-adapter/i2c-0/0-002a/backlight/adp8860_bl> ls -l 
--r--r--r--    1 root     root         4096 Jan  1 03:29 actual_brightness 
--r--r--r--    1 root     root         4096 Jan  1 03:29 ambient_light_level 
--rw-rw-r--    1 root     root         4096 Jan  1 03:29 ambient_light_zone 
--rw-r--r--    1 root     root         4096 Jan  1 03:31 bl_power 
--rw-r--r--    1 root     root         4096 Jan  1 04:55 brightness 
-lrwxrwxrwx    1 root     root            0 Jan  1 03:29 device -> ../../../0-002a 
--rw-rw-r--    1 root     root         4096 Jan  1 03:29 l1_daylight_dim 
--rw-rw-r--    1 root     root         4096 Jan  1 03:29 l1_daylight_max 
--rw-rw-r--    1 root     root         4096 Jan  1 03:30 l2_office_dim 
--rw-rw-r--    1 root     root         4096 Jan  1 03:29 l2_office_max 
--rw-rw-r--    1 root     root         4096 Jan  1 03:31 l3_dark_dim 
--rw-rw-r--    1 root     root         4096 Jan  1 03:29 l3_dark_max 
--r--r--r--    1 root     root         4096 Jan  1 03:29 max_brightness 
-drwxr-xr-x    2 root     root            0 Jan  1 03:29 power 
-lrwxrwxrwx    1 root     root            0 Jan  1 03:29 subsystem -> ../../../../../../../../class/backlight 
--rw-r--r--    1 root     root         4096 Jan  1 03:29 uevent 
-root:/sys/devices/platform/i2c-bfin-twi.0/i2c-adapter/i2c-0/0-002a/backlight/adp8860_bl> 
-</xterm> 
- 
-=== Set Backlight Intensity === 
- 
-<xterm> 
-root:/sys/devices/platform/i2c-bfin-twi.0/i2c-adapter/i2c-0/0-002a/backlight/adp8860_bl> **echo 42 > brightness** 
-</xterm> 
- 
-=== Query Backlight Intensity === 
- 
-<xterm> 
-root:/sys/devices/platform/i2c-bfin-twi.0/i2c-adapter/i2c-0/0-002a/backlight/adp8860_bl> **cat brightness** 
-42 
-</xterm> 
- 
-=== Enable Ambient Light Sensing Feature === 
- 
-<xterm> 
-root:/sys/devices/platform/i2c-bfin-twi.0/i2c-adapter/i2c-0/0-002a/backlight/adp8860_bl> **echo 127 > brightness** 
-</xterm> 
- 
-=== Query Ambient Light Level === 
- 
-<xterm> 
-root:/sys/devices/platform/i2c-bfin-twi.0/i2c-adapter/i2c-0/0-002a/backlight/adp8860_bl> **cat ambient_light_level** 
-1276 
-</xterm> 
- 
-=== Query Ambient Light Zone === 
- 
-<xterm> 
-root:/sys/devices/platform/i2c-bfin-twi.0/i2c-adapter/i2c-0/0-002a/backlight/adp8860_bl> **cat ambient_light_zone** 
-2 
-</xterm> 
- 
-=== Adjust Intensity for Ambient Light Zone 2 (office) === 
- 
-<xterm> 
-root:/sys/devices/platform/i2c-bfin-twi.0/i2c-adapter/i2c-0/0-002a/backlight/adp8860_bl> **echo 22 > l2_office_max** 
-22 
-</xterm> 
- 
-<xterm> 
-root:/sys/devices/platform/i2c-bfin-twi.0/i2c-adapter/i2c-0/0-002a/backlight/adp8860_bl> **cat l2_office_max** 
-22 
-</xterm> 
- 
-==== Example LED usage ==== 
-<xterm> 
-root:/> cd /sys/class/leds/adp8860-led7/ 
-root:/sys/devices/platform/i2c-bfin-twi.0/i2c-adapter/i2c-0/0-002a/leds/adp8860-led7> ls -l 
--rw-r--r--    1 root     root         4096 Jan  1 03:29 brightness 
-lrwxrwxrwx    1 root     root            0 Jan  1 03:29 device -> ../../../0-002a 
--r--r--r--    1 root     root         4096 Jan  1 03:29 max_brightness 
-drwxr-xr-x    2 root     root            0 Jan  1 03:29 power 
-lrwxrwxrwx    1 root     root            0 Jan  1 03:29 subsystem -> ../../../../../../../../class/leds 
-</xterm> 
- 
-=== Set Intensity === 
- 
-<xterm> 
-root:/sys/devices/platform/i2c-bfin-twi.0/i2c-adapter/i2c-0/0-002a/leds/adp8860-led7>**echo 99 > brightness** 
-</xterm> 
-=== Turn LED OFF === 
-<xterm> 
-root:/sys/devices/platform/i2c-bfin-twi.0/i2c-adapter/i2c-0/0-002a/leds/adp8860-led7> **echo 0 > brightness** 
-</xterm> 
-=== Query Max Brightness === 
-<xterm> 
-root:/sys/devices/platform/i2c-bfin-twi.0/i2c-adapter/i2c-0/0-002a/leds/adp8860-led7> **cat max_brightness** 
-255 
-root:/sys/devices/platform/i2c-bfin-twi.0/i2c-adapter/i2c-0/0-002a/leds/adp8860-led7> 
-</xterm> 
- 
-====== More Information ====== 
- 
  
resources/tools-software/linux-drivers/backlight/adp8860.1346836960.txt.gz · Last modified: 05 Sep 2012 11:22 by Michael Hennerich