aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/hp-wmi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/platform/x86/hp-wmi.c')
-rw-r--r--drivers/platform/x86/hp-wmi.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
index 1c86fa0857c8..8ba8956b5a48 100644
--- a/drivers/platform/x86/hp-wmi.c
+++ b/drivers/platform/x86/hp-wmi.c
@@ -54,6 +54,7 @@ MODULE_ALIAS("wmi:5FB7F034-2C63-45e9-BE91-3D44E2C707E4");
54#define HPWMI_HARDWARE_QUERY 0x4 54#define HPWMI_HARDWARE_QUERY 0x4
55#define HPWMI_WIRELESS_QUERY 0x5 55#define HPWMI_WIRELESS_QUERY 0x5
56#define HPWMI_HOTKEY_QUERY 0xc 56#define HPWMI_HOTKEY_QUERY 0xc
57#define HPWMI_FEATURE_QUERY 0xd
57#define HPWMI_WIRELESS2_QUERY 0x1b 58#define HPWMI_WIRELESS2_QUERY 0x1b
58#define HPWMI_POSTCODEERROR_QUERY 0x2a 59#define HPWMI_POSTCODEERROR_QUERY 0x2a
59 60
@@ -292,6 +293,17 @@ static int hp_wmi_tablet_state(void)
292 return (state & 0x4) ? 1 : 0; 293 return (state & 0x4) ? 1 : 0;
293} 294}
294 295
296static int hp_wmi_bios_2009_later(void)
297{
298 int state = 0;
299 int ret = hp_wmi_perform_query(HPWMI_FEATURE_QUERY, 0, &state,
300 sizeof(state), sizeof(state));
301 if (ret)
302 return ret;
303
304 return (state & 0x10) ? 1 : 0;
305}
306
295static int hp_wmi_set_block(void *data, bool blocked) 307static int hp_wmi_set_block(void *data, bool blocked)
296{ 308{
297 enum hp_wmi_radio r = (enum hp_wmi_radio) data; 309 enum hp_wmi_radio r = (enum hp_wmi_radio) data;
@@ -871,7 +883,7 @@ static int __init hp_wmi_bios_setup(struct platform_device *device)
871 gps_rfkill = NULL; 883 gps_rfkill = NULL;
872 rfkill2_count = 0; 884 rfkill2_count = 0;
873 885
874 if (hp_wmi_rfkill_setup(device)) 886 if (hp_wmi_bios_2009_later() || hp_wmi_rfkill_setup(device))
875 hp_wmi_rfkill2_setup(device); 887 hp_wmi_rfkill2_setup(device);
876 888
877 err = device_create_file(&device->dev, &dev_attr_display); 889 err = device_create_file(&device->dev, &dev_attr_display);