From: Hans de Goede <hdegoede@redhat.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Sachi King <nakato@nakato.io>, Chen Yu <yu.c.chen@intel.com>,
Mark Gross <markgross@kernel.org>,
Maximilian Luz <luzmaximilian@gmail.com>,
Platform Driver <platform-driver-x86@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] platform/surface: surfacepro3_button: don't load on amd variant
Date: Tue, 1 Mar 2022 22:03:59 +0100 [thread overview]
Message-ID: <7eb134f9-a633-70f4-0089-c864e5add4d2@redhat.com> (raw)
In-Reply-To: <Yh6Joy2HDnsuK6LN@google.com>
Hi All,
On 3/1/22 22:01, Dmitry Torokhov wrote:
> On Tue, Nov 09, 2021 at 11:12:34AM +0200, Andy Shevchenko wrote:
>> On Tue, Nov 9, 2021 at 10:11 AM Sachi King <nakato@nakato.io> wrote:
>>>
>>> The AMD variant of the Surface Laptop report 0 for their OEM platform
>>> revision. The Surface devices that require the surfacepro3_button
>>> driver do not have the _DSM that gets the OEM platform revision. If the
>>> method does not exist, load surfacepro3_button.
>>
>> ...
>>
>>> * Surface Pro 4 and Surface Book 2 / Surface Pro 2017 use the same device
>>> * ID (MSHW0040) for the power/volume buttons. Make sure this is the right
>>> - * device by checking for the _DSM method and OEM Platform Revision.
>>> + * device by checking for the _DSM method and OEM Platform Revision DSM
>>> + * function.
>>
>> Not sure what this change means (not a native speaker).
>>
>> ...
>>
>>> - dev_dbg(&dev->dev, "OEM Platform Revision %llu\n", oem_platform_rev);
>>
>> I think this is useful to have.
>>
>> What about leaving it as is for debugging purposes and just replacing
>> the last test?
>
> I agree it is nice to be able to print it for debug purposes, but it has
> to be fetched separately, as with the proposed change we are not reading
> it.
>
> If I am understanding the change it wants to call acpi_dsm_check()
> to verify whether MSHW0040_DSM_GET_OMPR function exists at all (which is
> done by reading _DSM MSHW0040_DSM_UUID, revision MSHW0040_DSM_REVISION,
> function 0. Only if function 0 indicates that function
> MSHW0040_DSM_GET_OMPR is supported in this _DSM, we can read it to get
> the real version number, which can be 0.
>
> Treating 0 as an invalid version as it was done in original change is
> wrong.
>
> I propose we combine the old and new code, call acpi_dsm_check() and
> bail if it returns false, otherwise proceed to calling
> acpi_evaluate_dsm_typed() and dev_dbg() the version.
>
> Sachi, are you going to update the patch? You do not need to adjust the
> surface driver as Hans is getting rid of it.
Right, for more info on that see:
https://lore.kernel.org/linux-input/20220224110241.9613-1-hdegoede@redhat.com/
Regards,
Hans
next prev parent reply other threads:[~2022-03-01 21:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-09 8:11 [PATCH 1/2] Input: soc_button_array - support AMD variant Surface devices Sachi King
2021-11-09 8:11 ` [PATCH 2/2] platform/surface: surfacepro3_button: don't load on amd variant Sachi King
2021-11-09 9:12 ` Andy Shevchenko
2022-03-01 21:01 ` Dmitry Torokhov
2022-03-01 21:03 ` Hans de Goede [this message]
2021-11-11 9:39 ` Hans de Goede
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=7eb134f9-a633-70f4-0089-c864e5add4d2@redhat.com \
--to=hdegoede@redhat.com \
--cc=andy.shevchenko@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luzmaximilian@gmail.com \
--cc=markgross@kernel.org \
--cc=nakato@nakato.io \
--cc=platform-driver-x86@vger.kernel.org \
--cc=yu.c.chen@intel.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
all inboxes | Powered by JetHome®