0001 ====================
0002 Kernel driver lp855x
0003 ====================
0004
0005 Backlight driver for LP855x ICs
0006
0007 Supported chips:
0008
0009 Texas Instruments LP8550, LP8551, LP8552, LP8553, LP8555, LP8556 and
0010 LP8557
0011
0012 Author: Milo(Woogyom) Kim <milo.kim@ti.com>
0013
0014 Description
0015 -----------
0016
0017 * Brightness control
0018
0019 Brightness can be controlled by the pwm input or the i2c command.
0020 The lp855x driver supports both cases.
0021
0022 * Device attributes
0023
0024 1) bl_ctl_mode
0025
0026 Backlight control mode.
0027
0028 Value: pwm based or register based
0029
0030 2) chip_id
0031
0032 The lp855x chip id.
0033
0034 Value: lp8550/lp8551/lp8552/lp8553/lp8555/lp8556/lp8557
0035
0036 Platform data for lp855x
0037 ------------------------
0038
0039 For supporting platform specific data, the lp855x platform data can be used.
0040
0041 * name:
0042 Backlight driver name. If it is not defined, default name is set.
0043 * device_control:
0044 Value of DEVICE CONTROL register.
0045 * initial_brightness:
0046 Initial value of backlight brightness.
0047 * period_ns:
0048 Platform specific PWM period value. unit is nano.
0049 Only valid when brightness is pwm input mode.
0050 * size_program:
0051 Total size of lp855x_rom_data.
0052 * rom_data:
0053 List of new eeprom/eprom registers.
0054
0055 Examples
0056 ========
0057
0058 1) lp8552 platform data: i2c register mode with new eeprom data::
0059
0060 #define EEPROM_A5_ADDR 0xA5
0061 #define EEPROM_A5_VAL 0x4f /* EN_VSYNC=0 */
0062
0063 static struct lp855x_rom_data lp8552_eeprom_arr[] = {
0064 {EEPROM_A5_ADDR, EEPROM_A5_VAL},
0065 };
0066
0067 static struct lp855x_platform_data lp8552_pdata = {
0068 .name = "lcd-bl",
0069 .device_control = I2C_CONFIG(LP8552),
0070 .initial_brightness = INITIAL_BRT,
0071 .size_program = ARRAY_SIZE(lp8552_eeprom_arr),
0072 .rom_data = lp8552_eeprom_arr,
0073 };
0074
0075 2) lp8556 platform data: pwm input mode with default rom data::
0076
0077 static struct lp855x_platform_data lp8556_pdata = {
0078 .device_control = PWM_CONFIG(LP8556),
0079 .initial_brightness = INITIAL_BRT,
0080 .period_ns = 1000000,
0081 };