2 * Simple driver for Texas Instruments LM3630A LED Flash driver chip
3 * Copyright (C) 2012 Texas Instruments
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
11 #ifndef __LINUX_LM3630A_H
12 #define __LINUX_LM3630A_H
14 #define LM3630A_NAME "lm3630a_bl"
16 enum lm3630a_pwm_ctrl
{
17 LM3630A_PWM_DISABLE
= 0x00,
21 LM3630A_PWM_BANK_A_ACT_LOW
= 0x05,
22 LM3630A_PWM_BANK_B_ACT_LOW
,
23 LM3630A_PWM_BANK_ALL_ACT_LOW
,
26 enum lm3630a_leda_ctrl
{
27 LM3630A_LEDA_DISABLE
= 0x00,
28 LM3630A_LEDA_ENABLE
= 0x04,
29 LM3630A_LEDA_ENABLE_LINEAR
= 0x14,
32 enum lm3630a_ledb_ctrl
{
33 LM3630A_LEDB_DISABLE
= 0x00,
34 LM3630A_LEDB_ON_A
= 0x01,
35 LM3630A_LEDB_ENABLE
= 0x02,
36 LM3630A_LEDB_ENABLE_LINEAR
= 0x0A,
39 #define LM3630A_MAX_BRIGHTNESS 255
41 *@leda_init_brt : led a init brightness. 4~255
42 *@leda_max_brt : led a max brightness. 4~255
43 *@leda_ctrl : led a disable, enable linear, enable exponential
44 *@ledb_init_brt : led b init brightness. 4~255
45 *@ledb_max_brt : led b max brightness. 4~255
46 *@ledb_ctrl : led b disable, enable linear, enable exponential
47 *@pwm_period : pwm period
48 *@pwm_ctrl : pwm disable, bank a or b, active high or low
50 struct lm3630a_platform_data
{
55 enum lm3630a_leda_ctrl leda_ctrl
;
59 enum lm3630a_ledb_ctrl ledb_ctrl
;
61 unsigned int pwm_period
;
62 enum lm3630a_pwm_ctrl pwm_ctrl
;
65 #endif /* __LINUX_LM3630A_H */