Linux Kernel Mentees Archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Anshul Dalal <anshulusr@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org,
	devicetree@vger.kernel.org, Conor Dooley <conor+dt@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	linux-kernel-mentees@lists.linuxfoundation.org
Subject: Re: [PATCH v5 3/3] iio: chemical: add support for Aosong AGS02MA
Date: Sun, 17 Dec 2023 14:45:42 +0000	[thread overview]
Message-ID: <20231217144542.0794bd0e@jic23-huawei> (raw)
In-Reply-To: <20231215162312.143568-3-anshulusr@gmail.com>

On Fri, 15 Dec 2023 21:53:11 +0530
Anshul Dalal <anshulusr@gmail.com> wrote:

> A simple driver for the TVOC (Total Volatile Organic Compounds)
> sensor from Aosong: AGS02MA
> 
> Steps in reading the VOC sensor value over i2c:
>   1. Read 5 bytes from the register `AGS02MA_TVOC_READ_REG` [0x00]
>   2. The first 4 bytes are taken as the big endian sensor data with final
>      byte being the CRC
>   3. The CRC is verified and the value is returned over an
>      `IIO_CHAN_INFO_RAW` channel as percents
> 
> Tested on Raspberry Pi Zero 2W
> 
> Datasheet: https://asairsensors.com/wp-content/uploads/2021/09/AGS02MA.pdf
> Signed-off-by: Anshul Dalal <anshulusr@gmail.com>

Hi Anshul, Just one trivial thing. I'll fix up whilst applying.

Applied to the togreg branch of iio.git. Will be initially pushed out as testing
for 0-day to see if it can find anything we missed.

Thanks,

Jonathan

> +
> +static const struct iio_info ags02ma_info = {
> +	.read_raw = ags02ma_read_raw,
> +};
> +
> +static const struct iio_chan_spec ags02ma_channel = {
> +	.type = IIO_CONCENTRATION,
> +	.channel2 = IIO_MOD_VOC,
> +	.info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | BIT(IIO_CHAN_INFO_SCALE)

Comma after this line. I'll fix up if there isn't much else.
The reason for this is that it is very plausible we'll add more to this
channel description in the future and the absence of the comma would make that
messier.


> +};


      reply	other threads:[~2023-12-17 14:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-15 16:23 [PATCH v5 1/3] dt-bindings: vendor-prefixes: add aosong Anshul Dalal
2023-12-15 16:23 ` [PATCH v5 2/3] dt-bindings: iio: chemical: add aosong,ags02ma Anshul Dalal
2023-12-15 16:23 ` [PATCH v5 3/3] iio: chemical: add support for Aosong AGS02MA Anshul Dalal
2023-12-17 14:45   ` Jonathan Cameron [this message]

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=20231217144542.0794bd0e@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=anshulusr@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@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 read-only IMAP folder(s) and NNTP newsgroup(s).