From: Jonathan Cameron <jic23@kernel.org>
To: Dmitry Rokosov <DDRokosov@sberdevices.ru>
Cc: "akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"andriy.shevchenko@linux.intel.com"
<andriy.shevchenko@linux.intel.com>,
"daniel.lezcano@linaro.org" <daniel.lezcano@linaro.org>,
"wsa@kernel.org" <wsa@kernel.org>,
"andy.shevchenko@gmail.com" <andy.shevchenko@gmail.com>,
"lars@metafoo.de" <lars@metafoo.de>,
"Michael.Hennerich@analog.com" <Michael.Hennerich@analog.com>,
"jbhayana@google.com" <jbhayana@google.com>,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
kernel <kernel@sberdevices.ru>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 0/3] units: complement the set of Hz units
Date: Sun, 28 Aug 2022 16:47:08 +0100 [thread overview]
Message-ID: <20220828164708.017c400d@jic23-huawei> (raw)
In-Reply-To: <20220801143811.14817-1-ddrokosov@sberdevices.ru>
On Mon, 1 Aug 2022 14:37:23 +0000
Dmitry Rokosov <DDRokosov@sberdevices.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(-)
>
prev parent reply other threads:[~2022-08-28 16:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-01 14:37 [PATCH v3 0/3] units: complement the set of Hz units Dmitry Rokosov
2022-08-01 14:37 ` [PATCH v3 1/3] " Dmitry Rokosov
2022-08-01 14:37 ` [PATCH v3 2/3] iio: accel: adxl345: use HZ macro from units.h Dmitry Rokosov
2022-08-01 14:37 ` [PATCH v3 3/3] iio: common: scmi_sensors: " Dmitry Rokosov
2022-08-28 15:47 ` Jonathan Cameron [this message]
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=20220828164708.017c400d@jic23-huawei \
--to=jic23@kernel.org \
--cc=DDRokosov@sberdevices.ru \
--cc=Michael.Hennerich@analog.com \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=daniel.lezcano@linaro.org \
--cc=jbhayana@google.com \
--cc=kernel@sberdevices.ru \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wsa@kernel.org \
/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