[1/3,SRU,B,C,D] UBUNTU: SAUCE: platform/x86: dell-uart-backlight: add missing status command

Message ID 20190130091026.14290-2-acelan.kao@canonical.com
State New
Headers show
Series
  • Can't adjust brightness on DELL UHD dGPU AIO
Related show

Commit Message

AceLan Kao Jan. 30, 2019, 9:10 a.m.
BugLink: https://bugs.launchpad.net/bugs/1813877

DELL_UART_GET_SCALAR has been declared in
drivers/platform/x86/dell-uart-backlight.h, but its definition is
missing. It won't lead to issues on old AIO platforms, since this
command is newly introduced and is not supported by all old AIOs.

Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
---
 drivers/platform/x86/dell-uart-backlight.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Patch

diff --git a/drivers/platform/x86/dell-uart-backlight.c b/drivers/platform/x86/dell-uart-backlight.c
index ce9a5e200af8..f957da1a452a 100644
--- a/drivers/platform/x86/dell-uart-backlight.c
+++ b/drivers/platform/x86/dell-uart-backlight.c
@@ -52,6 +52,18 @@  static struct dell_uart_bl_cmd uart_cmd[] = {
 		.cmd	= {0x6A, 0x06, 0x8F},
 		.tx_len	= 3,
 	},
+	/*
+	 * Get Scalar Status: Tool uses this command to check if scalar IC controls brightness.
+	 * Command: 0x6A 0x1F 0x8F (Length:3 Type: 0x0A, Cmd:0x1F Checksum:0x76)
+	 * Return data: 0x04 0x1F Data checksum
+	 * (Data = 0: scalar cannot adjust brightness, Data = 1: scalar can adjust brightness)
+	 */
+	[DELL_UART_GET_SCALAR] = {
+		.cmd	= {0x6A,0x1F,0x76},
+		.ret	= {0x04,0x1F,0x00,0x00},
+		.tx_len	= 3,
+		.rx_len	= 4,
+	},
 	/*
 	 * Get Brightness level: Application uses this command for scaler to
 	 *                       get brightness.