Add new polaris devices

Add Polaris device to backlight driver
- Polaris AMD Gen 2
- Polaris Intel Gen 2
- Polaris AMD Gen 3
- Polaris Intel Gen 3
This commit is contained in:
Christoffer Sandberg 2021-06-16 15:37:31 +02:00
parent d7f358a778
commit 4beb504569
No known key found for this signature in database
GPG key ID: BF563F71B6C7A96D

View file

@ -25,6 +25,7 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/leds.h> #include <linux/leds.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/version.h>
#include "uw_io.h" #include "uw_io.h"
#define UNIWILL_WMI_MGMT_GUID_BA "ABBC0F6D-8EA1-11D1-00A0-C90629100000" #define UNIWILL_WMI_MGMT_GUID_BA "ABBC0F6D-8EA1-11D1-00A0-C90629100000"
@ -463,6 +464,12 @@ static int uw_kbd_bl_init(struct platform_device *dev)
| dmi_match(DMI_BOARD_NAME, "POLARIS1701A2060") | dmi_match(DMI_BOARD_NAME, "POLARIS1701A2060")
| dmi_match(DMI_BOARD_NAME, "POLARIS1701I1650TI") | dmi_match(DMI_BOARD_NAME, "POLARIS1701I1650TI")
| dmi_match(DMI_BOARD_NAME, "POLARIS1701I2060") | dmi_match(DMI_BOARD_NAME, "POLARIS1701I2060")
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0)
| dmi_match(DMI_PRODUCT_SKU, "POLARIS1XA02")
| dmi_match(DMI_PRODUCT_SKU, "POLARIS1XI02")
| dmi_match(DMI_PRODUCT_SKU, "POLARIS1XA03")
| dmi_match(DMI_PRODUCT_SKU, "POLARIS1XI03")
#endif
// Old names // Old names
// | dmi_match(DMI_BOARD_NAME, "Polaris15I01") // | dmi_match(DMI_BOARD_NAME, "Polaris15I01")
@ -472,6 +479,11 @@ static int uw_kbd_bl_init(struct platform_device *dev)
// | dmi_match(DMI_BOARD_NAME, "Polaris1701I2060") // | dmi_match(DMI_BOARD_NAME, "Polaris1701I2060")
; ;
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 18, 0)
TUXEDO_ERROR(
"Warning: Kernel version less that 4.18, certain features might not be properly recognized.");
#endif
// Save previous enable state // Save previous enable state
uniwill_kbd_bl_enable_state_on_start = uniwill_read_kbd_bl_enabled(); uniwill_kbd_bl_enable_state_on_start = uniwill_read_kbd_bl_enabled();