LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Yurii Pavlovskyi <yurii.pavlovskyi@gmail.com>
To: "Pawnikar, Sumeet R" <sumeet.r.pawnikar@intel.com>
Cc: Corentin Chary <corentin.chary@gmail.com>,
Darren Hart <dvhart@infradead.org>,
Andy Shevchenko <andy@infradead.org>,
Daniel Drake <drake@endlessm.com>,
"acpi4asus-user@lists.sourceforge.net"
<acpi4asus-user@lists.sourceforge.net>,
"platform-driver-x86@vger.kernel.org"
<platform-driver-x86@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 08/11] platform/x86: asus-wmi: Enhance detection of thermal data
Date: Thu, 25 Apr 2019 20:51:54 +0200 [thread overview]
Message-ID: <a5d5f899-d218-b581-b187-f783759b6afa@gmail.com> (raw)
In-Reply-To: <3C3E65E75D9910479323816378A812E7414CDE12@BGSMSX104.gar.corp.intel.com>
On 24.04.19 20:25, Pawnikar, Sumeet R wrote:
>> + /*
>> + * If the temperature value in deci-Kelvin is near the absolute
>> + * zero temperature, something is clearly wrong.
>> + */
>> + if (!value || value == 1)
>> + return 0;
> Do you still need to return 0 in case of wrong/failure case ?
> Shouldn't you return error here ?
Yes, I think 0 is right there, it's not an error condition in the check
itself (such as IO or memory error). The function returns two values: check
result in asus->asus_hwmon_thermal_available and error code.
This is still a successful negative result. The 0 or 1 (as added in this
patch) there merely indicates that the temperature measurement is not
available this way. It is safe to assume that no device that does provide
temperature will return 0.1 K. The temperature measurement is not critical
for driver operation so the driver proceeds without it.
One could return ENODEV when the check result is negative, but that would
just move the actual check and assignment further to asus_wmi_fan_init.
This is how it might look like in DSDT in this case:
Method (TMPR, 0, NotSerialized)
{
Return (One)
}
..
If ((IIA0 == 0x00110011))
{
Return ((TMPR () & 0xFFFF))
}
This is indeed the right method ID but it's nothing there.
Regards,
Yurii
next prev parent reply other threads:[~2019-04-25 18:52 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-19 9:57 [PATCH v3 00/11] asus-wmi: Support of ASUS TUF Gaming series laptops Yurii Pavlovskyi
2019-04-19 10:00 ` [PATCH v3 01/11] platform/x86: asus-wmi: Fix hwmon device cleanup Yurii Pavlovskyi
2019-05-08 13:25 ` Andy Shevchenko
2019-04-19 10:03 ` [PATCH v3 02/11] platform/x86: asus-wmi: Fix preserving keyboard backlight intensity on load Yurii Pavlovskyi
2019-04-19 10:05 ` [PATCH v3 03/11] platform/x86: asus-wmi: Increase the input buffer size of WMI methods Yurii Pavlovskyi
2019-05-08 13:30 ` Andy Shevchenko
2019-04-19 10:08 ` [PATCH v3 04/11] platform/x86: asus-wmi: Improve DSTS WMI method ID detection Yurii Pavlovskyi
2019-05-08 13:36 ` Andy Shevchenko
2019-05-09 6:08 ` Daniel Drake
2019-05-09 17:29 ` Yurii Pavlovskyi
2019-05-09 17:57 ` Andy Shevchenko
2019-04-19 10:10 ` [PATCH v3 05/11] platform/x86: asus-wmi: Support WMI event queue Yurii Pavlovskyi
2019-05-08 13:47 ` Andy Shevchenko
2019-05-09 17:36 ` Yurii Pavlovskyi
2019-04-19 10:11 ` [PATCH v3 06/11] platform/x86: asus-nb-wmi: Add microphone mute key code Yurii Pavlovskyi
2019-04-19 10:12 ` [PATCH v3 07/11] platform/x86: asus-wmi: Organize code into sections Yurii Pavlovskyi
2019-05-08 13:46 ` Andy Shevchenko
2019-04-19 10:12 ` [PATCH v3 08/11] platform/x86: asus-wmi: Enhance detection of thermal data Yurii Pavlovskyi
2019-04-24 18:25 ` Pawnikar, Sumeet R
2019-04-25 18:51 ` Yurii Pavlovskyi [this message]
2019-05-08 13:58 ` Andy Shevchenko
2019-05-09 17:49 ` Yurii Pavlovskyi
2019-05-09 17:54 ` Andy Shevchenko
2019-04-19 10:14 ` [PATCH v3 09/11] platform/x86: asus-wmi: Control RGB keyboard backlight Yurii Pavlovskyi
2019-05-08 14:02 ` Andy Shevchenko
2019-05-08 17:12 ` Pavel Machek
2019-05-09 19:04 ` Yurii Pavlovskyi
2019-05-09 20:45 ` Dan Murphy
2019-05-09 21:06 ` Andy Shevchenko
2019-05-09 21:44 ` Dan Murphy
2019-05-09 22:15 ` Pavel Machek
2019-05-09 22:34 ` Pavel Machek
2019-04-19 10:15 ` [PATCH v3 10/11] platform/x86: asus-wmi: Switch fan boost mode Yurii Pavlovskyi
2019-04-19 10:16 ` [PATCH v3 11/11] platform/x86: asus-wmi: Do not disable keyboard backlight on unloading Yurii Pavlovskyi
2019-05-08 13:26 ` [PATCH v3 00/11] asus-wmi: Support of ASUS TUF Gaming series laptops 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=a5d5f899-d218-b581-b187-f783759b6afa@gmail.com \
--to=yurii.pavlovskyi@gmail.com \
--cc=acpi4asus-user@lists.sourceforge.net \
--cc=andy@infradead.org \
--cc=corentin.chary@gmail.com \
--cc=drake@endlessm.com \
--cc=dvhart@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=sumeet.r.pawnikar@intel.com \
--subject='Re: [PATCH v3 08/11] platform/x86: asus-wmi: Enhance detection of thermal data' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).