]> git.proxmox.com Git - mirror_ubuntu-impish-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:14 +0000 (16:41 +0800)
committerAndrea Righi <andrea.righi@canonical.com>
Mon, 28 Jun 2021 06:03:45 +0000 (08:03 +0200)
commitaa9fb2797f3890eaabeb46b2068de8635cc35861
tree13ad53d25e17f9fcdf4d1c5fcd4b98fbe9dab8f0
parent490a1b192d0ec04bb719fc327452cc88de62c6ef
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: Colin Ian King <colin.king@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/platform/x86/Kconfig
drivers/platform/x86/dell/Makefile
drivers/platform/x86/dell/dell-uart-backlight.c [new file with mode: 0644]
drivers/platform/x86/dell/dell-uart-backlight.h [new file with mode: 0644]