[PATCH 0/3] iio: light: opt4060: Fix integration time, pointer type and error message

Vidhu Sarwal <[email protected]> Wed, 15 Jul 2026 06:45:41 +0530
Newsgroups dev.linux.lists.linux-kernel-mentees,org.kernel.vger.linux-iio,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
This series fixes three issues in the opt4060 driver, all of which have
been present since the driver was introduced.

Patch 1 rejects integration time writes with a non-zero seconds part.
Previously, opt4060_write_raw() only considered the microseconds
component, so values such as 1.000600 were accepted and programmed as
600 us.

Patch 2 fixes a pointer type mismatch in the call to
div_u64_rem(). This is a type cleanliness fix and does not change
runtime behaviour.

Patch 3 corrects a error in an error message that reported the
wrong threshold register when a register read failed.

The first 2 patches are similar to recently submitted patches on
it's sister driver OPT4001 [1]. 

Patch 3 is specific to opt4060.

[1]: https://lore.kernel.org/all/[email protected]/

Vidhu Sarwal (3):
  iio: light: opt4060: Reject integration times with a non-zero seconds
    part
  iio: light: opt4060: Fix pointer type passed to div_u64_rem()
  iio: light: opt4060: Fix incorrect register name in threshold read
    error message

 drivers/iio/light/opt4060.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)


base-commit: a13c140cc289c0b7b3770bce5b3ad42ab35074aa
-- 
2.53.0