Skip to content

Commit

Permalink
platform/x86: asus-nb-wmi: add support for ASUS ROG Zephyrus G14 and G15
Browse files Browse the repository at this point in the history
Add device support for the new ASUS ROG Zephyrus G14 (GA401I) and
G15 (GA502I) series.

This is accomplished by two new quirk entries (one per each series),
as well as all current available G401I/G502I DMI_PRODUCT_NAMEs to match
the corresponding devices.

Signed-off-by: Armas Spann <zappel@retarded.farm>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
  • Loading branch information
Armas Spann authored and Andy Shevchenko committed Jul 14, 2020
1 parent 64dd4a5 commit 13bceda
Showing 1 changed file with 82 additions and 0 deletions.
82 changes: 82 additions & 0 deletions drivers/platform/x86/asus-nb-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,16 @@ static struct quirk_entry quirk_asus_forceals = {
.wmi_force_als_set = true,
};

static struct quirk_entry quirk_asus_ga401i = {
.wmi_backlight_power = true,
.wmi_backlight_set_devstate = true,
};

static struct quirk_entry quirk_asus_ga502i = {
.wmi_backlight_power = true,
.wmi_backlight_set_devstate = true,
};

static int dmi_matched(const struct dmi_system_id *dmi)
{
pr_info("Identified laptop model '%s'\n", dmi->ident);
Expand Down Expand Up @@ -411,6 +421,78 @@ static const struct dmi_system_id asus_quirks[] = {
},
.driver_data = &quirk_asus_forceals,
},
{
.callback = dmi_matched,
.ident = "ASUSTeK COMPUTER INC. GA401IH",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
DMI_MATCH(DMI_PRODUCT_NAME, "GA401IH"),
},
.driver_data = &quirk_asus_ga401i,
},
{
.callback = dmi_matched,
.ident = "ASUSTeK COMPUTER INC. GA401II",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
DMI_MATCH(DMI_PRODUCT_NAME, "GA401II"),
},
.driver_data = &quirk_asus_ga401i,
},
{
.callback = dmi_matched,
.ident = "ASUSTeK COMPUTER INC. GA401IU",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
DMI_MATCH(DMI_PRODUCT_NAME, "GA401IU"),
},
.driver_data = &quirk_asus_ga401i,
},
{
.callback = dmi_matched,
.ident = "ASUSTeK COMPUTER INC. GA401IV",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
DMI_MATCH(DMI_PRODUCT_NAME, "GA401IV"),
},
.driver_data = &quirk_asus_ga401i,
},
{
.callback = dmi_matched,
.ident = "ASUSTeK COMPUTER INC. GA401IVC",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
DMI_MATCH(DMI_PRODUCT_NAME, "GA401IVC"),
},
.driver_data = &quirk_asus_ga401i,
},
{
.callback = dmi_matched,
.ident = "ASUSTeK COMPUTER INC. GA502II",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
DMI_MATCH(DMI_PRODUCT_NAME, "GA502II"),
},
.driver_data = &quirk_asus_ga502i,
},
{
.callback = dmi_matched,
.ident = "ASUSTeK COMPUTER INC. GA502IU",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
DMI_MATCH(DMI_PRODUCT_NAME, "GA502IU"),
},
.driver_data = &quirk_asus_ga502i,
},
{
.callback = dmi_matched,
.ident = "ASUSTeK COMPUTER INC. GA502IV",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
DMI_MATCH(DMI_PRODUCT_NAME, "GA502IV"),
},
.driver_data = &quirk_asus_ga502i,
},
{},
};

Expand Down

0 comments on commit 13bceda

Please sign in to comment.