public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] iio: Fix integration time units for iio-gts
@ 2023-04-12 12:26 Matti Vaittinen
  2023-04-12 12:27 ` [PATCH 1/3] iio: core: add IIO_VAL_INT_MICRO Matti Vaittinen
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Matti Vaittinen @ 2023-04-12 12:26 UTC (permalink / raw)
  To: Matti Vaittinen
  Cc: Jonathan Cameron, Lars-Peter Clausen, Matti Vaittinen, linux-iio,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1900 bytes --]

The newly added iio-gts-helper (gain time scale helper) errorneously
reports available integration times as micro seconds. The same mistake
is in newly added BU27034 light sensor driver. Fix these by adding new
IIO_VAL type, IIO_VAL_INT_MICRO - which can be used for micro <unit>
values where the integer part is zero.

NOTE:
I did not have the time to test the gts-helpers with integration times
which are greater than 1 second. Currently there is no other in-tree users
besides the bu27034, which does always use integration times smaller
than 1 second. When greater than 1 second times are needed, this needs
to be revised. (Or, when the devm_* interface kunit test support gets
added). Right now this should be a quick fix to integration time
handling before the bug manifests itself in the user-space).

I am planning to test (and re-work if needed) the gts-helpers available
integration time list for > 1Sec times - but I most probably don't have
the time for that during this or next week. (Don't know about the
weekend though - but probably not.)

--

Matti Vaittinen (3):
  iio: core: add IIO_VAL_INT_MICRO
  iio: gts: fix units of available integration times
  iio: bu27034: Fix integration time units

 drivers/iio/industrialio-core.c       | 4 ++++
 drivers/iio/industrialio-gts-helper.c | 2 +-
 drivers/iio/light/rohm-bu27034.c      | 7 +++++--
 include/linux/iio/types.h             | 1 +
 4 files changed, 11 insertions(+), 3 deletions(-)


base-commit: c86b0e73f0bebbb0245ef2bac4cf269d61ff828c
-- 
2.39.2


-- 
Matti Vaittinen, Linux device drivers
ROHM Semiconductors, Finland SWDC
Kiviharjunlenkki 1E
90220 OULU
FINLAND

~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~
Simon says - in Latin please.
~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~
Thanks to Simon Glass for the translation =] 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2023-04-15 16:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-12 12:26 [PATCH 0/3] iio: Fix integration time units for iio-gts Matti Vaittinen
2023-04-12 12:27 ` [PATCH 1/3] iio: core: add IIO_VAL_INT_MICRO Matti Vaittinen
2023-04-12 20:32   ` Jonathan Cameron
2023-04-13  5:48     ` Matti Vaittinen
2023-04-15 16:48       ` Jonathan Cameron
2023-04-12 12:28 ` [PATCH 2/3] iio: gts: fix units of available integration times Matti Vaittinen
2023-04-12 12:29 ` [PATCH 3/3] iio: bu27034: Fix integration time units Matti Vaittinen

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