From: Akhilesh Patil <akhilesh.patil@linux.dev>
To: jic23@kernel.org, andy@kernel.org, krzk+dt@kernel.org,
robh@kernel.org, dlechner@baylibre.com, nuno.sa@analog.com,
conor+dt@kernel.org, joshua.crofts1@gmail.com,
maxwell@maxwelld.cc, u.kleine-koenig@baylibre.com
Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, akhileshpatilvnit@gmail.com,
akhilesh@ee.iitb.ac.in
Subject: [PATCH 0/2] iio: chemical: Add driver and bindings for acd10
Date: Sun, 22 Nov 2026 06:30:43 +0000 [thread overview]
Message-ID: <cover.1795326744.git.akhilesh.patil@linux.dev> (raw)
This patch series adds support for Aosong ASAIR acd10 CO2 (Carbon
dioxide) sensor driver in IIO subsystem.
Patch 1: Adds bindings for this hardware
Patch 2: Adds driver code for acd10 under drivers/iio/chemical
Quick overview of acd10:
- This is CO2 sensor based on NDIR technology.
- Can measure CO2 concentration up to 5000ppm
- Supports serial interface over UART with 1200 baud rate.
Datasheet: https://www.es.co.th/Schemetic/PDF/ACD10.PDF
Protocol:
acd10 defines 4 types of UART frames - read co2, get software version,
get instrument number and set single point calibration.
Frame format: fixed header, length of data, command code, Actual data,
checksum. Response from the sensor follows same format.
Total length of each tx and rx frame for 4 commands is fixed and defined in
the datasheet. Driver uses this information to write and read from
sensor for each command over serdev interface.
Testing:
Driver is tested on Texas Instruments am62x sk board with sensor
connected on UART5 on 40pin IO expander. Additional 3.3 to 5v
bidirectional logic translator is used to interface with 3.3v IOs of
am62x. Values are read using iio sysfs interface. Also I have blown into
the sensor to observe sensor output increase due to CO2 in my exhale.
Waveforms for read co2, get sw rev and get ins num commands are
validated on logic analyzer.
Slight deviation from datasheet:
For command get software version, datasheet mentions frame length of 16
bytes including D11 reserved, however it is observed that sensor sends
15 bytes with length field 0xb (11 bytes of data), but actual data is 10
bytes. Hence, this is handled in the driver.
Driver supports reading co2, getting sw version and instrument number.
Single point calibration and preheat implementation is left for
future contributions.
Akhilesh Patil (2):
dt-bindings: iio: chemical: Add aosong acd10
iio: chemical: acd10: Add driver for ACD10 CO2 sensor
.../bindings/iio/chemical/aosong,acd10.yaml | 34 ++
MAINTAINERS | 7 +
drivers/iio/chemical/Kconfig | 10 +
drivers/iio/chemical/Makefile | 1 +
drivers/iio/chemical/acd10.c | 365 ++++++++++++++++++
5 files changed, 417 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/chemical/aosong,acd10.yaml
create mode 100644 drivers/iio/chemical/acd10.c
--
2.47.3
next reply other threads:[~2026-11-22 6:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-22 6:30 Akhilesh Patil [this message]
2026-11-22 6:31 ` [PATCH 1/2] dt-bindings: iio: chemical: Add aosong acd10 Akhilesh Patil
2026-11-22 6:32 ` [PATCH 2/2] iio: chemical: acd10: Add driver for ACD10 CO2 sensor Akhilesh Patil
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=cover.1795326744.git.akhilesh.patil@linux.dev \
--to=akhilesh.patil@linux.dev \
--cc=akhilesh@ee.iitb.ac.in \
--cc=akhileshpatilvnit@gmail.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=joshua.crofts1@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maxwell@maxwelld.cc \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
--cc=u.kleine-koenig@baylibre.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