mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/3] units: complement the set of Hz units
@ 2022-07-29 17:23 Dmitry Rokosov
  2022-07-29 17:23 ` [PATCH v2 1/3] " Dmitry Rokosov
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Dmitry Rokosov @ 2022-07-29 17:23 UTC (permalink / raw)
  To: akpm, andriy.shevchenko, daniel.lezcano, jic23, wsa,
	andy.shevchenko, lars, Michael.Hennerich, jbhayana
  Cc: linux-iio, kernel, linux-kernel, Dmitry Rokosov

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, UHZ_PER_HZ and NHZ_PER_HZ definitions in the units.h, and
fixes all drivers which duplicate these units.

Changes 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           | 2 +-
 drivers/iio/common/scmi_sensors/scmi_iio.c | 2 +-
 include/linux/units.h                      | 3 +++
 3 files changed, 5 insertions(+), 2 deletions(-)

-- 
2.36.0

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-08-01 13:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-29 17:23 [PATCH v2 0/3] units: complement the set of Hz units Dmitry Rokosov
2022-07-29 17:23 ` [PATCH v2 1/3] " Dmitry Rokosov
2022-07-29 18:02   ` Andy Shevchenko
2022-07-31 11:41     ` Jonathan Cameron
2022-08-01 13:01       ` Dmitry Rokosov
2022-07-29 17:23 ` [PATCH v2 2/3] iio: accel: adxl345: use HZ macro from units.h Dmitry Rokosov
2022-07-29 18:03   ` Andy Shevchenko
2022-07-29 17:23 ` [PATCH v2 3/3] iio: common: scmi_sensors: " Dmitry Rokosov
2022-07-29 18:04   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®