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>,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Subject: [PATCH v3 0/2] iio: light: add support for veml3235
Date: Wed, 23 Oct 2024 20:59:57 +0200 [thread overview]
Message-ID: <20241023-veml3235-v3-0-8490f2622f9a@gmail.com> (raw)
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.
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
---
Changes in v3:
- Add missing Tag to [1/2] (Acked-by).
- Drop processed values from the driver, which in turn removes the need
to store the current resolution, gain and integration time in the
driver data.
- Fix SD0 bit position (15).
- Drop redundant configuration write in hw_init (gain and integration
times are the only fields to set).
- Link to v2: https://lore.kernel.org/r/20241020-veml3235-v2-0-4bc7cfad7e0b@gmail.com
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/20241016-veml3235-v1-0-b904f802daef@gmail.com
---
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 | 504 +++++++++++++++++++++
5 files changed, 526 insertions(+), 1 deletion(-)
---
base-commit: ceab669fdf7b7510b4e4997b33d6f66e433a96db
change-id: 20241007-veml3235-0a38265e9bae
Best regards,
--
Javier Carrasco <javier.carrasco.cruz@gmail.com>
next reply other threads:[~2024-10-23 19:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-23 18:59 Javier Carrasco [this message]
2024-10-23 18:59 ` [PATCH v3 1/2] dt-bindings: iio: light: veml6030: add veml3235 Javier Carrasco
2024-10-23 18:59 ` [PATCH v3 2/2] iio: light: add support for veml3235 Javier Carrasco
2024-10-25 9:01 ` kernel test robot
2024-10-25 9:07 ` Javier Carrasco
2024-10-26 18:10 ` Jonathan Cameron
2024-10-27 12:23 ` Javier Carrasco
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=20241023-veml3235-v3-0-8490f2622f9a@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=krzysztof.kozlowski@linaro.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;
as well as URLs for NNTP newsgroup(s).