backlight: lp855x_bl: support new LP8555 device
LP8555 is one of the LP855x family devices. This device needs pre_init_device() and post_init_device() driver structure. It's same as LP8557, so the device configuration code is shared with LP8557. Backlight outputs are generated from dual DC-DC boost converters. It's configurable EPROM settings which are defined in the platform data. Driver documentation and device tree bindings are updated. Signed-off-by: Milo Kim <milo.kim@ti.com> Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
@@ -26,13 +26,15 @@
|
||||
#define LP8556_EPROM_START 0xA0
|
||||
#define LP8556_EPROM_END 0xAF
|
||||
|
||||
/* LP8557 Registers */
|
||||
/* LP8555/7 Registers */
|
||||
#define LP8557_BL_CMD 0x00
|
||||
#define LP8557_BL_MASK 0x01
|
||||
#define LP8557_BL_ON 0x01
|
||||
#define LP8557_BL_OFF 0x00
|
||||
#define LP8557_BRIGHTNESS_CTRL 0x04
|
||||
#define LP8557_CONFIG 0x10
|
||||
#define LP8555_EPROM_START 0x10
|
||||
#define LP8555_EPROM_END 0x7A
|
||||
#define LP8557_EPROM_START 0x10
|
||||
#define LP8557_EPROM_END 0x1E
|
||||
|
||||
@@ -111,6 +113,10 @@ static bool lp855x_is_valid_rom_area(struct lp855x *lp, u8 addr)
|
||||
start = LP8556_EPROM_START;
|
||||
end = LP8556_EPROM_END;
|
||||
break;
|
||||
case LP8555:
|
||||
start = LP8555_EPROM_START;
|
||||
end = LP8555_EPROM_END;
|
||||
break;
|
||||
case LP8557:
|
||||
start = LP8557_EPROM_START;
|
||||
end = LP8557_EPROM_END;
|
||||
@@ -165,9 +171,14 @@ static int lp855x_configure(struct lp855x *lp)
|
||||
struct lp855x_platform_data *pd = lp->pdata;
|
||||
|
||||
switch (lp->chip_id) {
|
||||
case LP8550 ... LP8556:
|
||||
case LP8550:
|
||||
case LP8551:
|
||||
case LP8552:
|
||||
case LP8553:
|
||||
case LP8556:
|
||||
lp->cfg = &lp855x_dev_cfg;
|
||||
break;
|
||||
case LP8555:
|
||||
case LP8557:
|
||||
lp->cfg = &lp8557_dev_cfg;
|
||||
break;
|
||||
@@ -470,6 +481,7 @@ static const struct of_device_id lp855x_dt_ids[] = {
|
||||
{ .compatible = "ti,lp8551", },
|
||||
{ .compatible = "ti,lp8552", },
|
||||
{ .compatible = "ti,lp8553", },
|
||||
{ .compatible = "ti,lp8555", },
|
||||
{ .compatible = "ti,lp8556", },
|
||||
{ .compatible = "ti,lp8557", },
|
||||
{ }
|
||||
@@ -481,6 +493,7 @@ static const struct i2c_device_id lp855x_ids[] = {
|
||||
{"lp8551", LP8551},
|
||||
{"lp8552", LP8552},
|
||||
{"lp8553", LP8553},
|
||||
{"lp8555", LP8555},
|
||||
{"lp8556", LP8556},
|
||||
{"lp8557", LP8557},
|
||||
{ }
|
||||
|
Reference in New Issue
Block a user