lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241224-veml3235_scale-v2-0-2e1286846c77@gmail.com>
Date: Tue, 24 Dec 2024 11:58:59 +0100
From: Javier Carrasco <javier.carrasco.cruz@...il.com>
To: Matti Vaittinen <mazziesaccount@...il.com>, 
 Jonathan Cameron <jic23@...nel.org>, Lars-Peter Clausen <lars@...afoo.de>
Cc: linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org, 
 Jonathan Cameron <Jonathan.Cameron@...wei.com>, 
 Javier Carrasco <javier.carrasco.cruz@...il.com>
Subject: [PATCH v2 0/4] iio: light: fix scale in veml3235 and add helpers
 to iio-gts

This series addresses an issue in the veml3235 that was inherited from
an older driver (veml6030, not covered here but probably addressed after
discussing this series), where the scale is does not follow ABI.

To simplify the gain/integration time handling, the iio-gts helpers have
been used. And to further simplify the process, two new helpers have
been proposed to address repetitive patterns that are found in all users
of iio-gts.

The additions to iio-gts are wrappers around existing helpers, and I
have tried to keep their names short, as adding more prefixes to the
existing functions looked too cumbersome and inconvenient to follow the
80-char/line recommendation. I have not added any test for the new
helpers because I would prefer to discuss them first.

This series has been tested with a veml3235sl under all supported gains
and integration times as well as with a few unsupported values to make
sure the operations fail in those cases.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@...il.com>
---
Changes in v2:
- industrialio-gts-helper.c: explicitly return -EINVAL if
  iio_gts_find_new_gain_vy_gain_time_min() fails for the minimum gain
  fallback.
- industrialio-gts-helper.c: check the non-zero value of ret to continue
  to the next iteration in iio_gts_find_gan_sel_in_times().
- veml3235.c: drop code style fixes and move them to a separate patch.
- veml3235.c: add patch to support regmap cache to simplify value
  updates.
- veml3235.c: put 'val' back in the arguments of set_it() to drop the
  diff, and check it internally as before.
- veml3235.c: fix typo in comment.
- Link to v1: https://lore.kernel.org/r/20241220-veml3235_scale-v1-0-b43b190bbb6a@gmail.com

---
Javier Carrasco (4):
      iio: gts-helper: add helpers to ease searches of gain_sel and new_gain
      iio: light: veml3235: fix code style
      iio: light: veml3235: extend regmap to add cache
      iio: veml3235: fix scale to conform to ABI

 drivers/iio/industrialio-gts-helper.c |  76 ++++++++++
 drivers/iio/light/Kconfig             |   1 +
 drivers/iio/light/veml3235.c          | 274 ++++++++++++++++++++--------------
 include/linux/iio/iio-gts-helper.h    |   5 +
 4 files changed, 245 insertions(+), 111 deletions(-)
---
base-commit: e25c8d66f6786300b680866c0e0139981273feba
change-id: 20241215-veml3235_scale-62de98c7b5fa

Best regards,
-- 
Javier Carrasco <javier.carrasco.cruz@...il.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ