0001 ====================
0002 Kernel driver lp3944
0003 ====================
0004
0005 * National Semiconductor LP3944 Fun-light Chip
0006
0007 Prefix: 'lp3944'
0008
0009 Addresses scanned: None (see the Notes section below)
0010
0011 Datasheet:
0012
0013 Publicly available at the National Semiconductor website
0014 http://www.national.com/pf/LP/LP3944.html
0015
0016 Authors:
0017 Antonio Ospite <ospite@studenti.unina.it>
0018
0019
0020 Description
0021 -----------
0022 The LP3944 is a helper chip that can drive up to 8 leds, with two programmable
0023 DIM modes; it could even be used as a gpio expander but this driver assumes it
0024 is used as a led controller.
0025
0026 The DIM modes are used to set _blink_ patterns for leds, the pattern is
0027 specified supplying two parameters:
0028
0029 - period:
0030 from 0s to 1.6s
0031 - duty cycle:
0032 percentage of the period the led is on, from 0 to 100
0033
0034 Setting a led in DIM0 or DIM1 mode makes it blink according to the pattern.
0035 See the datasheet for details.
0036
0037 LP3944 can be found on Motorola A910 smartphone, where it drives the rgb
0038 leds, the camera flash light and the lcds power.
0039
0040
0041 Notes
0042 -----
0043 The chip is used mainly in embedded contexts, so this driver expects it is
0044 registered using the i2c_board_info mechanism.
0045
0046 To register the chip at address 0x60 on adapter 0, set the platform data
0047 according to include/linux/leds-lp3944.h, set the i2c board info::
0048
0049 static struct i2c_board_info a910_i2c_board_info[] __initdata = {
0050 {
0051 I2C_BOARD_INFO("lp3944", 0x60),
0052 .platform_data = &a910_lp3944_leds,
0053 },
0054 };
0055
0056 and register it in the platform init function::
0057
0058 i2c_register_board_info(0, a910_i2c_board_info,
0059 ARRAY_SIZE(a910_i2c_board_info));