driver/display: add set backlight register function
For FT8006S HLT LCD because the FT8006S IC spec backlight register, we add the mipi_dsi_dcs_set_display_brightness_2bytes_2th_low4bit the function. Change-Id: Ib77bf0981ace8c4f9cf77c69a70696ec2075fcae Reviewed-on: https://gerrit.mot.com/2061265 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Suting Xie <xiest1@motorola.com> Submit-Approved: Suting Xie <xiest1@motorola.com>
This commit is contained in:
1 parent
fe15645684
commit
94bba9fc51
2 files changed
+25
No files matched your search
@@ -1133,6 +1133,29 @@ int mipi_dsi_dcs_set_display_brightness_2bytes(struct mipi_dsi_device *dsi,
|
||||
}
|
||||
EXPORT_SYMBOL(mipi_dsi_dcs_set_display_brightness_2bytes);
|
||||
|
||||
/**
|
||||
* mipi_dsi_dcs_set_display_brightness_2bytes_2th_low4bit() - sets the brightness value of
|
||||
* the display with 2bytes and low 4bit at 2th byte value
|
||||
* @dsi: DSI peripheral device
|
||||
* @brightness: brightness value
|
||||
*
|
||||
* Return: 0 on success or a negative error code on failure.
|
||||
*/
|
||||
int mipi_dsi_dcs_set_display_brightness_2bytes_2th_low4bit(struct mipi_dsi_device *dsi,
|
||||
u16 brightness)
|
||||
{
|
||||
u8 payload[2] = { brightness >> 0x04, brightness & 0x0f };
|
||||
ssize_t err;
|
||||
|
||||
err = mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_DISPLAY_BRIGHTNESS,
|
||||
payload, sizeof(payload));
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(mipi_dsi_dcs_set_display_brightness_2bytes_2th_low4bit);
|
||||
|
||||
/**
|
||||
* mipi_dsi_dcs_set_display_brightness_large() - sets the 16-bit brightness value
|
||||
* of the display
|
||||
|
||||
@@ -292,6 +292,8 @@ int mipi_dsi_dcs_get_display_brightness(struct mipi_dsi_device *dsi,
|
||||
u16 *brightness);
|
||||
int mipi_dsi_dcs_set_display_brightness_2bytes(struct mipi_dsi_device *dsi,
|
||||
u16 brightness);
|
||||
int mipi_dsi_dcs_set_display_brightness_2bytes_2th_low4bit(struct mipi_dsi_device *dsi,
|
||||
u16 brightness);
|
||||
int mipi_dsi_dcs_set_display_brightness_large(struct mipi_dsi_device *dsi,
|
||||
u16 brightness);
|
||||
int mipi_dsi_dcs_get_display_brightness_large(struct mipi_dsi_device *dsi,
|
||||
|
||||
Reference in new issue
Block a user