Received: by 2002:a05:7412:8d08:b0:f9:2d0a:d759 with SMTP id bj8csp165482rdb; Sun, 17 Dec 2023 06:46:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IGmDLqb/pZCWxUWge6RcTY1Pfe352CteSwdli071F1PgVOJPLA1RDVHGDBn5GlvFNB6jrKr X-Received: by 2002:ad4:4a0a:0:b0:67a:c1df:fe16 with SMTP id m10-20020ad44a0a000000b0067ac1dffe16mr15665329qvz.63.1702824367085; Sun, 17 Dec 2023 06:46:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702824367; cv=none; d=google.com; s=arc-20160816; b=IbYsBTEHTwo9LZtcNfy40JAbSI43JEgNXpS1XbhsiD6k18p05VE1IiaLbP8ry1oXMO k0Gdvu/I7Aus0iTtG/q4wJC7m1W5Y92RdipqLpn77JSAJSymiwucZwLQ6Bch2k0S8051 JtkyZRDiOZKzv7177MTf0Tcgeh+iUEiC9Cv4JEq/XMP1anTdx3aLXtdd41aESreItfjV hdnYv0w37tFaPGdg6tJ7ojqzhskcb8wvvS5qQqVlF2uQg+DVa7ukhC/hUohkvhUF4BgD c29+AOsNsGFJzdOb1I7jsRf5xhfUfDCAL1RN6dee3AHC7rY4NQbOGAGc8kdUjoAwiA0/ RxgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=NbKaXI8RWQNo/v/t+ok6TRisEDyzSV7YM3LbVA06gMo=; fh=JP59zb28mRBFAoOP53jkh1BQcrTUxlt2+xTFXHNLV0Y=; b=LnPE8D2bPt+kI+khFviDzotLOsBIsGPdg4/sMUO+MSc2K7WLkgE6cDiYj1xaiUA+Mc Da9QZSdBPM45gRgj8QR1AHgCuQR3PswAqxGtP75+HvMWzJs6BQCdTBl/zW4hqsi63b5S ZqhA4QvH/lti8R0pl/QEUxBpJK756Z+ka7ozdu2bMChZWLOECIG5o3IFY6b2lXWEt+RY uS1exFSdUX+pBrJplY6afLBhZ12L+ofIvhKOU0hIJHKZq0aZte3hCmeEDxB5Tw1qFWtX qbjNgLPrhtzAQwyqtZ3JaTz7zQXGKAKy8Bxevdx+WqiHv1AqoVaLVAjYJM2iU4IUvibD QWEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=L61K4gga; spf=pass (google.com: domain of linux-kernel+bounces-2652-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2652-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id x18-20020ae9e912000000b0077eced8c45fsi21042242qkf.538.2023.12.17.06.46.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 06:46:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2652-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=L61K4gga; spf=pass (google.com: domain of linux-kernel+bounces-2652-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2652-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C08DD1C21F53 for ; Sun, 17 Dec 2023 14:46:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9B41344C77; Sun, 17 Dec 2023 14:45:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="L61K4gga" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C5F612FE2E; Sun, 17 Dec 2023 14:45:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 05EDAC433C7; Sun, 17 Dec 2023 14:45:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702824356; bh=kVuXjANOUieH9LrXbZoogYCG3uzkAL+/ag6djbg25Og=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=L61K4ggaBYJDjrStvfKdJFi1QM0XjOPUHNMECn+3mLPV527Iv0+Ex2jO4zHYaRvOE VKelZxqO8ycWZvgcyzEluwDE5VvpsDWbcz/7k8YVbIm7x+wMpS55oFFHXbhwpMbwye B4bLSrqCOpqW1+PewwqwYbUh/g8Jmyd4ywY74hFowqMFOLXTzwlL78BXwb9gs77MII 3otY2EC/oaNp+4IRV7rl6aCo989eyf0UD2tteDfVxNptTJzNxKw95Idn7plbDVjNlG QNWOeUe1rQuryOU7v1SRDmEWs5RY9AIf76/W4foZ6UAm7TooEHAGOlt2X9zG+ejf8K 7EiO4NODTWMYg== Date: Sun, 17 Dec 2023 14:45:42 +0000 From: Jonathan Cameron To: Anshul Dalal Cc: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Conor Dooley , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , linux-kernel-mentees@lists.linuxfoundation.org Subject: Re: [PATCH v5 3/3] iio: chemical: add support for Aosong AGS02MA Message-ID: <20231217144542.0794bd0e@jic23-huawei> In-Reply-To: <20231215162312.143568-3-anshulusr@gmail.com> References: <20231215162312.143568-1-anshulusr@gmail.com> <20231215162312.143568-3-anshulusr@gmail.com> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.38; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 15 Dec 2023 21:53:11 +0530 Anshul Dalal 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 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. > +};