backlight: Add TPS65217 WLED driver
The TPS65217 chip contains a boost converter and current sinks which can be used to drive LEDs for use as backlights. Expose this functionality via the backlight API. Tested on an AM335x based custom board with a single WLED string, using different values for ISEL and FDIM (though it would be hard to tell the difference except for the value in WLEDCTRL1). Both instantiation through the device tree and by passing platform data have been tested. Testing has been done with an Androidized 3.2 kernel from the rowboat project. Koen Kooi reported the driver to be working on a Beaglebone board with LCD3 cape Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:

committed by
Samuel Ortiz

parent
b6290ffe1f
commit
eebfdc17cc
@@ -213,6 +213,23 @@ enum tps65217_regulator_id {
|
||||
/* Number of total regulators available */
|
||||
#define TPS65217_NUM_REGULATOR (TPS65217_NUM_DCDC + TPS65217_NUM_LDO)
|
||||
|
||||
enum tps65217_bl_isel {
|
||||
TPS65217_BL_ISET1 = 1,
|
||||
TPS65217_BL_ISET2,
|
||||
};
|
||||
|
||||
enum tps65217_bl_fdim {
|
||||
TPS65217_BL_FDIM_100HZ,
|
||||
TPS65217_BL_FDIM_200HZ,
|
||||
TPS65217_BL_FDIM_500HZ,
|
||||
TPS65217_BL_FDIM_1000HZ,
|
||||
};
|
||||
|
||||
struct tps65217_bl_pdata {
|
||||
enum tps65217_bl_isel isel;
|
||||
enum tps65217_bl_fdim fdim;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct tps65217_board - packages regulator init data
|
||||
* @tps65217_regulator_data: regulator initialization values
|
||||
@@ -222,6 +239,7 @@ enum tps65217_regulator_id {
|
||||
struct tps65217_board {
|
||||
struct regulator_init_data *tps65217_init_data[TPS65217_NUM_REGULATOR];
|
||||
struct device_node *of_node[TPS65217_NUM_REGULATOR];
|
||||
struct tps65217_bl_pdata *bl_pdata;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user