lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20231217144542.0794bd0e@jic23-huawei>
Date: Sun, 17 Dec 2023 14:45:42 +0000
From: Jonathan Cameron <jic23@...nel.org>
To: Anshul Dalal <anshulusr@...il.com>
Cc: linux-kernel@...r.kernel.org, linux-iio@...r.kernel.org,
 devicetree@...r.kernel.org, Conor Dooley <conor+dt@...nel.org>, Lars-Peter
 Clausen <lars@...afoo.de>, Rob Herring <robh+dt@...nel.org>, Krzysztof
 Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
 linux-kernel-mentees@...ts.linuxfoundation.org
Subject: Re: [PATCH v5 3/3] iio: chemical: add support for Aosong AGS02MA

On Fri, 15 Dec 2023 21:53:11 +0530
Anshul Dalal <anshulusr@...il.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@...il.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.


> +};


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ