Re: [ibm-acpi-devel] [PATCH] platform/x86: thinkpad_acpi: Accept flat mode for type 4 multi mode status

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



lgtm.

Reviewed-by: Lyude Paul <lyude@xxxxxxxxxx>

On Tue, 2017-11-14 at 17:14 +0100, Benjamin Berg wrote:
> On the X1 Yoga 2nd Generation and most likely other notebooks the FLAT
> mode is reported. Decode it correctly rather than warning about an
> unexpected multi mode status to be reported.
> 
> Signed-off-by: Benjamin Berg <bberg@xxxxxxxxxx>
> Cc: Peter FP1 Zhang <zhangfp1@xxxxxxxxxx
> Cc: Lyude <lyude@xxxxxxxxxx>
> ---
>  drivers/platform/x86/thinkpad_acpi.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/platform/x86/thinkpad_acpi.c
> b/drivers/platform/x86/thinkpad_acpi.c
> index 91fab1a13a6d..d23c84222e9f 100644
> --- a/drivers/platform/x86/thinkpad_acpi.c
> +++ b/drivers/platform/x86/thinkpad_acpi.c
> @@ -2106,26 +2106,24 @@ static int hotkey_gmms_get_tablet_mode(int s, int
> *has_tablet_mode)
>  			      TP_ACPI_MULTI_MODE_FLAT |
>  			      TP_ACPI_MULTI_MODE_TABLET |
>  			      TP_ACPI_MULTI_MODE_STAND |
>  			      TP_ACPI_MULTI_MODE_TENT;
>  		break;
>  	case 3:
>  		valid_modes = TP_ACPI_MULTI_MODE_LAPTOP |
>  			      TP_ACPI_MULTI_MODE_FLAT;
>  		break;
>  	case 4:
> -		valid_modes = TP_ACPI_MULTI_MODE_LAPTOP |
> -			      TP_ACPI_MULTI_MODE_TABLET |
> -			      TP_ACPI_MULTI_MODE_STAND |
> -			      TP_ACPI_MULTI_MODE_TENT;
> -		break;
>  	case 5:
> +		/* In mode 4, FLAT is not specified as a valid mode.
> However,
> +		 * it can be seen at least on the X1 Yoga 2nd Generation.
> +		 */
>  		valid_modes = TP_ACPI_MULTI_MODE_LAPTOP |
>  			      TP_ACPI_MULTI_MODE_FLAT |
>  			      TP_ACPI_MULTI_MODE_TABLET |
>  			      TP_ACPI_MULTI_MODE_STAND |
>  			      TP_ACPI_MULTI_MODE_TENT;
>  		break;
>  	default:
>  		pr_err("Unknown multi mode status type %d with value
> 0x%04X, please report this to %s\n",
>  		       type, value, TPACPI_MAIL);
>  		return 0;



[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux