Received: by 2002:ab2:68c1:0:b0:1fd:9a81:d0e4 with SMTP id e1csp425406lqp; Sun, 9 Jun 2024 02:31:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWiz9Bn+j4bq5OJO8XDzBwMOp4cGQjD8jktdmTpvLA5a0s8o/zG/x0gfNgPirxOSQ9iGn8MYIuHtRj9O5501+sTXR2MTk/dgzoY/BcVMA== X-Google-Smtp-Source: AGHT+IG0MsSTzM9X9MMCOGh7CvWBMCoiNKX8I2QVrujezQuLAlcDgcdYB9mA6PA2LFa0EIGtE3SD X-Received: by 2002:a17:902:f550:b0:1f6:1f90:987a with SMTP id d9443c01a7336-1f6d02c8ff4mr86026275ad.3.1717925479159; Sun, 09 Jun 2024 02:31:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717925479; cv=pass; d=google.com; s=arc-20160816; b=bODxSUZQ5FFZGOqmn75APhs9YJKSnM+bIdrDTxkF3YnzqTevoXw3E92MB1xR7Hnprw YtbdNRWxQEFPXOnCt8D48nu1DBbgrAg824YItmpTM7lqxGjbaDTvY2OFDRbGW/Nax+BB el1oJWYZTFjWHh6gIMbVebe3JQcelukY+9SL0enjFxh+MokTSZX9k+55Uu36qrIW8YaF uGT0c7XN4b9rRplsEu9jNEdAHogj65aoanKGlEy4/7oUrKHZCaXn10/gkOntkj/xxrOb +usKpnmg4Ls+R40GNZqtWcX1HsW5MUbLmwwPO4xLv4u9mlNvkzJEJMIICz4zEKNrGtjI cp0Q== ARC-Message-Signature: i=2; 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=NT9BptZW2ocliadaoER7XH1S+vSUX457ICvrL4ipwBc=; fh=gIRTlJ9wiarARgGEYwVds5qcWU4SR7fhnTOxezDmIt0=; b=tWAQnRJXdXUydyR6mfsuXe5bC76h6sXdU/JBeiXa5njwiP9Li8QoqadLWTIH0QfNfv W/luYDFxsKXghGr8hlpsLPTJCBA5t46KyjZkCWKvgnl51jjZalwkGKhCyIVAGV4Cilmq Cosn64aHCSpBzuLxH8Qaj3qrLf+RTOp2V5bpBFEzrn43U0aRYbT9A4PCjCC93wraYmaI 5fYTivrIJP+Kf3ANrSzFhx5GneU6i4DWLPI97CsMcimKVqaevqkwIQ+LqdGVsDCIHOb2 w4fM2LyzN4BPQD5DsMklYdkiicFKnOGUvXMlsqmKREOIc/CCwh90x1DJhHqAhK3+t1R/ K8VA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lS4LRnKn; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-207305-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207305-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1f70ed8d910si3619075ad.449.2024.06.09.02.31.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jun 2024 02:31:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-207305-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lS4LRnKn; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-207305-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207305-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 63DB12820C1 for ; Sun, 9 Jun 2024 09:31:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8C0721CF9B; Sun, 9 Jun 2024 09:31:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lS4LRnKn" 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 AC9B8360; Sun, 9 Jun 2024 09:31:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717925470; cv=none; b=EDo58zez23uaRrwpM/Akv/mIf1w69axF0LrjWvGd/n8Z8klVk7+pisTootNakGwkH9n0xYGtecjS73KBRKo6UdkSAjwAW0va2aq7ZJoXdceF8Kavl64acT9epOQBvVaWvp493zFtGk++EFY1bxIg9nQtozEzKfBEWsYUmY8OmwM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717925470; c=relaxed/simple; bh=jXOCtKxUztDJQHOsx2MNS1JltHk7f/xxhqp0JBqI5Z4=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=lsuRxON8DN19ChT6+hSaYBO/R5sLMtBxQqKO3CbZqRdpyJVklvz/JOZFfzTs5ZGfjl6cjUwGXtX0vcJce2ItQrV6UtlevVFoFNL4xj1yaoCUJRCU7booxUYW5DeIC4qUZUQztpC92kGDwCbVDCMhugsTP11Xsq2KUoiLUWydqS8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lS4LRnKn; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2DB5AC2BD10; Sun, 9 Jun 2024 09:30:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717925470; bh=jXOCtKxUztDJQHOsx2MNS1JltHk7f/xxhqp0JBqI5Z4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=lS4LRnKn6nIb4Jw2kD/zVGvFtpSjyfOv5na0eTJxZ5cxY1CI9AKlUSv595j5V1UmI 2T2V1tPoy53ySkc9TCATmi/lspGgbd9PCY7KGkL7QhxjfrJkBVRHbfTvhpSBw4GYZX 41+xqDF8G8zdbQ+a77x4IPGCjrgYUhDkIokzzOeKyFF/IPNVbLByZJveIKlf/zsxYI 8cdU2+V0lAZAwRgtP2+U9ZysKlV+j6gTUti6TiSp0LK/aQBwvN8t0Od1bRQoIEaMyu 5bKNG3p4D5o4AHS2AcufojZ8NsOPS1V08clMb8XJcJQugKye0qozOoUFrt5AM12PaZ LkcMJvtrpGI1A== Date: Sun, 9 Jun 2024 10:30:33 +0100 From: Jonathan Cameron To: Gustavo Silva Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, lars@metafoo.de, christophe.jaillet@wanadoo.fr, devicetree@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 3/6] iio: chemical: add driver for ENS160 sensor Message-ID: <20240609103033.2f746f1e@jic23-huawei> In-Reply-To: <20240604225747.7212-4-gustavograzs@gmail.com> References: <20240604225747.7212-1-gustavograzs@gmail.com> <20240604225747.7212-4-gustavograzs@gmail.com> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.42; 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 Tue, 4 Jun 2024 19:57:27 -0300 Gustavo Silva wrote: > ScioSense ENS160 is a digital metal oxide multi-gas sensor, designed > for indoor air quality monitoring. The driver supports readings of > CO2 and VOC, and can be accessed via both SPI and I2C. > > Datasheet: https://www.sciosense.com/wp-content/uploads/2023/12/ENS160-Datasheet.pdf > No blank lines in tags block. Datahsheet is a semi official tag. I'll tidy up in this and previous patch if everything else fine. > Signed-off-by: Gustavo Silva > --- > drivers/iio/chemical/Kconfig | 22 +++ > drivers/iio/chemical/Makefile | 3 + > drivers/iio/chemical/ens160.h | 7 + > drivers/iio/chemical/ens160_core.c | 221 +++++++++++++++++++++++++++++ > drivers/iio/chemical/ens160_i2c.c | 60 ++++++++ > drivers/iio/chemical/ens160_spi.c | 60 ++++++++ > 6 files changed, 373 insertions(+) > create mode 100644 drivers/iio/chemical/ens160.h > create mode 100644 drivers/iio/chemical/ens160_core.c > create mode 100644 drivers/iio/chemical/ens160_i2c.c > create mode 100644 drivers/iio/chemical/ens160_spi.c > > diff --git a/drivers/iio/chemical/Kconfig b/drivers/iio/chemical/Kconfig > index 02649ab81..e407afab8 100644 > --- a/drivers/iio/chemical/Kconfig > +++ b/drivers/iio/chemical/Kconfig > @@ -76,6 +76,28 @@ config CCS811 > Say Y here to build I2C interface support for the AMS > CCS811 VOC (Volatile Organic Compounds) sensor > > +config ENS160 > + tristate "ScioSense ENS160 sensor driver" > + depends on (I2C || SPI) > + select REGMAP > + select ENS160_I2C if I2C > + select ENS160_SPI if SPI > + help > + Say yes here to build support for ScioSense ENS160 multi-gas sensor. > + > + This driver can also be built as a module. If so, the module for I2C > + would be called ens160_i2c and ens160_spi for SPI support. > + > +config ENS160_I2C > + tristate > + depends on I2C && ENS160 > + select REGMAP_I2C > + > +config ENS160_SPI > + tristate > + depends on SPI && ENS160 > + select REGMAP_SPI As these two config symbols aren't exposed I think you don't need the depends lines. See the BMA400 entry in drivers/iio/accel/Kconfig for example. If everything else looks good I'll drop those two lines whilst applying. Jonathan