Re: [PATCH v5 3/3] iio: chemical: add support for Aosong AGS02MA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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.


> +};





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux