iio: light: add support for veml3235
Subsystems (4)
Javier Carrasco
maintainerv2 cover iio: light: add support for veml3235
This series adds support for the Vishay veml3235 ambient light sensor with I2C protocol interface.
I attempted to add support for this device in the existing veml6030 driver, as it shares some operating principles with the supported devices. But given that the veml3235 has different register addresses, bit arrangements, and limited functionality, it ended up making most of the driver kind of device-agnostic.
Instead, the proposed driver is based on the recently updated veml6030 with multiple simplifications and a few clean ups (e.g. regfields, right definition of shared-by-all info masks, which can't be modified in veml6030 as it breaks the ABI).
On the other hand, the dt-bindings can be recycled as there is no real reason to add new ones. From a dt-bindings point of view it resembles the already supported veml7700. But if for whatever reason new bindings would be preferred, I am willing to provide them in further versions.
---
Changes in v2:
- Rename SD/SD0 bits to include register name.
- Switch to dev_info() when checking ID.
- Simplify val/val2 handling in veml3235_set_gain().
- Move return -EINVAL to the default case in veml3235_read_avail().
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Javier Carrasco (2):
dt-bindings: iio: light: veml6030: add veml3235
iio: light: add support for veml3235
.../bindings/iio/light/vishay,veml6030.yaml | 5 +- MAINTAINERS | 6 + drivers/iio/light/Kconfig | 11 + drivers/iio/light/Makefile | 1 + drivers/iio/light/veml3235.c | 540 +++++++++++++++++++++ 5 files changed, 562 insertions(+), 1 deletion(-)
---
base-commit: b852e1e7a0389ed6168ef1d38eb0bad71a6b11e8
change-id: 20241007-veml3235-0a38265e9bae
Best regards,
Signature · 1 line
Javier Carrasco <[email protected]>
Javier Carrasco
maintainerPATCH v2 1/2 dt-bindings: iio: light: veml6030: add veml3235
The veml3235 is another Vishay ambient light sensor that shares similar properties with the other sensors covered by this bindings. In this case, only the compatible, reg, and vdd-supply properties are required, and the device does not have an interrupt line, like the already supported veml7700.
--- Documentation/devicetree/bindings/iio/light/vishay,veml6030.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/iio/light/vishay,veml6030.yaml +4 -1
@@ -4,7 +4,7 @@ $id: http://devicetree.org/schemas/iio/light/vishay,veml6030.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: VEML6030, VEML6035 and VEML7700 Ambient Light Sensors (ALS) +title: VEML3235, VEML6030, VEML6035 and VEML7700 Ambient Light Sensors (ALS) maintainers: - Rishi Gupta <[email protected]>
@@ -20,6 +20,7 @@ description: | whenever configured threshold is crossed. Specifications about the sensors can be found at: + https://www.vishay.com/docs/80131/veml3235.pdf https://www.vishay.com/docs/84366/veml6030.pdf https://www.vishay.com/docs/84889/veml6035.pdf https://www.vishay.com/docs/84286/veml7700.pdf
@@ -27,6 +28,7 @@ description: | properties: compatible: enum: + - vishay,veml3235 - vishay,veml6030 - vishay,veml6035 - vishay,veml7700
@@ -76,6 +78,7 @@ allOf: properties: compatible: enum: + - vishay,veml3235 - vishay,veml7700 then: properties:
Signature · 1 line
2.43.0
Re: [PATCH v2 1/2] dt-bindings: iio: light: veml6030: add veml3235
Quoted 7 lines · Javier Carrasco
The veml3235 is another Vishay ambient light sensor that shares similar properties with the other sensors covered by this bindings. In this case, only the compatible, reg, and vdd-supply properties are required, and the device does not have an interrupt line, like the already supported veml7700.
Signed-off-by Javier Carrasco <[email protected]>
<form letter>
This is a friendly reminder during the review process.
It looks like you received a tag and forgot to add it.
If you do not know the process, here is a short explanation: Please add Acked-by/Reviewed-by/Tested-by tags when posting new versions, under or above your Signed-off-by tag. Tag is "received", when provided in a message replied to you on the mailing list. Tools like b4 can help here. However, there's no need to repost patches *only* to add the tags. The upstream maintainer will do that for tags received on the version they apply.
https://elixir.bootlin.com/linux/v6.5-rc3/source/Documentation/process/submitting-patches.rst#L577
If a tag was not added on purpose, please state why and what changed. </form letter>
Best regards,
Krzysztof
Javier Carrasco
maintainerPATCH v2 2/2 iio: light: add support for veml3235
In reply to Javier CarrascoThe Vishay veml3235 is a low-power ambient light sensor with I2C interface. It provides a minimum detectable intensity of 0.0021 lx/cnt, configurable integration time and gain, and an additional white channel to distinguish between different light sources.
--- MAINTAINERS | 6 + drivers/iio/light/Kconfig | 11 + drivers/iio/light/Makefile | 1 + drivers/iio/light/veml3235.c | 540 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 558 insertions(+)
MAINTAINERS +6 -0
@@ -24798,6 +24798,12 @@ S: Maintained F: drivers/input/serio/userio.c F: include/uapi/linux/userio.h +VISHAY VEML3235 AMBIENT LIGHT SENSOR DRIVER +M: Javier Carrasco <[email protected]> +S: Maintained +F: Documentation/devicetree/bindings/iio/light/vishay,veml6030.yaml +F: drivers/iio/light/veml3235.c + VISHAY VEML6030 AMBIENT LIGHT SENSOR DRIVER M: Javier Carrasco <[email protected]> S: Maintained
drivers/iio/light/Kconfig +11 -0
@@ -670,6 +670,17 @@ config VCNL4035 To compile this driver as a module, choose M here: the module will be called vcnl4035. +config VEML3235 + tristate "VEML3235 ambient light sensor" + select REGMAP_I2C + depends on I2C + help + Say Y here if you want to build a driver for the Vishay VEML3235 + ambient light sensor. + + To compile this driver as a module, choose M here: the + module will be called veml3235. + config VEML6030 tristate "VEML6030 and VEML6035 ambient light sensors" select REGMAP_I2C
drivers/iio/light/Makefile +1 -0
@@ -62,6 +62,7 @@ obj-$(CONFIG_TSL4531) += tsl4531.o obj-$(CONFIG_US5182D) += us5182d.o obj-$(CONFIG_VCNL4000) += vcnl4000.o obj-$(CONFIG_VCNL4035) += vcnl4035.o +obj-$(CONFIG_VEML3235) += veml3235.o obj-$(CONFIG_VEML6030) += veml6030.o obj-$(CONFIG_VEML6040) += veml6040.o obj-$(CONFIG_VEML6070) += veml6070.o
drivers/iio/light/veml3235.c new file +540 -0
540 lines not on this page · raw message
Signature · 1 line
2.43.0
Jonathan Cameron
maintainerQuoted 6 lines · On Sun, 20 Oct 2024 21:12:17 +0200 Javier Carrasco…
The Vishay veml3235 is a low-power ambient light sensor with I2C interface. It provides a minimum detectable intensity of 0.0021 lx/cnt, configurable integration time and gain, and an additional white channel to distinguish between different light sources.
Signed-off-by Javier Carrasco <[email protected]>
Hi Javier,
I missed one thing on previous review...
There is no obvious reason this driver needs to provide raw and processed values. Unless I'm missing something, just provide raw and let userspace do the maths for us.
Jonathan
drivers/iio/light/veml3235.c line 89
Quoted 12 lines
drivers/iio/light/veml3235.c new file +6
-0+static const struct iio_chan_spec veml3235_channels[] = { + { + .type =IIO_LIGHT , + .channel =CH_ALS , + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ) | +BIT (IIO_CHAN_INFO_PROCESSED ),
Why both raw + scale and processed?
We normally only provide raw and processed for light sensors if:
1) The conversion is non linear and hard to reverse.
2) There are events that are thresholds on the raw value.
Here it is linear so just provide _RAW.
Quoted 17 lines
drivers/iio/light/veml3235.c new file +17
-0+ .info_mask_shared_by_all = BIT(IIO_CHAN_INFO_INT_TIME) | + BIT(IIO_CHAN_INFO_SCALE), + .info_mask_shared_by_all_available = BIT(IIO_CHAN_INFO_INT_TIME) | + BIT(IIO_CHAN_INFO_SCALE), + }, + { + .type = IIO_INTENSITY, + .channel = CH_WHITE, + .modified = 1, + .channel2 = IIO_MOD_LIGHT_BOTH, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), + .info_mask_shared_by_all = BIT(IIO_CHAN_INFO_INT_TIME) | + BIT(IIO_CHAN_INFO_SCALE), + .info_mask_shared_by_all_available = BIT(IIO_CHAN_INFO_INT_TIME) | + BIT(IIO_CHAN_INFO_SCALE), + }, +};
Javier Carrasco
maintainerQuoted 9 lines · Jonathan Cameron
Quoted 6 lines · On Sun, 20 Oct 2024 21:12:17 +0200 Javier Carrasco…
The Vishay veml3235 is a low-power ambient light sensor with I2C interface. It provides a minimum detectable intensity of 0.0021 lx/cnt, configurable integration time and gain, and an additional white channel to distinguish between different light sources.
Signed-off-by Javier Carrasco <[email protected]>
Quoted 9 lines
Hi Javier,
I missed one thing on previous review...
There is no obvious reason this driver needs to provide raw and processed values. Unless I'm missing something, just provide raw and let userspace do the maths for us.Jonathan
Sure, I will drop that for v3. I added it because this driver took the veml6030 as a reference, and that driver provides the processed value. I guess that the veml6030 should have not provided processed values either, but it's late to remove them after the driver was released.
Now that we are at it, what is the rule (of thumb?) to provide processed values? Those that can't be obtained from the raw data and simple operations with the scale/offset/integration time/whatever userspace can see?
Thank you and best regards,
Javier Carrasco
Jonathan Cameron
maintainerQuoted 24 lines · On Mon, 21 Oct 2024 22:21:22 +0200 Javier Carrasco…
Quoted 9 lines · Jonathan Cameron
Quoted 6 lines · On Sun, 20 Oct 2024 21:12:17 +0200 Javier Carrasco…
The Vishay veml3235 is a low-power ambient light sensor with I2C interface. It provides a minimum detectable intensity of 0.0021 lx/cnt, configurable integration time and gain, and an additional white channel to distinguish between different light sources.
Signed-off-by Javier Carrasco <[email protected]>Quoted 9 lines
Hi Javier,
I missed one thing on previous review...
There is no obvious reason this driver needs to provide raw and processed values. Unless I'm missing something, just provide raw and let userspace do the maths for us.Jonathan
Sure, I will drop that for v3. I added it because this driver took the veml6030 as a reference, and that driver provides the processed value. I guess that the veml6030 should have not provided processed values either, but it's late to remove them after the driver was released.
Quoted 4 lines
Now that we are at it, what is the rule (of thumb?) to provide processed values? Those that can't be obtained from the raw data and simple operations with the scale/offset/integration time/whatever userspace can see?
Yes. If the conversion is linear, then leave it to userspace (with scale and offset provided). If it's not linear then in kernel because currently we have no other choice.
There are some historical quirks where a processed only interface got in then we had to add raw later (typically when we added buffered output where scale and offset are important because processed values normally don't pack well).
Jonathan
Quoted 3 lines
Thank you and best regards,
Javier Carrasco
Javier Carrasco
maintainerQuoted 36 lines · Jonathan Cameron
Quoted 24 lines · On Mon, 21 Oct 2024 22:21:22 +0200 Javier Carrasco…
Quoted 9 lines · Jonathan Cameron
Quoted 6 lines · On Sun, 20 Oct 2024 21:12:17 +0200 Javier Carrasco…
The Vishay veml3235 is a low-power ambient light sensor with I2C interface. It provides a minimum detectable intensity of 0.0021 lx/cnt, configurable integration time and gain, and an additional white channel to distinguish between different light sources.
Signed-off-by Javier Carrasco <[email protected]>Quoted 9 lines
Hi Javier,
I missed one thing on previous review...
There is no obvious reason this driver needs to provide raw and processed values. Unless I'm missing something, just provide raw and let userspace do the maths for us.Jonathan
Sure, I will drop that for v3. I added it because this driver took the veml6030 as a reference, and that driver provides the processed value. I guess that the veml6030 should have not provided processed values either, but it's late to remove them after the driver was released.
Quoted 4 lines
Now that we are at it, what is the rule (of thumb?) to provide processed values? Those that can't be obtained from the raw data and simple operations with the scale/offset/integration time/whatever userspace can see?
Yes. If the conversion is linear, then leave it to userspace (with scale and offset provided). If it's not linear then in kernel because currently we have no other choice.
Quoted 8 lines
There are some historical quirks where a processed only interface got in then we had to add raw later (typically when we added buffered output where scale and offset are important because processed values normally don't pack well).
Jonathan
Hi Jonathan, I am bringing this back because I am not sure if dropping the processed values was the right approach here. I would like to clarify before propagating some approach that might not be accurate.
This sensor is linear, and the processed value can be obtained by simple multiplications, but not just raw * scale as documented in the ABI.
This driver is based on the veml6030, whose processed value is obtained as raw * resolution, where the resolution is completely linear and is obtained as sensor_resolution * integration_time / scale.
That means that the scale is actually a gain, and the user needs to know the sensor resolution provided in the datasheet (see cur_resolution in veml6030.c) to get the processed value. There is a sensor resolution for every pair { gain, integration_time } in the datasheet, so there is no need to calculate anything, yet the resolution is not provided by the driver.
Nevertheless, your comment on this matter was the following:
Quoted 7 lines
Why both raw + scale and processed?
We normally only provide raw and processed for light sensors if:
1) The conversion is non linear and hard to reverse.
2) There are events that are thresholds on the raw value.Here it is linear so just provide
_RAW.
That is still true in this case, because it is a linear, easy to reverse conversion. Nevertheless, the user needs to look for the sensor resolution in the datasheet and then use the given integration_time and scale.
Is that ok and desired for light sensors? I think that a more accurate approach would have been treating the gain as a HARDWAREGAIN, which would have been used to calculate the scale i.e. resolution to directly apply to the raw value. In its current form, the processed value is not what you get if you do raw * scale. But as you specifically mentioned light sensors in your comment, that might not apply here. Moreover, there are only two drivers (si1133.c and vl6180.c) that use HARDWAREGAIN for IIO_LIGHT, which makes me think I am over-complicating thing here.
By the way, in_illuminance_hardwaregain is not documented in the ABI, only out_voltageY and in_intensity. But that is another topic.
The veml6030 has been around for some time and there is no way around without breaking ABI, and the veml3235 has been only applied to your tree and maybe it could wait to be released.
If everything is ok as it is, then that's the end of the story, but if the processed = raw * scale operation should apply, the veml3235 could still be fixed. And when it is too late for that one too, then I could follow a different approach for the veml6031x00 I recently sent to avoid propagating the issue.
Thanks and best regards,
Javier Carrasco
Javier Carrasco
maintainerQuoted 95 lines · Javier Carrasco
Quoted 36 lines · Jonathan Cameron
Quoted 24 lines · On Mon, 21 Oct 2024 22:21:22 +0200 Javier Carrasco…
Quoted 9 lines · Jonathan Cameron
Quoted 6 lines · On Sun, 20 Oct 2024 21:12:17 +0200 Javier Carrasco…
The Vishay veml3235 is a low-power ambient light sensor with I2C interface. It provides a minimum detectable intensity of 0.0021 lx/cnt, configurable integration time and gain, and an additional white channel to distinguish between different light sources.
Signed-off-by Javier Carrasco <[email protected]>Quoted 9 lines
Hi Javier,
I missed one thing on previous review...
There is no obvious reason this driver needs to provide raw and processed values. Unless I'm missing something, just provide raw and let userspace do the maths for us.Jonathan
Sure, I will drop that for v3. I added it because this driver took the veml6030 as a reference, and that driver provides the processed value. I guess that the veml6030 should have not provided processed values either, but it's late to remove them after the driver was released.
Quoted 4 lines
Now that we are at it, what is the rule (of thumb?) to provide processed values? Those that can't be obtained from the raw data and simple operations with the scale/offset/integration time/whatever userspace can see?
Yes. If the conversion is linear, then leave it to userspace (with scale and offset provided). If it's not linear then in kernel because currently we have no other choice.
Quoted 8 lines
There are some historical quirks where a processed only interface got in then we had to add raw later (typically when we added buffered output where scale and offset are important because processed values normally don't pack well).
Jonathan
Hi Jonathan, I am bringing this back because I am not sure if dropping the processed values was the right approach here. I would like to clarify before propagating some approach that might not be accurate.
This sensor is linear, and the processed value can be obtained by simple multiplications, but not just raw * scale as documented in the ABI.
This driver is based on the veml6030, whose processed value is obtained as raw * resolution, where the resolution is completely linear and is obtained as
sensor_resolution*integration_time/ scale.That means that the scale is actually a gain, and the user needs to know the sensor resolution provided in the datasheet (see
cur_resolutioninveml6030.c) to get the processed value. There is a sensor resolution for every pair { gain,integration_time} in the datasheet, so there is no need to calculate anything, yet the resolution is not provided by the driver.Nevertheless, your comment on this matter was the following:
Quoted 7 lines
Why both raw + scale and processed?
We normally only provide raw and processed for light sensors if:
1) The conversion is non linear and hard to reverse.
2) There are events that are thresholds on the raw value.Here it is linear so just provide
_RAW.That is still true in this case, because it is a linear, easy to reverse conversion. Nevertheless, the user needs to look for the sensor resolution in the datasheet and then use the given
integration_timeand scale.Is that ok and desired for light sensors? I think that a more accurate approach would have been treating the gain as a HARDWAREGAIN, which would have been used to calculate the scale i.e. resolution to directly apply to the raw value. In its current form, the processed value is not what you get if you do raw * scale. But as you specifically mentioned light sensors in your comment, that might not apply here. Moreover, there are only two drivers (
si1133.candvl6180.c) that use HARDWAREGAIN forIIO_LIGHT, which makes me think I am over-complicating thing here.By the way,
in_illuminance_hardwaregainis not documented in the ABI, onlyout_voltageYandin_intensity. But that is another topic.The veml6030 has been around for some time and there is no way around without breaking ABI, and the veml3235 has been only applied to your tree and maybe it could wait to be released.
Quoted 8 lines
If everything is ok as it is, then that's the end of the story, but if the processed = raw * scale operation should apply, the veml3235 could still be fixed. And when it is too late for that one too, then I could follow a different approach for the veml6031x00 I recently sent to avoid propagating the issue.
Thanks and best regards,
Javier Carrasco
Hi Jonathan, this email might have gone unnoticed.
This issue is relevant for the veml6030 and veml3235, and also for the veml6031x00 under review, as it follows the same pattern. Do you think they are ok as they are? Probably not, as they don't follow the ABI documentation, and after reading some other reviews, HARDWAREGAIN is usually not the fix for something like this.
Should the gts helpers be used instead?
Thanks and best regards,
Javier Carrasco
Jonathan Cameron
maintainerQuoted 58 lines · On Sat, 14 Dec 2024 16:24:34 +0100 "Javier Carrasco"…
Quoted 57 lines · Javier Carrasco
Quoted 36 lines · Jonathan Cameron
Quoted 24 lines · On Mon, 21 Oct 2024 22:21:22 +0200 Javier Carrasco…
Quoted 9 lines · Jonathan Cameron
Quoted 6 lines · On Sun, 20 Oct 2024 21:12:17 +0200 Javier Carrasco…
The Vishay veml3235 is a low-power ambient light sensor with I2C interface. It provides a minimum detectable intensity of 0.0021 lx/cnt, configurable integration time and gain, and an additional white channel to distinguish between different light sources.
Signed-off-by Javier Carrasco <[email protected]>Quoted 9 lines
Hi Javier,
I missed one thing on previous review...
There is no obvious reason this driver needs to provide raw and processed values. Unless I'm missing something, just provide raw and let userspace do the maths for us.Jonathan
Sure, I will drop that for v3. I added it because this driver took the veml6030 as a reference, and that driver provides the processed value. I guess that the veml6030 should have not provided processed values either, but it's late to remove them after the driver was released.
Quoted 4 lines
Now that we are at it, what is the rule (of thumb?) to provide processed values? Those that can't be obtained from the raw data and simple operations with the scale/offset/integration time/whatever userspace can see?
Yes. If the conversion is linear, then leave it to userspace (with scale and offset provided). If it's not linear then in kernel because currently we have no other choice.
Quoted 8 lines
There are some historical quirks where a processed only interface got in then we had to add raw later (typically when we added buffered output where scale and offset are important because processed values normally don't pack well).
Jonathan
Hi Jonathan, I am bringing this back because I am not sure if dropping the processed values was the right approach here. I would like to clarify before propagating some approach that might not be accurate.
This sensor is linear, and the processed value can be obtained by simple multiplications, but not just raw * scale as documented in the ABI.
This driver is based on the veml6030, whose processed value is obtained as raw * resolution, where the resolution is completely linear and is obtained as
sensor_resolution*integration_time/ scale.
Quoted 6 lines
Quoted 6 lines
That means that the scale is actually a gain, and the user needs to know the sensor resolution provided in the datasheet (see
cur_resolutioninveml6030.c) to get the processed value. There is a sensor resolution for every pair { gain,integration_time} in the datasheet, so there is no need to calculate anything, yet the resolution is not provided by the driver.
Ah. The ABI is defined such that the _scale should always be the value that
you multiply _raw by to get a the defined base units. That means it
has to take into account anything that affects that - in this case that means it incorporates the effect of that resolution table as well.
Quoted 9 lines
Quoted 9 lines
Nevertheless, your comment on this matter was the following:
Quoted 6 lines
Why both raw + scale and processed?
We normally only provide raw and processed for light sensors if:
1) The conversion is non linear and hard to reverse.
2) There are events that are thresholds on the raw value.
Quoted 8 lines
Quoted 8 lines
Quoted 1 line
Here it is linear so just provide
_RAW.That is still true in this case, because it is a linear, easy to reverse conversion. Nevertheless, the user needs to look for the sensor resolution in the datasheet and then use the given
integration_timeand scale.Is that ok and desired for light sensors?
If we are talking about illuminance or other well defined scaled channels then no it is not. They must give a value in Lux when we multiply _raw * _scale (ignoring offset). It is messily defined for intensity channels as they have no base units to target, but the principle should be the same.
Quoted 5 lines
I think that a more accurate
Quoted 4 lines
approach would have been treating the gain as a HARDWAREGAIN, which would have been used to calculate the scale i.e. resolution to directly apply to the raw value. In its current form, the processed value is not what you get if you do raw * scale.
That sounds like a bug that needs fixing because it is not compliant with the define ABI. It is messy as stated for intensity because in that case PROCESSED in the ABI as it's largely meaningless.
Quoted 4 lines
But as you specifically mentioned
Quoted 3 lines
light sensors in your comment, that might not apply here. Moreover, there are only two drivers (
si1133.candvl6180.c) that use HARDWAREGAIN forIIO_LIGHT, which makes me think I am over-complicating thing here.
Hardware gain must not be part of what is necessary to compute a value in userspace. It is not the ABI specified way of doing it which means zero software will do it right. Any change to that is a break in backwards compatibility of the ABI. The cardinal rule of Linux is we never ever do that. Note not breaking the subsystem ABI comes above not breaking backwards compatibility of a given driver.
We have relaxed things a bit to say that in some cases it can be used to provide some useful 'debug' info on a channel setup, but _scale * _raw is still the only way to get to the defined ABI.
Quoted 3 lines
Quoted 3 lines
By the way,
in_illuminance_hardwaregainis not documented in the ABI, onlyout_voltageYandin_intensity. But that is another topic.
We should indeed add it.
Quoted 4 lines
Quoted 4 lines
The veml6030 has been around for some time and there is no way around without breaking ABI, and the veml3235 has been only applied to your tree and maybe it could wait to be released.
If the reporting is wrong wrt to the defined userspace ABI then it's a bug fix and unfortunately that means we might break users :( There is no good way to fix these.
Quoted 6 lines
Quoted 6 lines
If everything is ok as it is, then that's the end of the story, but if the processed = raw * scale operation should apply, the veml3235 could still be fixed. And when it is too late for that one too, then I could follow a different approach for the veml6031x00 I recently sent to avoid propagating the issue.
Definitely good to fix the veml3235 and we can also fix the older driver as this is simply a bug (one of the few valid reasons for an ABI change).
Quoted 5 lines
Quoted 3 lines
Thanks and best regards,
Javier CarrascoHi Jonathan, this email might have gone unnoticed.
Yup. Sorry. I had an email sanfu and ended up with my whole inbox marked read. May have missed a few mails as a result.
Quoted 7 lines
This issue is relevant for the veml6030 and veml3235, and also for the veml6031x00 under review, as it follows the same pattern. Do you think they are ok as they are? Probably not, as they don't follow the ABI documentation, and after reading some other reviews, HARDWAREGAIN is usually not the fix for something like this.
Should the gts helpers be used instead?
They need to be fixed so they follow the ABI. GTS may well help with that as Matti wrote it to address this complexity of too many ways of making changes that affect the scale. It is also valid under the ABI to restrict things to simpler case of integration time etc being controlled directly and the _scale just updating when you change them as long as you update scale_avail as well. That's ugly interface but not 'wrong' which is why Matti created something more user friendly.
Jonathan
Quoted 3 lines
Thanks and best regards,
Javier Carrasco