From: Lyude Paul <lyude@redhat.com>
To: Benjamin Berg <bberg@redhat.com>,
Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>,
Darren Hart <dvhart@infradead.org>,
Andy Shevchenko <andy@infradead.org>,
ibm-acpi-devel@lists.sourceforge.net,
platform-driver-x86@vger.kernel.org
Cc: Peter FP1 Zhang <zhangfp1@lenovo.com>
Subject: Re: [ibm-acpi-devel] [PATCH] platform/x86: thinkpad_acpi: Accept flat mode for type 4 multi mode status
Date: Tue, 14 Nov 2017 12:46:16 -0500 [thread overview]
Message-ID: <1510681576.13660.4.camel@redhat.com> (raw)
In-Reply-To: <20171114161414.14297-1-bberg@redhat.com>
lgtm.
Reviewed-by: Lyude Paul <lyude@redhat.com>
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@redhat.com>
> Cc: Peter FP1 Zhang <zhangfp1@lenovo.com
> Cc: Lyude <lyude@redhat.com>
> ---
> 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;
next prev parent reply other threads:[~2017-11-14 17:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-14 16:14 [PATCH] platform/x86: thinkpad_acpi: Accept flat mode for type 4 multi mode status Benjamin Berg
2017-11-14 16:58 ` Andy Shevchenko
2017-11-14 19:29 ` Benjamin Berg
2017-11-14 17:46 ` Lyude Paul [this message]
2017-12-18 12:19 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1510681576.13660.4.camel@redhat.com \
--to=lyude@redhat.com \
--cc=andy@infradead.org \
--cc=bberg@redhat.com \
--cc=dvhart@infradead.org \
--cc=ibm-acpi-devel@lists.sourceforge.net \
--cc=ibm-acpi@hmh.eng.br \
--cc=platform-driver-x86@vger.kernel.org \
--cc=zhangfp1@lenovo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox