* [PATCH 0/4] alienware-wmi new platform and feature support
@ 2016-01-22 0:04 Mario Limonciello
2016-01-22 0:04 ` [PATCH 1/4] Add support for new platform, X51-R3 Mario Limonciello
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Mario Limonciello @ 2016-01-22 0:04 UTC (permalink / raw)
To: dvhart; +Cc: LKML, platform-driver-x86, Mario Limonciello
I've got some extensions for the alienware-wmi driver that have
been introduced for a few new platforms and can be controlled via the WMI
interface.
Mario Limonciello (4):
Add support for new platform, X51-R3
Add support for alienware graphics amplifier
Add support for deep sleep control.
Add support for two new systems: ASM200 & ASM201
drivers/platform/x86/alienware-wmi.c | 285 +++++++++++++++++++++++++++++++----
1 file changed, 252 insertions(+), 33 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/4] Add support for new platform, X51-R3
2016-01-22 0:04 [PATCH 0/4] alienware-wmi new platform and feature support Mario Limonciello
@ 2016-01-22 0:04 ` Mario Limonciello
2016-01-30 17:23 ` Darren Hart
2016-01-22 0:04 ` [PATCH 2/4] Add support for alienware graphics amplifier Mario Limonciello
` (3 subsequent siblings)
4 siblings, 1 reply; 7+ messages in thread
From: Mario Limonciello @ 2016-01-22 0:04 UTC (permalink / raw)
To: dvhart; +Cc: LKML, platform-driver-x86, Mario Limonciello
Signed-off-by: Mario Limonciello <mario_limonciello@dell.com>
---
drivers/platform/x86/alienware-wmi.c | 44 ++++++++++++++++++++++++------------
1 file changed, 29 insertions(+), 15 deletions(-)
diff --git a/drivers/platform/x86/alienware-wmi.c b/drivers/platform/x86/alienware-wmi.c
index 1e1e594..dcd4f81 100644
--- a/drivers/platform/x86/alienware-wmi.c
+++ b/drivers/platform/x86/alienware-wmi.c
@@ -69,11 +69,16 @@ static struct quirk_entry quirk_unknown = {
.hdmi_mux = 0,
};
-static struct quirk_entry quirk_x51_family = {
+static struct quirk_entry quirk_x51_r1_r2 = {
.num_zones = 3,
.hdmi_mux = 0.
};
+static struct quirk_entry quirk_x51_r3 = {
+ .num_zones = 4,
+ .hdmi_mux = 0,
+};
+
static struct quirk_entry quirk_asm100 = {
.num_zones = 2,
.hdmi_mux = 1,
@@ -88,12 +93,12 @@ static int __init dmi_matched(const struct dmi_system_id *dmi)
static const struct dmi_system_id alienware_quirks[] __initconst = {
{
.callback = dmi_matched,
- .ident = "Alienware X51 R1",
+ .ident = "Alienware X51 R3",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Alienware X51"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Alienware X51 R3"),
},
- .driver_data = &quirk_x51_family,
+ .driver_data = &quirk_x51_r3,
},
{
.callback = dmi_matched,
@@ -102,17 +107,26 @@ static const struct dmi_system_id alienware_quirks[] __initconst = {
DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
DMI_MATCH(DMI_PRODUCT_NAME, "Alienware X51 R2"),
},
- .driver_data = &quirk_x51_family,
+ .driver_data = &quirk_x51_r1_r2,
+ },
+ {
+ .callback = dmi_matched,
+ .ident = "Alienware X51 R1",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Alienware X51"),
+ },
+ .driver_data = &quirk_x51_r1_r2,
},
{
- .callback = dmi_matched,
- .ident = "Alienware ASM100",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
- DMI_MATCH(DMI_PRODUCT_NAME, "ASM100"),
- },
- .driver_data = &quirk_asm100,
- },
+ .callback = dmi_matched,
+ .ident = "Alienware ASM100",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "ASM100"),
+ },
+ .driver_data = &quirk_asm100,
+ },
{}
};
@@ -477,7 +491,7 @@ static ssize_t show_hdmi_cable(struct device *dev,
};
status =
alienware_hdmi_command(&in_args, WMAX_METHOD_HDMI_CABLE,
- (u32 *) &out_data);
+ (u32 *) & out_data);
if (ACPI_SUCCESS(status)) {
if (out_data == 0)
return scnprintf(buf, PAGE_SIZE,
@@ -500,7 +514,7 @@ static ssize_t show_hdmi_source(struct device *dev,
};
status =
alienware_hdmi_command(&in_args, WMAX_METHOD_HDMI_STATUS,
- (u32 *) &out_data);
+ (u32 *) & out_data);
if (ACPI_SUCCESS(status)) {
if (out_data == 1)
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/4] Add support for alienware graphics amplifier
2016-01-22 0:04 [PATCH 0/4] alienware-wmi new platform and feature support Mario Limonciello
2016-01-22 0:04 ` [PATCH 1/4] Add support for new platform, X51-R3 Mario Limonciello
@ 2016-01-22 0:04 ` Mario Limonciello
2016-01-22 0:04 ` [PATCH 3/4] Add support for deep sleep control Mario Limonciello
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Mario Limonciello @ 2016-01-22 0:04 UTC (permalink / raw)
To: dvhart; +Cc: LKML, platform-driver-x86, Mario Limonciello
Signed-off-by: Mario Limonciello <mario_limonciello@dell.com>
---
drivers/platform/x86/alienware-wmi.c | 114 ++++++++++++++++++++++++++++-------
1 file changed, 93 insertions(+), 21 deletions(-)
diff --git a/drivers/platform/x86/alienware-wmi.c b/drivers/platform/x86/alienware-wmi.c
index dcd4f81..e6f6322 100644
--- a/drivers/platform/x86/alienware-wmi.c
+++ b/drivers/platform/x86/alienware-wmi.c
@@ -33,6 +33,7 @@
#define WMAX_METHOD_BRIGHTNESS 0x3
#define WMAX_METHOD_ZONE_CONTROL 0x4
#define WMAX_METHOD_HDMI_CABLE 0x5
+#define WMAX_METHOD_AMPLIFIER_CABLE 0x6
MODULE_AUTHOR("Mario Limonciello <mario_limonciello@dell.com>");
MODULE_DESCRIPTION("Alienware special feature control");
@@ -60,6 +61,7 @@ enum WMAX_CONTROL_STATES {
struct quirk_entry {
u8 num_zones;
u8 hdmi_mux;
+ u8 amplifier;
};
static struct quirk_entry *quirks;
@@ -67,21 +69,25 @@ static struct quirk_entry *quirks;
static struct quirk_entry quirk_unknown = {
.num_zones = 2,
.hdmi_mux = 0,
+ .amplifier = 0,
};
static struct quirk_entry quirk_x51_r1_r2 = {
.num_zones = 3,
- .hdmi_mux = 0.
+ .hdmi_mux = 0,
+ .amplifier = 0,
};
static struct quirk_entry quirk_x51_r3 = {
.num_zones = 4,
.hdmi_mux = 0,
+ .amplifier = 1,
};
static struct quirk_entry quirk_asm100 = {
.num_zones = 2,
.hdmi_mux = 1,
+ .amplifier = 0,
};
static int __init dmi_matched(const struct dmi_system_id *dmi)
@@ -147,7 +153,7 @@ struct wmax_brightness_args {
u32 percentage;
};
-struct hdmi_args {
+struct wmax_basic_args {
u8 arg;
};
@@ -232,16 +238,16 @@ static int alienware_update_led(struct platform_zone *zone)
char *guid;
struct acpi_buffer input;
struct legacy_led_args legacy_args;
- struct wmax_led_args wmax_args;
+ struct wmax_led_args wmax_basic_args;
if (interface == WMAX) {
- wmax_args.led_mask = 1 << zone->location;
- wmax_args.colors = zone->colors;
- wmax_args.state = lighting_control_state;
+ wmax_basic_args.led_mask = 1 << zone->location;
+ wmax_basic_args.colors = zone->colors;
+ wmax_basic_args.state = lighting_control_state;
guid = WMAX_CONTROL_GUID;
method_id = WMAX_METHOD_ZONE_CONTROL;
- input.length = (acpi_size) sizeof(wmax_args);
- input.pointer = &wmax_args;
+ input.length = (acpi_size) sizeof(wmax_basic_args);
+ input.pointer = &wmax_basic_args;
} else {
legacy_args.colors = zone->colors;
legacy_args.brightness = global_brightness;
@@ -449,11 +455,7 @@ static void alienware_zone_exit(struct platform_device *dev)
kfree(zone_attrs);
}
-/*
- The HDMI mux sysfs node indicates the status of the HDMI input mux.
- It can toggle between standard system GPU output and HDMI input.
-*/
-static acpi_status alienware_hdmi_command(struct hdmi_args *in_args,
+static acpi_status alienware_wmax_command(struct wmax_basic_args *in_args,
u32 command, int *out_data)
{
acpi_status status;
@@ -481,17 +483,21 @@ static acpi_status alienware_hdmi_command(struct hdmi_args *in_args,
}
+/*
+ * The HDMI mux sysfs node indicates the status of the HDMI input mux.
+ * It can toggle between standard system GPU output and HDMI input.
+*/
static ssize_t show_hdmi_cable(struct device *dev,
struct device_attribute *attr, char *buf)
{
acpi_status status;
u32 out_data;
- struct hdmi_args in_args = {
+ struct wmax_basic_args in_args = {
.arg = 0,
};
status =
- alienware_hdmi_command(&in_args, WMAX_METHOD_HDMI_CABLE,
- (u32 *) & out_data);
+ alienware_wmax_command(&in_args, WMAX_METHOD_HDMI_CABLE,
+ (u32 *) &out_data);
if (ACPI_SUCCESS(status)) {
if (out_data == 0)
return scnprintf(buf, PAGE_SIZE,
@@ -509,12 +515,12 @@ static ssize_t show_hdmi_source(struct device *dev,
{
acpi_status status;
u32 out_data;
- struct hdmi_args in_args = {
+ struct wmax_basic_args in_args = {
.arg = 0,
};
status =
- alienware_hdmi_command(&in_args, WMAX_METHOD_HDMI_STATUS,
- (u32 *) & out_data);
+ alienware_wmax_command(&in_args, WMAX_METHOD_HDMI_STATUS,
+ (u32 *) &out_data);
if (ACPI_SUCCESS(status)) {
if (out_data == 1)
@@ -533,7 +539,7 @@ static ssize_t toggle_hdmi_source(struct device *dev,
const char *buf, size_t count)
{
acpi_status status;
- struct hdmi_args args;
+ struct wmax_basic_args args;
if (strcmp(buf, "gpu\n") == 0)
args.arg = 1;
else if (strcmp(buf, "input\n") == 0)
@@ -542,7 +548,7 @@ static ssize_t toggle_hdmi_source(struct device *dev,
args.arg = 3;
pr_debug("alienware-wmi: setting hdmi to %d : %s", args.arg, buf);
- status = alienware_hdmi_command(&args, WMAX_METHOD_HDMI_SOURCE, NULL);
+ status = alienware_wmax_command(&args, WMAX_METHOD_HDMI_SOURCE, NULL);
if (ACPI_FAILURE(status))
pr_err("alienware-wmi: HDMI toggle failed: results: %u\n",
@@ -585,6 +591,65 @@ error_create_hdmi:
return ret;
}
+/* Alienware GFX amplifier support
+ * - Currently supports reading cable status
+ * - Leaving expansion room to possibly support dock/undock events later
+*/
+static ssize_t show_amplifier_status(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ acpi_status status;
+ u32 out_data;
+ struct wmax_basic_args in_args = {
+ .arg = 0,
+ };
+ status =
+ alienware_wmax_command(&in_args, WMAX_METHOD_AMPLIFIER_CABLE,
+ (u32 *) &out_data);
+ if (ACPI_SUCCESS(status)) {
+ if (out_data == 0)
+ return scnprintf(buf, PAGE_SIZE,
+ "[unconnected] connected unknown\n");
+ else if (out_data == 1)
+ return scnprintf(buf, PAGE_SIZE,
+ "unconnected [connected] unknown\n");
+ }
+ pr_err("alienware-wmi: unknown amplifier cable status: %d\n", status);
+ return scnprintf(buf, PAGE_SIZE, "unconnected connected [unknown]\n");
+}
+
+static DEVICE_ATTR(status, S_IRUGO, show_amplifier_status, NULL);
+
+static struct attribute *amplifier_attrs[] = {
+ &dev_attr_status.attr,
+ NULL,
+};
+
+static struct attribute_group amplifier_attribute_group = {
+ .name = "amplifier",
+ .attrs = amplifier_attrs,
+};
+
+static void remove_amplifier(struct platform_device *dev)
+{
+ if (quirks->amplifier > 0)
+ sysfs_remove_group(&dev->dev.kobj, &lifier_attribute_group);
+}
+
+static int create_amplifier(struct platform_device *dev)
+{
+ int ret;
+
+ ret = sysfs_create_group(&dev->dev.kobj, &lifier_attribute_group);
+ if (ret)
+ goto error_create_amplifier;
+ return 0;
+
+error_create_amplifier:
+ remove_amplifier(dev);
+ return ret;
+}
+
static int __init alienware_wmi_init(void)
{
int ret;
@@ -620,6 +685,12 @@ static int __init alienware_wmi_init(void)
goto fail_prep_hdmi;
}
+ if (quirks->amplifier > 0) {
+ ret = create_amplifier(platform_device);
+ if (ret)
+ goto fail_prep_amplifier;
+ }
+
ret = alienware_zone_init(platform_device);
if (ret)
goto fail_prep_zones;
@@ -628,6 +699,7 @@ static int __init alienware_wmi_init(void)
fail_prep_zones:
alienware_zone_exit(platform_device);
+fail_prep_amplifier:
fail_prep_hdmi:
platform_device_del(platform_device);
fail_platform_device2:
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/4] Add support for deep sleep control.
2016-01-22 0:04 [PATCH 0/4] alienware-wmi new platform and feature support Mario Limonciello
2016-01-22 0:04 ` [PATCH 1/4] Add support for new platform, X51-R3 Mario Limonciello
2016-01-22 0:04 ` [PATCH 2/4] Add support for alienware graphics amplifier Mario Limonciello
@ 2016-01-22 0:04 ` Mario Limonciello
2016-01-22 0:05 ` [PATCH 4/4] Add support for two new systems: ASM200 & ASM201 Mario Limonciello
2016-01-30 17:34 ` [PATCH 0/4] alienware-wmi new platform and feature support Darren Hart
4 siblings, 0 replies; 7+ messages in thread
From: Mario Limonciello @ 2016-01-22 0:04 UTC (permalink / raw)
To: dvhart; +Cc: LKML, platform-driver-x86, Mario Limonciello
This allows configuration the system for wakeup with a controller.
Signed-off-by: Mario Limonciello <mario_limonciello@dell.com>
---
drivers/platform/x86/alienware-wmi.c | 103 ++++++++++++++++++++++++++++++++++-
1 file changed, 102 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/x86/alienware-wmi.c b/drivers/platform/x86/alienware-wmi.c
index e6f6322..e66c34d 100644
--- a/drivers/platform/x86/alienware-wmi.c
+++ b/drivers/platform/x86/alienware-wmi.c
@@ -1,7 +1,7 @@
/*
* Alienware AlienFX control
*
- * Copyright (C) 2014 Dell Inc <mario_limonciello@dell.com>
+ * Copyright (C) 2014-2016 Dell Inc <mario_limonciello@dell.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -34,6 +34,8 @@
#define WMAX_METHOD_ZONE_CONTROL 0x4
#define WMAX_METHOD_HDMI_CABLE 0x5
#define WMAX_METHOD_AMPLIFIER_CABLE 0x6
+#define WMAX_METHOD_DEEP_SLEEP_CONTROL 0x0B
+#define WMAX_METHOD_DEEP_SLEEP_STATUS 0x0C
MODULE_AUTHOR("Mario Limonciello <mario_limonciello@dell.com>");
MODULE_DESCRIPTION("Alienware special feature control");
@@ -62,6 +64,7 @@ struct quirk_entry {
u8 num_zones;
u8 hdmi_mux;
u8 amplifier;
+ u8 deepslp;
};
static struct quirk_entry *quirks;
@@ -70,24 +73,28 @@ static struct quirk_entry quirk_unknown = {
.num_zones = 2,
.hdmi_mux = 0,
.amplifier = 0,
+ .deepslp = 0,
};
static struct quirk_entry quirk_x51_r1_r2 = {
.num_zones = 3,
.hdmi_mux = 0,
.amplifier = 0,
+ .deepslp = 0,
};
static struct quirk_entry quirk_x51_r3 = {
.num_zones = 4,
.hdmi_mux = 0,
.amplifier = 1,
+ .deepslp = 0,
};
static struct quirk_entry quirk_asm100 = {
.num_zones = 2,
.hdmi_mux = 1,
.amplifier = 0,
+ .deepslp = 0,
};
static int __init dmi_matched(const struct dmi_system_id *dmi)
@@ -650,6 +657,93 @@ error_create_amplifier:
return ret;
}
+/* Deep Sleep Control support
+ * - Modifies BIOS setting for deep sleep control allowing extra wakeup events
+*/
+static ssize_t show_deepsleep_status(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ acpi_status status;
+ u32 out_data;
+ struct wmax_basic_args in_args = {
+ .arg = 0,
+ };
+ status =
+ alienware_wmax_command(&in_args, WMAX_METHOD_DEEP_SLEEP_STATUS,
+ (u32 *) &out_data);
+ if (ACPI_SUCCESS(status)) {
+ if (out_data == 0)
+ return scnprintf(buf, PAGE_SIZE,
+ "[disabled] s5 s5_s4\n");
+ else if (out_data == 1)
+ return scnprintf(buf, PAGE_SIZE,
+ "disabled [s5] s5_s4\n");
+ else if (out_data == 2)
+ return scnprintf(buf, PAGE_SIZE,
+ "disabled s5 [s5_s4]\n");
+ }
+ pr_err("alienware-wmi: unknown deep sleep status: %d\n", status);
+ return scnprintf(buf, PAGE_SIZE, "disabled s5 s5_s4 [unknown]\n");
+}
+
+static ssize_t toggle_deepsleep(struct device *dev,
+ struct device_attribute *attr,
+ const char *buf, size_t count)
+{
+ acpi_status status;
+ struct wmax_basic_args args;
+
+ if (strcmp(buf, "disabled\n") == 0)
+ args.arg = 0;
+ else if (strcmp(buf, "s5\n") == 0)
+ args.arg = 1;
+ else
+ args.arg = 2;
+ pr_debug("alienware-wmi: setting deep sleep to %d : %s", args.arg, buf);
+
+ status =
+ alienware_wmax_command(&args, WMAX_METHOD_DEEP_SLEEP_CONTROL, NULL);
+
+ if (ACPI_FAILURE(status))
+ pr_err
+ ("alienware-wmi: deep sleep control failed: results: %u\n",
+ status);
+ return count;
+}
+
+static DEVICE_ATTR(deepsleep, S_IRUGO | S_IWUSR, show_deepsleep_status,
+ toggle_deepsleep);
+
+static struct attribute *deepsleep_attrs[] = {
+ &dev_attr_deepsleep.attr,
+ NULL,
+};
+
+static struct attribute_group deepsleep_attribute_group = {
+ .name = "deepsleep",
+ .attrs = deepsleep_attrs,
+};
+
+static void remove_deepsleep(struct platform_device *dev)
+{
+ if (quirks->deepslp > 0)
+ sysfs_remove_group(&dev->dev.kobj, &deepsleep_attribute_group);
+}
+
+static int create_deepsleep(struct platform_device *dev)
+{
+ int ret;
+
+ ret = sysfs_create_group(&dev->dev.kobj, &deepsleep_attribute_group);
+ if (ret)
+ goto error_create_deepsleep;
+ return 0;
+
+error_create_deepsleep:
+ remove_deepsleep(dev);
+ return ret;
+}
+
static int __init alienware_wmi_init(void)
{
int ret;
@@ -691,6 +785,12 @@ static int __init alienware_wmi_init(void)
goto fail_prep_amplifier;
}
+ if (quirks->deepslp > 0) {
+ ret = create_deepsleep(platform_device);
+ if (ret)
+ goto fail_prep_deepsleep;
+ }
+
ret = alienware_zone_init(platform_device);
if (ret)
goto fail_prep_zones;
@@ -699,6 +799,7 @@ static int __init alienware_wmi_init(void)
fail_prep_zones:
alienware_zone_exit(platform_device);
+fail_prep_deepsleep:
fail_prep_amplifier:
fail_prep_hdmi:
platform_device_del(platform_device);
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/4] Add support for two new systems: ASM200 & ASM201
2016-01-22 0:04 [PATCH 0/4] alienware-wmi new platform and feature support Mario Limonciello
` (2 preceding siblings ...)
2016-01-22 0:04 ` [PATCH 3/4] Add support for deep sleep control Mario Limonciello
@ 2016-01-22 0:05 ` Mario Limonciello
2016-01-30 17:34 ` [PATCH 0/4] alienware-wmi new platform and feature support Darren Hart
4 siblings, 0 replies; 7+ messages in thread
From: Mario Limonciello @ 2016-01-22 0:05 UTC (permalink / raw)
To: dvhart; +Cc: LKML, platform-driver-x86, Mario Limonciello
Signed-off-by: Mario Limonciello <mario_limonciello@dell.com>
---
drivers/platform/x86/alienware-wmi.c | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/drivers/platform/x86/alienware-wmi.c b/drivers/platform/x86/alienware-wmi.c
index e66c34d..eccd547 100644
--- a/drivers/platform/x86/alienware-wmi.c
+++ b/drivers/platform/x86/alienware-wmi.c
@@ -97,6 +97,20 @@ static struct quirk_entry quirk_asm100 = {
.deepslp = 0,
};
+static struct quirk_entry quirk_asm200 = {
+ .num_zones = 2,
+ .hdmi_mux = 1,
+ .amplifier = 0,
+ .deepslp = 1,
+};
+
+static struct quirk_entry quirk_asm201 = {
+ .num_zones = 2,
+ .hdmi_mux = 1,
+ .amplifier = 1,
+ .deepslp = 1,
+};
+
static int __init dmi_matched(const struct dmi_system_id *dmi)
{
quirks = dmi->driver_data;
@@ -140,6 +154,24 @@ static const struct dmi_system_id alienware_quirks[] __initconst = {
},
.driver_data = &quirk_asm100,
},
+ {
+ .callback = dmi_matched,
+ .ident = "Alienware ASM200",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "ASM200"),
+ },
+ .driver_data = &quirk_asm200,
+ },
+ {
+ .callback = dmi_matched,
+ .ident = "Alienware ASM201",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "ASM201"),
+ },
+ .driver_data = &quirk_asm201,
+ },
{}
};
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/4] Add support for new platform, X51-R3
2016-01-22 0:04 ` [PATCH 1/4] Add support for new platform, X51-R3 Mario Limonciello
@ 2016-01-30 17:23 ` Darren Hart
0 siblings, 0 replies; 7+ messages in thread
From: Darren Hart @ 2016-01-30 17:23 UTC (permalink / raw)
To: Mario Limonciello; +Cc: LKML, platform-driver-x86
On Thu, Jan 21, 2016 at 06:04:57PM -0600, Mario Limonciello wrote:
Hi Mario,
Thank you for patch submission.
Please remember to always include a commit message body describing your patch in
more detail than the single line subject. It should provide enough detail to get
someone unfamiliar with these changes to understand why they were needed and
how you intended to go about fixing it. This is the context needed to review the
patch.
In addition to adding X51 R3 as a separate platform from the previous X51 Family
(no R1 R2), this patch also appears to introduce various whitespace changes. Any
change made within the patch should read back to some comment in the changelog.
> Signed-off-by: Mario Limonciello <mario_limonciello@dell.com>
> ---
> drivers/platform/x86/alienware-wmi.c | 44 ++++++++++++++++++++++++------------
> 1 file changed, 29 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/platform/x86/alienware-wmi.c b/drivers/platform/x86/alienware-wmi.c
> index 1e1e594..dcd4f81 100644
> --- a/drivers/platform/x86/alienware-wmi.c
> +++ b/drivers/platform/x86/alienware-wmi.c
> @@ -69,11 +69,16 @@ static struct quirk_entry quirk_unknown = {
> .hdmi_mux = 0,
> };
>
> -static struct quirk_entry quirk_x51_family = {
> +static struct quirk_entry quirk_x51_r1_r2 = {
> .num_zones = 3,
> .hdmi_mux = 0.
> };
>
> +static struct quirk_entry quirk_x51_r3 = {
> + .num_zones = 4,
> + .hdmi_mux = 0,
> +};
> +
> static struct quirk_entry quirk_asm100 = {
> .num_zones = 2,
> .hdmi_mux = 1,
> @@ -88,12 +93,12 @@ static int __init dmi_matched(const struct dmi_system_id *dmi)
> static const struct dmi_system_id alienware_quirks[] __initconst = {
> {
> .callback = dmi_matched,
> - .ident = "Alienware X51 R1",
> + .ident = "Alienware X51 R3",
> .matches = {
> DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
> - DMI_MATCH(DMI_PRODUCT_NAME, "Alienware X51"),
> + DMI_MATCH(DMI_PRODUCT_NAME, "Alienware X51 R3"),
> },
> - .driver_data = &quirk_x51_family,
> + .driver_data = &quirk_x51_r3,
> },
> {
> .callback = dmi_matched,
> @@ -102,17 +107,26 @@ static const struct dmi_system_id alienware_quirks[] __initconst = {
> DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
> DMI_MATCH(DMI_PRODUCT_NAME, "Alienware X51 R2"),
> },
> - .driver_data = &quirk_x51_family,
> + .driver_data = &quirk_x51_r1_r2,
> + },
> + {
> + .callback = dmi_matched,
> + .ident = "Alienware X51 R1",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
> + DMI_MATCH(DMI_PRODUCT_NAME, "Alienware X51"),
> + },
> + .driver_data = &quirk_x51_r1_r2,
> },
> {
> - .callback = dmi_matched,
> - .ident = "Alienware ASM100",
> - .matches = {
> - DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
> - DMI_MATCH(DMI_PRODUCT_NAME, "ASM100"),
> - },
> - .driver_data = &quirk_asm100,
> - },
> + .callback = dmi_matched,
> + .ident = "Alienware ASM100",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
> + DMI_MATCH(DMI_PRODUCT_NAME, "ASM100"),
> + },
> + .driver_data = &quirk_asm100,
> + },
> {}
> };
>
> @@ -477,7 +491,7 @@ static ssize_t show_hdmi_cable(struct device *dev,
> };
> status =
> alienware_hdmi_command(&in_args, WMAX_METHOD_HDMI_CABLE,
> - (u32 *) &out_data);
> + (u32 *) & out_data);
> if (ACPI_SUCCESS(status)) {
> if (out_data == 0)
> return scnprintf(buf, PAGE_SIZE,
> @@ -500,7 +514,7 @@ static ssize_t show_hdmi_source(struct device *dev,
> };
> status =
> alienware_hdmi_command(&in_args, WMAX_METHOD_HDMI_STATUS,
> - (u32 *) &out_data);
> + (u32 *) & out_data);
>
> if (ACPI_SUCCESS(status)) {
> if (out_data == 1)
> --
> 1.9.1
>
>
--
Darren Hart
Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/4] alienware-wmi new platform and feature support
2016-01-22 0:04 [PATCH 0/4] alienware-wmi new platform and feature support Mario Limonciello
` (3 preceding siblings ...)
2016-01-22 0:05 ` [PATCH 4/4] Add support for two new systems: ASM200 & ASM201 Mario Limonciello
@ 2016-01-30 17:34 ` Darren Hart
4 siblings, 0 replies; 7+ messages in thread
From: Darren Hart @ 2016-01-30 17:34 UTC (permalink / raw)
To: Mario Limonciello; +Cc: LKML, platform-driver-x86
On Thu, Jan 21, 2016 at 06:04:56PM -0600, Mario Limonciello wrote:
> I've got some extensions for the alienware-wmi driver that have
> been introduced for a few new platforms and can be controlled via the WMI
> interface.
>
> Mario Limonciello (4):
> Add support for new platform, X51-R3
> Add support for alienware graphics amplifier
> Add support for deep sleep control.
> Add support for two new systems: ASM200 & ASM201
Hi Mario,
I gave these a quick scan without context from a commit message, and didn't
observe anything particularly troubling. Just a couple minor nits regarding
formatting (new lines to keep from going over 80 characters in a couple places
that weren't really necessary).
Please add commit messages to the series that will provide the reviewer and
future readers with the context they need to understand the motivation for the
patch and the intended approach against which to compare the implementation.
Thanks,
>
> drivers/platform/x86/alienware-wmi.c | 285 +++++++++++++++++++++++++++++++----
> 1 file changed, 252 insertions(+), 33 deletions(-)
>
> --
> 1.9.1
>
>
--
Darren Hart
Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-01-30 17:34 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-22 0:04 [PATCH 0/4] alienware-wmi new platform and feature support Mario Limonciello
2016-01-22 0:04 ` [PATCH 1/4] Add support for new platform, X51-R3 Mario Limonciello
2016-01-30 17:23 ` Darren Hart
2016-01-22 0:04 ` [PATCH 2/4] Add support for alienware graphics amplifier Mario Limonciello
2016-01-22 0:04 ` [PATCH 3/4] Add support for deep sleep control Mario Limonciello
2016-01-22 0:05 ` [PATCH 4/4] Add support for two new systems: ASM200 & ASM201 Mario Limonciello
2016-01-30 17:34 ` [PATCH 0/4] alienware-wmi new platform and feature support Darren Hart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox