From: Per-Daniel Olsson <perdaniel.olsson@axis.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>
Cc: <linux-iio@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<devicetree@vger.kernel.org>, <rickard.andersson@axis.com>,
<kernel@axis.com>, Per-Daniel Olsson <perdaniel.olsson@axis.com>
Subject: [PATCH v2 0/2] Support for Texas Instruments OPT4060 RGBW Color sensor.
Date: Sat, 5 Oct 2024 18:51:17 +0200 [thread overview]
Message-ID: <20241005165119.3549472-1-perdaniel.olsson@axis.com> (raw)
This patch series adds support for Texas Instruments OPT4060 RGBW Color sensor
using the i2c interface.
The driver exposes both raw adc values and calculated lux values though sysfs.
Integration time can be configured though sysfs as well. The OPT4060 sensor
supports both rising and falling threshold interrupts. These interrupts are
exposed as IIO events. The driver also implements an IIO triggered buffer with
two triggers, one trigger for conversion ready interrupts and one trigger for
threshold interrupts. The typical use case for this is to define a threshold and
listen for the events, and at the same time enable the triggered buffer with the
threshold trigger. Once the application gets the threshold event, the values
from the time of the event will be available in the triggered buffer. This
limits the number of interrupts between sensor and host and also the the usage
of sysfs for reading values after events.
Changes in v2:
- dt-bindings: Removed incorrect allOf.
- dt-bindings: Changed to generic node name.
- Correction in opt4060_trigger_one_shot(...) for continuous mode.
- Correction in opt4060_power_down(...), wrong register was read.
- Corrected usage of active_scan_mask in opt4060_trigger_handler(...).
- Clean-up of various comments.
- Link to V1: https://lore.kernel.org/lkml/20241003164932.1162049-1-perdaniel.olsson@axis.com/
Per-Daniel Olsson (2):
dt-bindings: iio: light: Document TI OPT4060 RGBW sensor
iio: light: Add support for TI OPT4060 color sensor
.../bindings/iio/light/ti,opt4060.yaml | 51 +
drivers/iio/light/Kconfig | 13 +
drivers/iio/light/Makefile | 1 +
drivers/iio/light/opt4060.c | 1216 +++++++++++++++++
4 files changed, 1281 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/light/ti,opt4060.yaml
create mode 100644 drivers/iio/light/opt4060.c
base-commit: 0c559323bbaabee7346c12e74b497e283aaafef5
--
2.39.5
next reply other threads:[~2024-10-05 16:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-05 16:51 Per-Daniel Olsson [this message]
2024-10-05 16:51 ` [PATCH v2 1/2] dt-bindings: iio: light: Document TI OPT4060 RGBW sensor Per-Daniel Olsson
2024-10-06 12:34 ` Krzysztof Kozlowski
2024-10-05 16:51 ` [PATCH v2 2/2] iio: light: Add support for TI OPT4060 color sensor Per-Daniel Olsson
2024-10-06 15:18 ` Jonathan Cameron
2024-10-08 12:05 ` Per-Daniel Olsson
2024-10-07 6:38 ` kernel test robot
2024-10-07 15:04 ` kernel test robot
2024-10-06 15:24 ` [PATCH v2 0/2] Support for Texas Instruments OPT4060 RGBW Color sensor Jonathan Cameron
2024-10-07 13:37 ` Per-Daniel Olsson
2024-10-08 17:11 ` Jonathan Cameron
2024-10-15 15:50 ` Per-Daniel Olsson
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=20241005165119.3549472-1-perdaniel.olsson@axis.com \
--to=perdaniel.olsson@axis.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=kernel@axis.com \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rickard.andersson@axis.com \
--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