lkml.org 
[lkml]   [2022]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH v1 0/3] units: complement the set of Hz units
Date
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
MHZ_PER_HZ, UHZ_PER_HZ and NHZ_PER_HZ definitions in the units.h, and
fixes all drivers which duplicate these units.

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

\
 
 \ /
  Last update: 2022-07-25 20:46    [W:0.246 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site