1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Simple driver for Texas Instruments LM3630 LED Flash driver chip
4 * Copyright (C) 2012 Texas Instruments
7 #ifndef __LINUX_LM3639_H
8 #define __LINUX_LM3639_H
10 #define LM3639_NAME "lm3639_bl"
13 LM3639_PWM_DISABLE
= 0x00,
14 LM3639_PWM_EN_ACTLOW
= 0x48,
15 LM3639_PWM_EN_ACTHIGH
= 0x40,
19 LM3639_STROBE_DISABLE
= 0x00,
20 LM3639_STROBE_EN_ACTLOW
= 0x10,
21 LM3639_STROBE_EN_ACTHIGH
= 0x30,
25 LM3639_TXPIN_DISABLE
= 0x00,
26 LM3639_TXPIN_EN_ACTLOW
= 0x04,
27 LM3639_TXPIN_EN_ACTHIGH
= 0x0C,
31 LM3639_FLED_DIASBLE_ALL
= 0x00,
32 LM3639_FLED_EN_1
= 0x40,
33 LM3639_FLED_EN_2
= 0x20,
34 LM3639_FLED_EN_ALL
= 0x60,
38 LM3639_BLED_DIASBLE_ALL
= 0x00,
39 LM3639_BLED_EN_1
= 0x10,
40 LM3639_BLED_EN_2
= 0x08,
41 LM3639_BLED_EN_ALL
= 0x18,
43 enum lm3639_bled_mode
{
44 LM3639_BLED_MODE_EXPONETIAL
= 0x00,
45 LM3639_BLED_MODE_LINEAR
= 0x10,
48 struct lm3639_platform_data
{
49 unsigned int max_brt_led
;
50 unsigned int init_brt_led
;
53 enum lm3639_pwm pin_pwm
;
54 enum lm3639_strobe pin_strobe
;
55 enum lm3639_txpin pin_tx
;
58 enum lm3639_fleds fled_pins
;
59 enum lm3639_bleds bled_pins
;
60 enum lm3639_bled_mode bled_mode
;
62 void (*pwm_set_intensity
) (int brightness
, int max_brightness
);
63 int (*pwm_get_intensity
) (void);
65 #endif /* __LINUX_LM3639_H */