From: Subhajit Ghosh <subhajit.ghosh@tweaklogic.com>
To: Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Matti Vaittinen <mazziesaccount@gmail.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Paul Gazzillo <paul@pgazz.com>
Cc: Subhajit Ghosh <subhajit.ghosh@tweaklogic.com>,
Matt Ranostay <matt@ranostay.sg>,
Stefan Windfeldt-Prytz <stefan.windfeldt-prytz@axis.com>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/2] Support for Avago APDS9306 Ambient Light Sensor
Date: Fri, 27 Oct 2023 18:15:43 +1030 [thread overview]
Message-ID: <20231027074545.6055-1-subhajit.ghosh@tweaklogic.com> (raw)
This series adds support for Avago (Broadcom) APDS9306 Ambient Light
Sensor.
Datasheet: https://docs.broadcom.com/doc/AV02-4755EN
Following features are supported:
- I2C interface
- 2 channels - als and clear
- Raw data for als and clear channels
- Up to 20 bit resolution
- 20 bit data register for each channel
- Common Configurable items for both channels
- Integration Time
- Scale
- High and Low threshold interrupts for each channel
- Selection of interrupt channels - als or clear
- Selection of interrupt mode - threshold or adaptive
- Level selection for adaptive threshold interrupts
- Persistence (Period) level selection for interrupts
This driver also uses the IIO GTS Helpers Namespace for Scales, Gains
and Integration time implementation.
root@stm32mp1:~# tree -I 'dev|name|of_node|power|subsystem|uevent' \
> /sys/bus/iio/devices/iio:device1/
/sys/bus/iio/devices/iio:device1/
|-- events
| |-- in_illuminance_thresh_either_en
| |-- in_intensity_clear_thresh_either_en
| |-- thresh_adaptive_either_en
| |-- thresh_adaptive_either_value
| |-- thresh_adaptive_either_values_available
| |-- thresh_either_period
| |-- thresh_either_period_available
| |-- thresh_falling_value
| `-- thresh_rising_value
|-- in_illuminance_raw
|-- in_intensity_clear_raw
|-- integration_time
|-- integration_time_available
|-- sampling_frequency
|-- sampling_frequency_available
|-- scale
|-- scale_available
`-- waiting_for_supplier
1 directory, 18 files
v1 -> v2
- apds9306 driver
- Fixed kernel build failure due to probe_new(), replaced with probe()
v0 -> v1
- dt_bindings
- Squashed apds9300 and apds9600 dt bindings, added apds9306 bindings on
top of that
- Added detailed commit message for dt_bindings
- apds9306 driver
- Fixes as per review
- Not disabling the regmap internal lock
- Removing processed attribute for als channel which exposes raw values
- Modified the iio gts scale implementation for above change
- Not implementing a fallback and warning for compatibility and part ID
mismatch as suggested by Matti and Jonathan as Rob insisted on having
a single compatible string for the driver (if the device can power up
with a single compatible string, which it does).
Subhajit Ghosh (2):
dt-bindings: iio: light: Avago APDS9306
iio: light: Add support for APDS9306 Light Sensor
.../bindings/iio/light/avago,apds9300.yaml | 35 +-
.../bindings/iio/light/avago,apds9960.yaml | 44 -
drivers/iio/light/Kconfig | 12 +
drivers/iio/light/Makefile | 1 +
drivers/iio/light/apds9306.c | 1326 +++++++++++++++++
5 files changed, 1369 insertions(+), 49 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/iio/light/avago,apds9960.yaml
create mode 100644 drivers/iio/light/apds9306.c
base-commit: 611da07b89fdd53f140d7b33013f255bf0ed8f34
--
2.34.1
next reply other threads:[~2023-10-27 7:45 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-27 7:45 Subhajit Ghosh [this message]
2023-10-27 7:45 ` [PATCH v2 1/2] dt-bindings: iio: light: Avago APDS9306 Subhajit Ghosh
2023-10-27 8:11 ` Krzysztof Kozlowski
2023-10-27 8:55 ` Subhajit Ghosh
2023-10-27 11:03 ` Krzysztof Kozlowski
2023-10-28 13:29 ` Jonathan Cameron
2023-10-27 7:45 ` [PATCH v2 2/2] iio: light: Add support for APDS9306 Light Sensor Subhajit Ghosh
2023-10-27 8:13 ` Krzysztof Kozlowski
2023-10-27 8:42 ` Subhajit Ghosh
2023-10-27 11:04 ` Krzysztof Kozlowski
2023-10-27 11:42 ` Subhajit Ghosh
2023-10-28 13:36 ` Jonathan Cameron
2023-10-27 11:07 ` Andy Shevchenko
2023-10-27 11:36 ` Subhajit Ghosh
2023-10-28 6:29 ` kernel test robot
2023-10-28 15:20 ` Jonathan Cameron
2023-10-29 15:51 ` Matti Vaittinen
2023-10-30 10:21 ` Matti Vaittinen
2023-10-31 7:11 ` Matti Vaittinen
2023-10-31 8:20 ` Subhajit Ghosh
2023-10-31 10:38 ` Andy Shevchenko
2023-10-31 11:39 ` Matti Vaittinen
2023-10-31 12:07 ` Matti Vaittinen
2023-10-31 13:42 ` Andy Shevchenko
2023-11-01 6:16 ` Matti Vaittinen
2023-11-02 12:50 ` Andy Shevchenko
2023-10-31 8:38 ` Subhajit Ghosh
2023-11-06 11:13 ` Jonathan Cameron
2023-11-06 12:04 ` Subhajit Ghosh
2023-11-06 12:10 ` Matti Vaittinen
2023-12-04 9:51 ` Jonathan Cameron
2023-11-05 14:22 ` kernel test robot
2023-11-06 10:07 ` Andy Shevchenko
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=20231027074545.6055-1-subhajit.ghosh@tweaklogic.com \
--to=subhajit.ghosh@tweaklogic.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matt@ranostay.sg \
--cc=mazziesaccount@gmail.com \
--cc=paul@pgazz.com \
--cc=robh+dt@kernel.org \
--cc=stefan.windfeldt-prytz@axis.com \
/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).