public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matti Vaittinen <mazziesaccount@gmail.com>
To: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Matti Vaittinen <mazziesaccount@gmail.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/3] iio: Fix integration time units for iio-gts
Date: Wed, 12 Apr 2023 15:26:15 +0300	[thread overview]
Message-ID: <cover.1681301472.git.mazziesaccount@gmail.com> (raw)

[-- 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 --]

             reply	other threads:[~2023-04-12 12:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-12 12:26 Matti Vaittinen [this message]
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

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=cover.1681301472.git.mazziesaccount@gmail.com \
    --to=mazziesaccount@gmail.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matti.vaittinen@fi.rohmeurope.com \
    /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