blob: c2f87dc1a3a9229db55794a4ccba21a68214c58e [file] [log] [blame]
Mauro Carvalho Chehab8dab9192019-06-28 09:20:20 -03001====================
Antonio Ospite5054d392009-06-19 13:55:42 +02002Kernel driver lp3944
3====================
4
5 * National Semiconductor LP3944 Fun-light Chip
Mauro Carvalho Chehab8dab9192019-06-28 09:20:20 -03006
Antonio Ospite5054d392009-06-19 13:55:42 +02007 Prefix: 'lp3944'
Mauro Carvalho Chehab8dab9192019-06-28 09:20:20 -03008
Antonio Ospite5054d392009-06-19 13:55:42 +02009 Addresses scanned: None (see the Notes section below)
Mauro Carvalho Chehab8dab9192019-06-28 09:20:20 -030010
11 Datasheet:
12
13 Publicly available at the National Semiconductor website
14 http://www.national.com/pf/LP/LP3944.html
Antonio Ospite5054d392009-06-19 13:55:42 +020015
16Authors:
Mauro Carvalho Chehab8dab9192019-06-28 09:20:20 -030017 Antonio Ospite <ospite@studenti.unina.it>
Antonio Ospite5054d392009-06-19 13:55:42 +020018
19
20Description
21-----------
22The LP3944 is a helper chip that can drive up to 8 leds, with two programmable
23DIM modes; it could even be used as a gpio expander but this driver assumes it
24is used as a led controller.
25
26The DIM modes are used to set _blink_ patterns for leds, the pattern is
27specified supplying two parameters:
Mauro Carvalho Chehab8dab9192019-06-28 09:20:20 -030028
29 - period:
30 from 0s to 1.6s
31 - duty cycle:
32 percentage of the period the led is on, from 0 to 100
Antonio Ospite5054d392009-06-19 13:55:42 +020033
34Setting a led in DIM0 or DIM1 mode makes it blink according to the pattern.
35See the datasheet for details.
36
37LP3944 can be found on Motorola A910 smartphone, where it drives the rgb
38leds, the camera flash light and the lcds power.
39
40
41Notes
42-----
43The chip is used mainly in embedded contexts, so this driver expects it is
44registered using the i2c_board_info mechanism.
45
46To register the chip at address 0x60 on adapter 0, set the platform data
Mauro Carvalho Chehab8dab9192019-06-28 09:20:20 -030047according to include/linux/leds-lp3944.h, set the i2c board info::
Antonio Ospite5054d392009-06-19 13:55:42 +020048
Sachin Kamateb967b62013-08-09 09:19:33 -070049 static struct i2c_board_info a910_i2c_board_info[] __initdata = {
Antonio Ospite5054d392009-06-19 13:55:42 +020050 {
51 I2C_BOARD_INFO("lp3944", 0x60),
52 .platform_data = &a910_lp3944_leds,
53 },
54 };
55
Mauro Carvalho Chehab8dab9192019-06-28 09:20:20 -030056and register it in the platform init function::
Antonio Ospite5054d392009-06-19 13:55:42 +020057
58 i2c_register_board_info(0, a910_i2c_board_info,
59 ARRAY_SIZE(a910_i2c_board_info));