[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <62a262a1-b945-ad4f-fdb8-d05fcba882d3@rasmusvillemoes.dk>
Date: Fri, 23 Sep 2022 10:40:06 +0200
From: Rasmus Villemoes <linux@...musvillemoes.dk>
To: Guenter Roeck <linux@...ck-us.net>,
Alessandro Zummo <a.zummo@...ertech.it>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Jean Delvare <jdelvare@...e.com>
Cc: linux-rtc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-hwmon@...r.kernel.org
Subject: Re: [PATCH v2 9/9] rtc: isl12022: add support for temperature sensor
On 21/09/2022 16.13, Guenter Roeck wrote:
> On 9/21/22 04:46, Rasmus Villemoes wrote:
>> +static int isl12022_hwmon_read(struct device *dev,
>> + enum hwmon_sensor_types type,
>> + u32 attr, int channel, long *val)
>> +{
>> + if (type == hwmon_chip && attr == hwmon_chip_update_interval) {
>> + *val = 60000;
>> + return 0;
>> + }
>
> It is not the purpose of the update_interval attribute to inform the
> user what the update interval of this chip happens to be. The purpose
> of the attribute is to inform the chip what update interval it should use.
Well, I think it's a completely natural thing to expose a fixed and
known update_interval as a 0444 property, and it might even be useful to
userspace to know that there's no point reading the sensor any more
often than that. And I didn't come up with this by myself, there's
already at least a couple of instances of a 0444 update_interval.
I'll leave it to the RTC maintainers to decide, it's easy enough to remove.
Rasmus
Powered by blists - more mailing lists