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

backlight: add Backlight driver for lm3630 chip

This driver is a general version for LM3630 backlgiht driver chip of TI.

LM3630 :
The LM3630 is a current mode boost converter which supplies the power
and controls the current in two strings of up to 10 LEDs per string.
Programming is done over an I2C compatible interface.
www.ti.com

[akpm@linux-foundation.org: make bled_name[] static, a few coding style tuneups, create new set_intensity(), partly to avoid awkward layout gymnastics]
Signed-off-by: default avatarG.Shark Jeong <gshark.jeong@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Daniel Jeong <daniel.jeong@ti.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 6275ce9f
......@@ -352,6 +352,13 @@ config BACKLIGHT_AAT2870
If you have a AnalogicTech AAT2870 say Y to enable the
backlight driver.
config BACKLIGHT_LM3630
tristate "Backlight Driver for LM3630"
depends on BACKLIGHT_CLASS_DEVICE && I2C
select REGMAP_I2C
help
This supports TI LM3630 Backlight Driver
config BACKLIGHT_LP855X
tristate "Backlight driver for TI LP855X"
depends on BACKLIGHT_CLASS_DEVICE && I2C
......
......@@ -23,6 +23,7 @@ obj-$(CONFIG_BACKLIGHT_HP700) += jornada720_bl.o
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_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_LM3630_H
#define __LINUX_LM3630_H
#define LM3630_NAME "lm3630_bl"
enum lm3630_pwm_ctrl {
PWM_CTRL_DISABLE = 0,
PWM_CTRL_BANK_A,
PWM_CTRL_BANK_B,
PWM_CTRL_BANK_ALL,
};
enum lm3630_pwm_active {
PWM_ACTIVE_HIGH = 0,
PWM_ACTIVE_LOW,
};
enum lm3630_bank_a_ctrl {
BANK_A_CTRL_DISABLE = 0x0,
BANK_A_CTRL_LED1 = 0x4,
BANK_A_CTRL_LED2 = 0x1,
BANK_A_CTRL_ALL = 0x5,
};
enum lm3630_bank_b_ctrl {
BANK_B_CTRL_DISABLE = 0,
BANK_B_CTRL_LED2,
};
struct lm3630_platform_data {
/* maximum brightness */
int max_brt_led1;
int max_brt_led2;
/* initial on brightness */
int init_brt_led1;
int init_brt_led2;
enum lm3630_pwm_ctrl pwm_ctrl;
enum lm3630_pwm_active pwm_active;
enum lm3630_bank_a_ctrl bank_a_ctrl;
enum lm3630_bank_b_ctrl bank_b_ctrl;
unsigned int pwm_period;
void (*pwm_set_intensity) (int brightness, int max_brightness);
};
#endif /* __LINUX_LM3630_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