diff options
Diffstat (limited to 'drivers/platform/x86/hp-wmi.c')
| -rw-r--r-- | drivers/platform/x86/hp-wmi.c | 33 | 
1 files changed, 22 insertions, 11 deletions
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c index bc7020e9df9e..627a6d0eaf83 100644 --- a/drivers/platform/x86/hp-wmi.c +++ b/drivers/platform/x86/hp-wmi.c @@ -177,7 +177,8 @@ enum hp_thermal_profile_omen_v1 {  enum hp_thermal_profile {  	HP_THERMAL_PROFILE_PERFORMANCE	= 0x00,  	HP_THERMAL_PROFILE_DEFAULT		= 0x01, -	HP_THERMAL_PROFILE_COOL			= 0x02 +	HP_THERMAL_PROFILE_COOL			= 0x02, +	HP_THERMAL_PROFILE_QUIET		= 0x03,  };  #define IS_HWBLOCKED(x) ((x & HPWMI_POWER_FW_OR_HW) != HPWMI_POWER_FW_OR_HW) @@ -206,15 +207,17 @@ struct bios_rfkill2_state {  };  static const struct key_entry hp_wmi_keymap[] = { -	{ KE_KEY, 0x02,   { KEY_BRIGHTNESSUP } }, -	{ KE_KEY, 0x03,   { KEY_BRIGHTNESSDOWN } }, -	{ KE_KEY, 0x20e6, { KEY_PROG1 } }, -	{ KE_KEY, 0x20e8, { KEY_MEDIA } }, -	{ KE_KEY, 0x2142, { KEY_MEDIA } }, -	{ KE_KEY, 0x213b, { KEY_INFO } }, -	{ KE_KEY, 0x2169, { KEY_ROTATE_DISPLAY } }, -	{ KE_KEY, 0x216a, { KEY_SETUP } }, -	{ KE_KEY, 0x231b, { KEY_HELP } }, +	{ KE_KEY, 0x02,    { KEY_BRIGHTNESSUP } }, +	{ KE_KEY, 0x03,    { KEY_BRIGHTNESSDOWN } }, +	{ KE_KEY, 0x20e6,  { KEY_PROG1 } }, +	{ KE_KEY, 0x20e8,  { KEY_MEDIA } }, +	{ KE_KEY, 0x2142,  { KEY_MEDIA } }, +	{ KE_KEY, 0x213b,  { KEY_INFO } }, +	{ KE_KEY, 0x2169,  { KEY_ROTATE_DISPLAY } }, +	{ KE_KEY, 0x216a,  { KEY_SETUP } }, +	{ KE_KEY, 0x21a9,  { KEY_TOUCHPAD_OFF } }, +	{ KE_KEY, 0x121a9, { KEY_TOUCHPAD_ON } }, +	{ KE_KEY, 0x231b,  { KEY_HELP } },  	{ KE_END, 0 }  }; @@ -1194,6 +1197,9 @@ static int hp_wmi_platform_profile_get(struct platform_profile_handler *pprof,  	case HP_THERMAL_PROFILE_COOL:  		*profile =  PLATFORM_PROFILE_COOL;  		break; +	case HP_THERMAL_PROFILE_QUIET: +		*profile = PLATFORM_PROFILE_QUIET; +		break;  	default:  		return -EINVAL;  	} @@ -1216,6 +1222,9 @@ static int hp_wmi_platform_profile_set(struct platform_profile_handler *pprof,  	case PLATFORM_PROFILE_COOL:  		tp =  HP_THERMAL_PROFILE_COOL;  		break; +	case PLATFORM_PROFILE_QUIET: +		tp = HP_THERMAL_PROFILE_QUIET; +		break;  	default:  		return -EOPNOTSUPP;  	} @@ -1263,6 +1272,8 @@ static int thermal_profile_setup(void)  		platform_profile_handler.profile_get = hp_wmi_platform_profile_get;  		platform_profile_handler.profile_set = hp_wmi_platform_profile_set; + +		set_bit(PLATFORM_PROFILE_QUIET, platform_profile_handler.choices);  	}  	set_bit(PLATFORM_PROFILE_COOL, platform_profile_handler.choices); @@ -1508,7 +1519,7 @@ static int __init hp_wmi_init(void)  	if (bios_capable) {  		hp_wmi_platform_dev = -			platform_device_register_simple("hp-wmi", -1, NULL, 0); +			platform_device_register_simple("hp-wmi", PLATFORM_DEVID_NONE, NULL, 0);  		if (IS_ERR(hp_wmi_platform_dev)) {  			err = PTR_ERR(hp_wmi_platform_dev);  			goto err_destroy_input;  |