]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
UBUNTU: SAUCE: platform/x86: dell-uart-backlight: new backlight driver for DELL AIO
authorAceLan Kao <acelan.kao@canonical.com>
Thu, 20 Sep 2018 08:41:00 +0000 (10:41 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 1 Oct 2018 14:58:08 +0000 (16:58 +0200)
commit2c36c90fb5b1433f4ac43b611ffb4b36fdbe28a5
tree66bb605180eaec38288d7ac51d0b8377e15c8d08
parent15c47ccdc31c6327d745eee1d8597f9886441430
UBUNTU: SAUCE: platform/x86: dell-uart-backlight: new backlight driver for DELL AIO

BugLink: https://bugs.launchpad.net/bugs/1727235
The Dell AIO machines released after 2017 come with a UART interface
to communicate with the backlight scalar board. This driver creates
a standard backlight interface and talks to the scalar board through
UART.

In DSDT this uart port will be defined as
   Name (_HID, "DELL0501")
   Name (_CID, EisaId ("PNP0501")
The 8250 PNP driver will be loaded by default, and this driver uses
"DELL0501" to confirm the uart port is a backlight interface and
leverage the port created by 8250 PNP driver to communicate with
the scalar board.

v2:
   1. move struct uart_cmd to .c file
   2. make dell_uart_get_bl_power() inline
   3. add space to ternary operator "bl_cmd->cmd[2] = power ? 0 : 1;"
   4. check return value of kzalloc()
   5. add kzfree()
   6. check return value of backlight_device_register()
   7. check return value of filp_open() at init
v3:
   1. Fix compiling warning.
v4:
   1. make *tty and *ftty static
   2. bl_cmd->ret[0] will never be less than 0, fixed the if statement
   3. fix some line over 80 chars warnings.

Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Colin King <colin.king@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/platform/x86/Kconfig
drivers/platform/x86/Makefile
drivers/platform/x86/dell-uart-backlight.c [new file with mode: 0644]
drivers/platform/x86/dell-uart-backlight.h [new file with mode: 0644]