2 * Simple driver for Texas Instruments LM3630 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_LM3639_H
12 #define __LINUX_LM3639_H
14 #define LM3639_NAME "lm3639_bl"
17 LM3639_PWM_DISABLE
= 0x00,
18 LM3639_PWM_EN_ACTLOW
= 0x48,
19 LM3639_PWM_EN_ACTHIGH
= 0x40,
23 LM3639_STROBE_DISABLE
= 0x00,
24 LM3639_STROBE_EN_ACTLOW
= 0x10,
25 LM3639_STROBE_EN_ACTHIGH
= 0x30,
29 LM3639_TXPIN_DISABLE
= 0x00,
30 LM3639_TXPIN_EN_ACTLOW
= 0x04,
31 LM3639_TXPIN_EN_ACTHIGH
= 0x0C,
35 LM3639_FLED_DIASBLE_ALL
= 0x00,
36 LM3639_FLED_EN_1
= 0x40,
37 LM3639_FLED_EN_2
= 0x20,
38 LM3639_FLED_EN_ALL
= 0x60,
42 LM3639_BLED_DIASBLE_ALL
= 0x00,
43 LM3639_BLED_EN_1
= 0x10,
44 LM3639_BLED_EN_2
= 0x08,
45 LM3639_BLED_EN_ALL
= 0x18,
47 enum lm3639_bled_mode
{
48 LM3639_BLED_MODE_EXPONETIAL
= 0x00,
49 LM3639_BLED_MODE_LINEAR
= 0x10,
52 struct lm3639_platform_data
{
53 unsigned int max_brt_led
;
54 unsigned int init_brt_led
;
57 enum lm3639_pwm pin_pwm
;
58 enum lm3639_strobe pin_strobe
;
59 enum lm3639_txpin pin_tx
;
62 enum lm3639_fleds fled_pins
;
63 enum lm3639_bleds bled_pins
;
64 enum lm3639_bled_mode bled_mode
;
66 void (*pwm_set_intensity
) (int brightness
, int max_brightness
);
67 int (*pwm_get_intensity
) (void);
69 #endif /* __LINUX_LM3639_H */