mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
platform/x86: alienware-wmi: Split DMI table
Split thermal features into a new DMI table to support upcoming file split. While at it: Rename quirk_entry -> alienfx_quirks, Rename quirks -> alienfx and change hdmi_mux, amplifier and deepslp types to bool, because they are already being implicitly used as bools. Reviewed-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Kurt Borja <kuurtb@gmail.com> Link: https://lore.kernel.org/r/20250207154610.13675-8-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
This commit is contained in:
parent
27e9e63398
commit
6d7f1b1a5d
1 changed files with 175 additions and 188 deletions
|
@ -114,102 +114,68 @@ static const enum platform_profile_option wmax_mode_to_platform_profile[THERMAL_
|
||||||
[THERMAL_MODE_BASIC_PERFORMANCE] = PLATFORM_PROFILE_PERFORMANCE,
|
[THERMAL_MODE_BASIC_PERFORMANCE] = PLATFORM_PROFILE_PERFORMANCE,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct quirk_entry {
|
struct alienfx_quirks {
|
||||||
u8 num_zones;
|
u8 num_zones;
|
||||||
u8 hdmi_mux;
|
bool hdmi_mux;
|
||||||
u8 amplifier;
|
bool amplifier;
|
||||||
u8 deepslp;
|
bool deepslp;
|
||||||
bool thermal;
|
|
||||||
bool gmode;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct quirk_entry *quirks;
|
static struct alienfx_quirks *alienfx;
|
||||||
|
|
||||||
|
|
||||||
static struct quirk_entry quirk_inspiron5675 = {
|
static struct alienfx_quirks quirk_inspiron5675 = {
|
||||||
.num_zones = 2,
|
.num_zones = 2,
|
||||||
.hdmi_mux = 0,
|
.hdmi_mux = false,
|
||||||
.amplifier = 0,
|
.amplifier = false,
|
||||||
.deepslp = 0,
|
.deepslp = false,
|
||||||
.thermal = false,
|
|
||||||
.gmode = false,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct quirk_entry quirk_unknown = {
|
static struct alienfx_quirks quirk_unknown = {
|
||||||
.num_zones = 2,
|
.num_zones = 2,
|
||||||
.hdmi_mux = 0,
|
.hdmi_mux = false,
|
||||||
.amplifier = 0,
|
.amplifier = false,
|
||||||
.deepslp = 0,
|
.deepslp = false,
|
||||||
.thermal = false,
|
|
||||||
.gmode = false,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct quirk_entry quirk_x51_r1_r2 = {
|
static struct alienfx_quirks quirk_x51_r1_r2 = {
|
||||||
.num_zones = 3,
|
.num_zones = 3,
|
||||||
.hdmi_mux = 0,
|
.hdmi_mux = false,
|
||||||
.amplifier = 0,
|
.amplifier = false,
|
||||||
.deepslp = 0,
|
.deepslp = false,
|
||||||
.thermal = false,
|
|
||||||
.gmode = false,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct quirk_entry quirk_x51_r3 = {
|
static struct alienfx_quirks quirk_x51_r3 = {
|
||||||
.num_zones = 4,
|
.num_zones = 4,
|
||||||
.hdmi_mux = 0,
|
.hdmi_mux = false,
|
||||||
.amplifier = 1,
|
.amplifier = true,
|
||||||
.deepslp = 0,
|
.deepslp = false,
|
||||||
.thermal = false,
|
|
||||||
.gmode = false,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct quirk_entry quirk_asm100 = {
|
static struct alienfx_quirks quirk_asm100 = {
|
||||||
.num_zones = 2,
|
.num_zones = 2,
|
||||||
.hdmi_mux = 1,
|
.hdmi_mux = true,
|
||||||
.amplifier = 0,
|
.amplifier = false,
|
||||||
.deepslp = 0,
|
.deepslp = false,
|
||||||
.thermal = false,
|
|
||||||
.gmode = false,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct quirk_entry quirk_asm200 = {
|
static struct alienfx_quirks quirk_asm200 = {
|
||||||
.num_zones = 2,
|
.num_zones = 2,
|
||||||
.hdmi_mux = 1,
|
.hdmi_mux = true,
|
||||||
.amplifier = 0,
|
.amplifier = false,
|
||||||
.deepslp = 1,
|
.deepslp = true,
|
||||||
.thermal = false,
|
|
||||||
.gmode = false,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct quirk_entry quirk_asm201 = {
|
static struct alienfx_quirks quirk_asm201 = {
|
||||||
.num_zones = 2,
|
.num_zones = 2,
|
||||||
.hdmi_mux = 1,
|
.hdmi_mux = true,
|
||||||
.amplifier = 1,
|
.amplifier = true,
|
||||||
.deepslp = 1,
|
.deepslp = true,
|
||||||
.thermal = false,
|
|
||||||
.gmode = false,
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct quirk_entry quirk_g_series = {
|
|
||||||
.num_zones = 0,
|
|
||||||
.hdmi_mux = 0,
|
|
||||||
.amplifier = 0,
|
|
||||||
.deepslp = 0,
|
|
||||||
.thermal = true,
|
|
||||||
.gmode = true,
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct quirk_entry quirk_x_series = {
|
|
||||||
.num_zones = 0,
|
|
||||||
.hdmi_mux = 0,
|
|
||||||
.amplifier = 0,
|
|
||||||
.deepslp = 0,
|
|
||||||
.thermal = true,
|
|
||||||
.gmode = false,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init dmi_matched(const struct dmi_system_id *dmi)
|
static int __init dmi_matched(const struct dmi_system_id *dmi)
|
||||||
{
|
{
|
||||||
quirks = dmi->driver_data;
|
alienfx = dmi->driver_data;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -241,51 +207,6 @@ static const struct dmi_system_id alienware_quirks[] __initconst = {
|
||||||
},
|
},
|
||||||
.driver_data = &quirk_asm201,
|
.driver_data = &quirk_asm201,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
.callback = dmi_matched,
|
|
||||||
.ident = "Alienware m16 R1 AMD",
|
|
||||||
.matches = {
|
|
||||||
DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
|
|
||||||
DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m16 R1 AMD"),
|
|
||||||
},
|
|
||||||
.driver_data = &quirk_x_series,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
.callback = dmi_matched,
|
|
||||||
.ident = "Alienware m17 R5",
|
|
||||||
.matches = {
|
|
||||||
DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
|
|
||||||
DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m17 R5 AMD"),
|
|
||||||
},
|
|
||||||
.driver_data = &quirk_x_series,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
.callback = dmi_matched,
|
|
||||||
.ident = "Alienware m18 R2",
|
|
||||||
.matches = {
|
|
||||||
DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
|
|
||||||
DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m18 R2"),
|
|
||||||
},
|
|
||||||
.driver_data = &quirk_x_series,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
.callback = dmi_matched,
|
|
||||||
.ident = "Alienware x15 R1",
|
|
||||||
.matches = {
|
|
||||||
DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
|
|
||||||
DMI_MATCH(DMI_PRODUCT_NAME, "Alienware x15 R1"),
|
|
||||||
},
|
|
||||||
.driver_data = &quirk_x_series,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
.callback = dmi_matched,
|
|
||||||
.ident = "Alienware x17 R2",
|
|
||||||
.matches = {
|
|
||||||
DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
|
|
||||||
DMI_MATCH(DMI_PRODUCT_NAME, "Alienware x17 R2"),
|
|
||||||
},
|
|
||||||
.driver_data = &quirk_x_series,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
.callback = dmi_matched,
|
.callback = dmi_matched,
|
||||||
.ident = "Alienware X51 R1",
|
.ident = "Alienware X51 R1",
|
||||||
|
@ -313,60 +234,6 @@ static const struct dmi_system_id alienware_quirks[] __initconst = {
|
||||||
},
|
},
|
||||||
.driver_data = &quirk_x51_r3,
|
.driver_data = &quirk_x51_r3,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
.callback = dmi_matched,
|
|
||||||
.ident = "Dell Inc. G15 5510",
|
|
||||||
.matches = {
|
|
||||||
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
|
||||||
DMI_MATCH(DMI_PRODUCT_NAME, "Dell G15 5510"),
|
|
||||||
},
|
|
||||||
.driver_data = &quirk_g_series,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
.callback = dmi_matched,
|
|
||||||
.ident = "Dell Inc. G15 5511",
|
|
||||||
.matches = {
|
|
||||||
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
|
||||||
DMI_MATCH(DMI_PRODUCT_NAME, "Dell G15 5511"),
|
|
||||||
},
|
|
||||||
.driver_data = &quirk_g_series,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
.callback = dmi_matched,
|
|
||||||
.ident = "Dell Inc. G15 5515",
|
|
||||||
.matches = {
|
|
||||||
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
|
||||||
DMI_MATCH(DMI_PRODUCT_NAME, "Dell G15 5515"),
|
|
||||||
},
|
|
||||||
.driver_data = &quirk_g_series,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
.callback = dmi_matched,
|
|
||||||
.ident = "Dell Inc. G3 3500",
|
|
||||||
.matches = {
|
|
||||||
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
|
||||||
DMI_MATCH(DMI_PRODUCT_NAME, "G3 3500"),
|
|
||||||
},
|
|
||||||
.driver_data = &quirk_g_series,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
.callback = dmi_matched,
|
|
||||||
.ident = "Dell Inc. G3 3590",
|
|
||||||
.matches = {
|
|
||||||
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
|
||||||
DMI_MATCH(DMI_PRODUCT_NAME, "G3 3590"),
|
|
||||||
},
|
|
||||||
.driver_data = &quirk_g_series,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
.callback = dmi_matched,
|
|
||||||
.ident = "Dell Inc. G5 5500",
|
|
||||||
.matches = {
|
|
||||||
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
|
||||||
DMI_MATCH(DMI_PRODUCT_NAME, "G5 5500"),
|
|
||||||
},
|
|
||||||
.driver_data = &quirk_g_series,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
.callback = dmi_matched,
|
.callback = dmi_matched,
|
||||||
.ident = "Dell Inc. Inspiron 5675",
|
.ident = "Dell Inc. Inspiron 5675",
|
||||||
|
@ -441,6 +308,116 @@ struct alienfx_platdata {
|
||||||
|
|
||||||
static u8 interface;
|
static u8 interface;
|
||||||
|
|
||||||
|
struct awcc_quirks {
|
||||||
|
bool pprof;
|
||||||
|
bool gmode;
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct awcc_quirks g_series_quirks = {
|
||||||
|
.pprof = true,
|
||||||
|
.gmode = true,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct awcc_quirks generic_quirks = {
|
||||||
|
.pprof = true,
|
||||||
|
.gmode = false,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct awcc_quirks empty_quirks;
|
||||||
|
|
||||||
|
static const struct dmi_system_id awcc_dmi_table[] __initconst = {
|
||||||
|
{
|
||||||
|
.ident = "Alienware m16 R1 AMD",
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
|
||||||
|
DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m16 R1 AMD"),
|
||||||
|
},
|
||||||
|
.driver_data = &generic_quirks,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.ident = "Alienware m17 R5",
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
|
||||||
|
DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m17 R5 AMD"),
|
||||||
|
},
|
||||||
|
.driver_data = &generic_quirks,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.ident = "Alienware m18 R2",
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
|
||||||
|
DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m18 R2"),
|
||||||
|
},
|
||||||
|
.driver_data = &generic_quirks,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.ident = "Alienware x15 R1",
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
|
||||||
|
DMI_MATCH(DMI_PRODUCT_NAME, "Alienware x15 R1"),
|
||||||
|
},
|
||||||
|
.driver_data = &generic_quirks,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.ident = "Alienware x17 R2",
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
|
||||||
|
DMI_MATCH(DMI_PRODUCT_NAME, "Alienware x17 R2"),
|
||||||
|
},
|
||||||
|
.driver_data = &generic_quirks,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.ident = "Dell Inc. G15 5510",
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
||||||
|
DMI_MATCH(DMI_PRODUCT_NAME, "Dell G15 5510"),
|
||||||
|
},
|
||||||
|
.driver_data = &g_series_quirks,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.ident = "Dell Inc. G15 5511",
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
||||||
|
DMI_MATCH(DMI_PRODUCT_NAME, "Dell G15 5511"),
|
||||||
|
},
|
||||||
|
.driver_data = &g_series_quirks,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.ident = "Dell Inc. G15 5515",
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
||||||
|
DMI_MATCH(DMI_PRODUCT_NAME, "Dell G15 5515"),
|
||||||
|
},
|
||||||
|
.driver_data = &g_series_quirks,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.ident = "Dell Inc. G3 3500",
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
||||||
|
DMI_MATCH(DMI_PRODUCT_NAME, "G3 3500"),
|
||||||
|
},
|
||||||
|
.driver_data = &g_series_quirks,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.ident = "Dell Inc. G3 3590",
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
||||||
|
DMI_MATCH(DMI_PRODUCT_NAME, "G3 3590"),
|
||||||
|
},
|
||||||
|
.driver_data = &g_series_quirks,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.ident = "Dell Inc. G5 5500",
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
||||||
|
DMI_MATCH(DMI_PRODUCT_NAME, "G5 5500"),
|
||||||
|
},
|
||||||
|
.driver_data = &g_series_quirks,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct awcc_quirks *awcc;
|
||||||
|
|
||||||
static int alienware_wmi_command(struct wmi_device *wdev, u32 method_id,
|
static int alienware_wmi_command(struct wmi_device *wdev, u32 method_id,
|
||||||
void *in_args, size_t in_size, u32 *out_data)
|
void *in_args, size_t in_size, u32 *out_data)
|
||||||
{
|
{
|
||||||
|
@ -623,7 +600,7 @@ static DEVICE_ATTR_RW(lighting_control_state);
|
||||||
static umode_t zone_attr_visible(struct kobject *kobj,
|
static umode_t zone_attr_visible(struct kobject *kobj,
|
||||||
struct attribute *attr, int n)
|
struct attribute *attr, int n)
|
||||||
{
|
{
|
||||||
if (n < quirks->num_zones + 1)
|
if (n < alienfx->num_zones + 1)
|
||||||
return attr->mode;
|
return attr->mode;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -631,7 +608,7 @@ static umode_t zone_attr_visible(struct kobject *kobj,
|
||||||
|
|
||||||
static bool zone_group_visible(struct kobject *kobj)
|
static bool zone_group_visible(struct kobject *kobj)
|
||||||
{
|
{
|
||||||
return quirks->num_zones > 0;
|
return alienfx->num_zones > 0;
|
||||||
}
|
}
|
||||||
DEFINE_SYSFS_GROUP_VISIBLE(zone);
|
DEFINE_SYSFS_GROUP_VISIBLE(zone);
|
||||||
|
|
||||||
|
@ -754,7 +731,7 @@ static DEVICE_ATTR_RW(source);
|
||||||
|
|
||||||
static bool hdmi_group_visible(struct kobject *kobj)
|
static bool hdmi_group_visible(struct kobject *kobj)
|
||||||
{
|
{
|
||||||
return interface == WMAX && quirks->hdmi_mux;
|
return interface == WMAX && alienfx->hdmi_mux;
|
||||||
}
|
}
|
||||||
DEFINE_SIMPLE_SYSFS_GROUP_VISIBLE(hdmi);
|
DEFINE_SIMPLE_SYSFS_GROUP_VISIBLE(hdmi);
|
||||||
|
|
||||||
|
@ -802,7 +779,7 @@ static DEVICE_ATTR_RO(status);
|
||||||
|
|
||||||
static bool amplifier_group_visible(struct kobject *kobj)
|
static bool amplifier_group_visible(struct kobject *kobj)
|
||||||
{
|
{
|
||||||
return interface == WMAX && quirks->amplifier;
|
return interface == WMAX && alienfx->amplifier;
|
||||||
}
|
}
|
||||||
DEFINE_SIMPLE_SYSFS_GROUP_VISIBLE(amplifier);
|
DEFINE_SIMPLE_SYSFS_GROUP_VISIBLE(amplifier);
|
||||||
|
|
||||||
|
@ -873,7 +850,7 @@ static DEVICE_ATTR_RW(deepsleep);
|
||||||
|
|
||||||
static bool deepsleep_group_visible(struct kobject *kobj)
|
static bool deepsleep_group_visible(struct kobject *kobj)
|
||||||
{
|
{
|
||||||
return interface == WMAX && quirks->deepslp;
|
return interface == WMAX && alienfx->deepslp;
|
||||||
}
|
}
|
||||||
DEFINE_SIMPLE_SYSFS_GROUP_VISIBLE(deepsleep);
|
DEFINE_SIMPLE_SYSFS_GROUP_VISIBLE(deepsleep);
|
||||||
|
|
||||||
|
@ -1013,7 +990,7 @@ static int thermal_profile_set(struct device *dev,
|
||||||
{
|
{
|
||||||
struct awcc_priv *priv = dev_get_drvdata(dev);
|
struct awcc_priv *priv = dev_get_drvdata(dev);
|
||||||
|
|
||||||
if (quirks->gmode) {
|
if (awcc->gmode) {
|
||||||
u32 gmode_status;
|
u32 gmode_status;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
@ -1079,7 +1056,7 @@ static int thermal_profile_probe(void *drvdata, unsigned long *choices)
|
||||||
if (bitmap_empty(choices, PLATFORM_PROFILE_LAST))
|
if (bitmap_empty(choices, PLATFORM_PROFILE_LAST))
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
if (quirks->gmode) {
|
if (awcc->gmode) {
|
||||||
priv->supported_thermal_profiles[PLATFORM_PROFILE_PERFORMANCE] =
|
priv->supported_thermal_profiles[PLATFORM_PROFILE_PERFORMANCE] =
|
||||||
WMAX_THERMAL_MODE_GMODE;
|
WMAX_THERMAL_MODE_GMODE;
|
||||||
|
|
||||||
|
@ -1117,7 +1094,7 @@ static int alienware_awcc_setup(struct wmi_device *wdev)
|
||||||
priv->wdev = wdev;
|
priv->wdev = wdev;
|
||||||
dev_set_drvdata(&wdev->dev, priv);
|
dev_set_drvdata(&wdev->dev, priv);
|
||||||
|
|
||||||
if (quirks->thermal) {
|
if (awcc->pprof) {
|
||||||
ret = awcc_platform_profile_init(wdev);
|
ret = awcc_platform_profile_init(wdev);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -1312,7 +1289,7 @@ static int wmax_wmi_probe(struct wmi_device *wdev, const void *context)
|
||||||
};
|
};
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (quirks->thermal)
|
if (awcc)
|
||||||
ret = alienware_awcc_setup(wdev);
|
ret = alienware_awcc_setup(wdev);
|
||||||
else
|
else
|
||||||
ret = alienware_alienfx_setup(&pdata);
|
ret = alienware_alienfx_setup(&pdata);
|
||||||
|
@ -1338,6 +1315,26 @@ static struct wmi_driver alienware_wmax_wmi_driver = {
|
||||||
|
|
||||||
static int __init alienware_wmax_wmi_init(void)
|
static int __init alienware_wmax_wmi_init(void)
|
||||||
{
|
{
|
||||||
|
const struct dmi_system_id *id;
|
||||||
|
|
||||||
|
id = dmi_first_match(awcc_dmi_table);
|
||||||
|
if (id)
|
||||||
|
awcc = id->driver_data;
|
||||||
|
|
||||||
|
if (force_platform_profile) {
|
||||||
|
if (!awcc)
|
||||||
|
awcc = &empty_quirks;
|
||||||
|
|
||||||
|
awcc->pprof = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (force_gmode) {
|
||||||
|
if (awcc)
|
||||||
|
awcc->gmode = true;
|
||||||
|
else
|
||||||
|
pr_warn("force_gmode requires platform profile support\n");
|
||||||
|
}
|
||||||
|
|
||||||
return wmi_driver_register(&alienware_wmax_wmi_driver);
|
return wmi_driver_register(&alienware_wmax_wmi_driver);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1351,18 +1348,8 @@ static int __init alienware_wmi_init(void)
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
dmi_check_system(alienware_quirks);
|
dmi_check_system(alienware_quirks);
|
||||||
if (quirks == NULL)
|
if (!alienfx)
|
||||||
quirks = &quirk_unknown;
|
alienfx = &quirk_unknown;
|
||||||
|
|
||||||
if (force_platform_profile)
|
|
||||||
quirks->thermal = true;
|
|
||||||
|
|
||||||
if (force_gmode) {
|
|
||||||
if (quirks->thermal)
|
|
||||||
quirks->gmode = true;
|
|
||||||
else
|
|
||||||
pr_warn("force_gmode requires platform profile support\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = platform_driver_register(&platform_driver);
|
ret = platform_driver_register(&platform_driver);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
|
Loading…
Add table
Reference in a new issue