Commit 0f59858d authored by G.Shark Jeong's avatar G.Shark Jeong Committed by Linus Torvalds

backlight: add new lm3639 backlight driver

This driver is a general version for LM3639 backlgiht + flash driver chip
of TI.

LM3639:
The LM3639 is a single chip LCD Display Backlight driver + white LED
Camera driver.  Programming is done over an I2C compatible interface.
www.ti.com

[akpm@linux-foundation.org: code layout tweaks]
Signed-off-by: default avatarG.Shark Jeong <gshark.jeong@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Daniel Jeong <daniel.jeong@ti.com>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0c2a665a
......@@ -359,6 +359,15 @@ config BACKLIGHT_LM3630
help
This supports TI LM3630 Backlight Driver
config BACKLIGHT_LM3639
tristate "Backlight Driver for LM3639"
depends on BACKLIGHT_CLASS_DEVICE && I2C
select REGMAP_I2C
select NEW_LEDS
select LEDS_CLASS
help
This supports TI LM3639 Backlight + 1.5A Flash LED Driver
config BACKLIGHT_LP855X
tristate "Backlight driver for TI LP855X"
depends on BACKLIGHT_CLASS_DEVICE && I2C
......
......@@ -24,6 +24,7 @@ obj-$(CONFIG_BACKLIGHT_HP680) += hp680_bl.o
obj-$(CONFIG_BACKLIGHT_LM3533) += lm3533_bl.o
obj-$(CONFIG_BACKLIGHT_LOCOMO) += locomolcd.o
obj-$(CONFIG_BACKLIGHT_LM3630) += lm3630_bl.o
obj-$(CONFIG_BACKLIGHT_LM3639) += lm3639_bl.o
obj-$(CONFIG_BACKLIGHT_LP855X) += lp855x_bl.o
obj-$(CONFIG_BACKLIGHT_OMAP1) += omap1_bl.o
obj-$(CONFIG_BACKLIGHT_PANDORA) += pandora_bl.o
......
This diff is collapsed.
/*
* Simple driver for Texas Instruments LM3630 LED Flash driver chip
* Copyright (C) 2012 Texas Instruments
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#ifndef __LINUX_LM3639_H
#define __LINUX_LM3639_H
#define LM3639_NAME "lm3639_bl"
enum lm3639_pwm {
LM3639_PWM_DISABLE = 0x00,
LM3639_PWM_EN_ACTLOW = 0x48,
LM3639_PWM_EN_ACTHIGH = 0x40,
};
enum lm3639_strobe {
LM3639_STROBE_DISABLE = 0x00,
LM3639_STROBE_EN_ACTLOW = 0x10,
LM3639_STROBE_EN_ACTHIGH = 0x30,
};
enum lm3639_txpin {
LM3639_TXPIN_DISABLE = 0x00,
LM3639_TXPIN_EN_ACTLOW = 0x04,
LM3639_TXPIN_EN_ACTHIGH = 0x0C,
};
enum lm3639_fleds {
LM3639_FLED_DIASBLE_ALL = 0x00,
LM3639_FLED_EN_1 = 0x40,
LM3639_FLED_EN_2 = 0x20,
LM3639_FLED_EN_ALL = 0x60,
};
enum lm3639_bleds {
LM3639_BLED_DIASBLE_ALL = 0x00,
LM3639_BLED_EN_1 = 0x10,
LM3639_BLED_EN_2 = 0x08,
LM3639_BLED_EN_ALL = 0x18,
};
enum lm3639_bled_mode {
LM3639_BLED_MODE_EXPONETIAL = 0x00,
LM3639_BLED_MODE_LINEAR = 0x10,
};
struct lm3639_platform_data {
unsigned int max_brt_led;
unsigned int init_brt_led;
/* input pins */
enum lm3639_pwm pin_pwm;
enum lm3639_strobe pin_strobe;
enum lm3639_txpin pin_tx;
/* output pins */
enum lm3639_fleds fled_pins;
enum lm3639_bleds bled_pins;
enum lm3639_bled_mode bled_mode;
void (*pwm_set_intensity) (int brightness, int max_brightness);
int (*pwm_get_intensity) (void);
};
#endif /* __LINUX_LM3639_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment