[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4d00ad17-3422-5b5f-b0bd-fc511e3eb21c@roeck-us.net>
Date: Mon, 6 Feb 2023 14:11:25 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: Armin Wolf <W_Armin@....de>, Hans de Goede <hdegoede@...hat.com>
Cc: markgross@...nel.org, jdelvare@...e.com,
platform-driver-x86@...r.kernel.org, linux-hwmon@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] platform/x86: dell-ddv: Add hwmon support
On 2/6/23 13:19, Armin Wolf wrote:
> Am 06.02.23 um 17:23 schrieb Guenter Roeck:
>
>> On Mon, Feb 06, 2023 at 03:13:25PM +0100, Hans de Goede wrote:
>>> Hi Armin,
>>>
>>> On 2/5/23 21:54, Armin Wolf wrote:
>>>> Thanks to bugreport 216655 on bugzilla triggered by the
>>>> dell-smm-hwmon driver, the contents of the sensor buffers
>>>> could be almost completely decoded.
>>>> Add an hwmon interface for exposing the fan and thermal
>>>> sensor values. Since the WMI interface can be quite slow
>>>> on some machines, the sensor buffers are cached for 1 second
>>>> to lessen the performance impact.
>>>> The debugfs interface remains in place to aid in reverse-engineering
>>>> of unknown sensor types and the thermal buffer.
>>>>
>>>> Tested-by: AntonĂn Skala <skala.antonin@...il.com>
>>>> Tested-by: Gustavo Walbon <gustavowalbon@...il.com>
>>>> Signed-off-by: Armin Wolf <W_Armin@....de>
>>> This looks nice and clean to me, thank you:
>>>
>>> Reviewed-by: Hans de Goede <hdegoede@...hat.com>
>>>
>>> I'm going to wait a bit with merging this to see if Guenter
>>> has any remarks. If there are no remarks by next Monday then
>>> I'll merge this for the 6.3 merge window.
>>>
>> I don't have any further remarks. I won't send an Ack, though.
>> I noticed that the empty lines before return statements distract
>> me sufficiently enough that I am not sure about the actual code.
>>
>> Guenter
>
> I will send a 3rd revision of the patch series to remove those empty lines then.
> Speaking of a 3rd revision, i noticed that jiffies are not updated during suspend,
> so the sensor values might be wrong for a short time when resuming after a long time.
>
> This can be solved by either usingktime_get_boottime_ns(), which does not stop during suspend, or by
> invalidating the sensor cache upon resume. Which method should be used
> in this case? Armin Wolf
>
I would suggest to invalidate the sensor cache; that seems less complex.
Guenter
Powered by blists - more mailing lists