[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220828164708.017c400d@jic23-huawei>
Date: Sun, 28 Aug 2022 16:47:08 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Dmitry Rokosov <DDRokosov@...rdevices.ru>
Cc: "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"andriy.shevchenko@...ux.intel.com"
<andriy.shevchenko@...ux.intel.com>,
"daniel.lezcano@...aro.org" <daniel.lezcano@...aro.org>,
"wsa@...nel.org" <wsa@...nel.org>,
"andy.shevchenko@...il.com" <andy.shevchenko@...il.com>,
"lars@...afoo.de" <lars@...afoo.de>,
"Michael.Hennerich@...log.com" <Michael.Hennerich@...log.com>,
"jbhayana@...gle.com" <jbhayana@...gle.com>,
"linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
kernel <kernel@...rdevices.ru>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 0/3] units: complement the set of Hz units
On Mon, 1 Aug 2022 14:37:23 +0000
Dmitry Rokosov <DDRokosov@...rdevices.ru> wrote:
> During msa311 accel IIO driver development
>
> https://lore.kernel.org/linux-iio/20220616104211.9257-1-ddrokosov@sberdevices.ru/
>
> Andy requested to use proper units in the hz->ms calculation. Current
> units.h header doesn't have milli, micro and nano HZ coefficients, so
> some drivers (in the IIO subsystem) implement their own copies for that.
>
> The current patchset resolves such a problem and intoduces general
> MILLIHZ_PER_HZ, MICROHZ_PER_HZ and NANOHZ_PER_HZ definitions in the units.h,
> and fixes all drivers which duplicate these units.
Ok, I'm just about convinced this is worth doing given the precedence
of similar cases. Applied to the togreg branch of iio.git and pushed
out as testing.
Thanks,
Jonathan
>
> Changes:
> * v2->v3:
> - changed UHZ_PER_HZ to MICROHZ_PER_HZ and NHZ_PER_HZ to
> NANOHZ_PER_HZ to save name consistency for all new HZ units
>
> * v1->v2:
> - changed MHZ_PER_HZ to a different name as Andy suggested
> (suppose MILLIHZ_PER_HZ is good enough)
>
> Dmitry Rokosov (3):
> units: complement the set of Hz units
> iio: accel: adxl345: use HZ macro from units.h
> iio: common: scmi_sensors: use HZ macro from units.h
>
> drivers/iio/accel/adxl345_core.c | 7 ++++---
> drivers/iio/common/scmi_sensors/scmi_iio.c | 8 ++++----
> include/linux/units.h | 3 +++
> 3 files changed, 11 insertions(+), 7 deletions(-)
>
Powered by blists - more mailing lists