All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Berg <bberg@redhat.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: 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 <platform-driver-x86@vger.kernel.org>,
	Peter FP1 Zhang <zhangfp1@lenovo.com>, Lyude <lyude@redhat.com>
Subject: Re: [PATCH] platform/x86: thinkpad_acpi: Accept flat mode for type 4 multi mode status
Date: Tue, 14 Nov 2017 20:29:10 +0100	[thread overview]
Message-ID: <1510687750.5746.35.camel@redhat.com> (raw)
In-Reply-To: <CAHp75VeQXSF0ZqE6dr1=Mm0n25OJsAJ5_6uT-nb7TLKgpbsWFg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2122 bytes --]

On Tue, 2017-11-14 at 18:58 +0200, Andy Shevchenko wrote:
> On Tue, Nov 14, 2017 at 6:14 PM, Benjamin Berg <bberg@redhat.com>
> 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.
> 
> If we can't check on all available hardware, better to avoid "doing
> for all" fixes.
> I suppose DMI match can help here.

The documentation I saw suggests that the flat mode cannot be detected
by machines reporting a multi mode status of type 4. This is why the
original patch excluded the FLAT mode in the list of valid modes on
those devices.

I think it is safe to simply assume that all laptops reporting type 4
can actually detect the flat state. Doing so will not affect actual
state reporting on machines that may not be able to detect it. And I
don't think that the information whether the flat state can be detected
or not is interesting enough to bother with DMI matches.

Benjamin

> It would be nice to hear from Henrique and others as well.
> 
> 
> >         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;
> 
> The common practice is to put
> /* fallthrough */
> instead.
> 
> >         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.
> > +                */
> 
> We don't use network subsystem style of comments.
> 
> >                 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;
> 
> 

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2017-11-14 19:29 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 [this message]
2017-11-14 17:46 ` [ibm-acpi-devel] " Lyude Paul
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=1510687750.5746.35.camel@redhat.com \
    --to=bberg@redhat.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=andy@infradead.org \
    --cc=dvhart@infradead.org \
    --cc=ibm-acpi-devel@lists.sourceforge.net \
    --cc=ibm-acpi@hmh.eng.br \
    --cc=lyude@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.