From: Javier Carrasco <javier.carrasco.cruz@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Rishi Gupta <gupt21@gmail.com>
Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Javier Carrasco <javier.carrasco.cruz@gmail.com>
Subject: [PATCH 0/2] iio: light: add support for veml6031x00 ALS series
Date: Tue, 26 Nov 2024 22:51:53 +0100 [thread overview]
Message-ID: <20241126-veml6031x00-v1-0-4affa62bfefd@gmail.com> (raw)
These ambient light sensors with I2C interface provide two light
channels (ALS and IR), high/low threshold alarms with configurable
persistence, and a data ready signal.
The devices covered by this driver have the same resolution and they
share most of their functionality. These are the differences between
them:
- Device ID: accessible via two 8-byte registers, different values for
veml6031x00/veml6031x01 and veml60311x00/veml60311x01.
- I2C address: same grouping, 0x29 and 0x10 I2C addresses.
- AEC qualification: AEC-Q100 for veml6031x00/veml60311x00 and
AEC-Q101 for veml6031x01/veml60311x01.
The alarms and the data ready signals share the interrupt pin, and an
interrupt status register must be accessed to identify the source. Such
multiplexing is not new in IIO, and I have followed existing examples
for it. The persistence setting (own attribute) to trigger the alarms
uses the pattern that has already been used for the veml6030.
The device configuration is in general documented in the datasheet and
the application note. There is an exception, though: the activation of
the "active force" mode that is required for the data ready signal must
be carried out in two steps even though the affected bits are located in
the same register: first ALS_AF (active force mode enable) must be set,
and then ALS_TRIG (active force trigger setting) must be enabled. I have
added a brief commentary in the code to explain this behavior, which has
been confirmed by the manufacturer.
This driver has been tested with the four supported devices separately
as well as in pairs where the I2C addresses don't overlap.
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
---
Javier Carrasco (2):
dt-bindings: iio: light: veml6030: add veml6031x00 ALS series
iio: light: add support for veml6031x00 ALS series
.../bindings/iio/light/vishay,veml6030.yaml | 23 +-
MAINTAINERS | 6 +
drivers/iio/light/Kconfig | 13 +
drivers/iio/light/Makefile | 1 +
drivers/iio/light/veml6031x00.c | 1129 ++++++++++++++++++++
5 files changed, 1171 insertions(+), 1 deletion(-)
---
base-commit: a61ff7eac77e86de828fe28c4e42b8ae9ec2b195
change-id: 20241109-veml6031x00-aa9463da064a
Best regards,
--
Javier Carrasco <javier.carrasco.cruz@gmail.com>
next reply other threads:[~2024-11-26 21:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-26 21:51 Javier Carrasco [this message]
2024-11-26 21:51 ` [PATCH 1/2] dt-bindings: iio: light: veml6030: add veml6031x00 ALS series Javier Carrasco
2024-11-27 9:02 ` Krzysztof Kozlowski
2024-11-26 21:51 ` [PATCH 2/2] iio: light: add support for " Javier Carrasco
2024-11-28 9:55 ` kernel test robot
2024-11-28 11:06 ` Javier Carrasco
2024-11-30 20:17 ` Jonathan Cameron
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=20241126-veml6031x00-v1-0-4affa62bfefd@gmail.com \
--to=javier.carrasco.cruz@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gupt21@gmail.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
/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