Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1610449ybm; Sat, 30 May 2020 14:42:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGgEhwNK0rGPLml56IOLz6W8nz1aFWXfyMox6jbfeCyG54tNV20UUllmi9MzHrYlQ8Xl/b X-Received: by 2002:a17:906:ac3:: with SMTP id z3mr6929112ejf.311.1590874943689; Sat, 30 May 2020 14:42:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590874943; cv=none; d=google.com; s=arc-20160816; b=UTllcYORBjYGZhbqNAKP4NKIPZcqE3mi7KLJ9nXo4EkzBDX3WzDlQVFFIGH1FQkKhY Ap2dHF+qJhmS9kLDyP06F332IV0ObqxVYPCpJmd4ePvp+NXf+bIJW4AanRU+RAn8m0wb IPY5G/Vz9v3JLpRyz1129mzeakUCHGmOUnfhi8euCJplc1i3e56B/qk23bYaD7Jp+ZFH OIBVsfv0yp3Z99sPif0GVckVS7zRLgkFj3JRpnFPY+cS4HyBlsAt66XWnHOvBSFAzwnq fvDiVk0jOEkIRVeGUSmMFyBQ47I5jpAcIn7jbBnbrRAaKXtynaqAxF53QvQf2t8DOr1o SsCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=0OPeiNZIplvprqcscBuo4H3a2fvQCMqYgQ6PW6Hv5iA=; b=NLuU2UKvow8Nh2zMyh8mYR1u5AJSVJA7TG+2kHX3l2UdhsSEpcV0lihd9FugRdLt0w dzxTjywZ6pAjcVngK9k+pvIc6DpESAWI/23iwSw2xF3L9ewQAdE1GBzgPMXGLb2WTcgY 8X/zuoRP0bjU0GkdEeRvjy6u/7SO//UKLMgxW4rIQXa62GG7xpdneWM63WG6dbhXfP6s 1+94Hy+P092Uk1b82Z0zUeRLPeRr3s3SCj5U+0gdqUNy8Rs6L9TQFU6LiEjR7I955wo+ 9OaM2KLJMvqNY2LzL5k5k2MBSlOesGQOEA5ZZbhdJWDJgUIu0T6Nm7tZ0CblfEpU275c AEAg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c5si1137562edq.283.2020.05.30.14.41.43; Sat, 30 May 2020 14:42:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729365AbgE3Vit (ORCPT + 99 others); Sat, 30 May 2020 17:38:49 -0400 Received: from smtpout1.mo803.mail-out.ovh.net ([79.137.123.219]:45487 "EHLO smtpout1.mo803.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729098AbgE3Vit (ORCPT ); Sat, 30 May 2020 17:38:49 -0400 Received: from pro2.mail.ovh.net (unknown [10.109.143.168]) by mo803.mail-out.ovh.net (Postfix) with ESMTPS id 1D60B54AA496; Sat, 30 May 2020 23:38:47 +0200 (CEST) Received: from arch.lan (89.70.180.118) by DAG2EX1.emp2.local (172.16.2.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1847.3; Sat, 30 May 2020 23:38:39 +0200 From: Tomasz Duszynski To: CC: , , , , , , Tomasz Duszynski Subject: [PATCH v2 0/4] Add support for SCD30 sensor Date: Sat, 30 May 2020 23:36:26 +0200 Message-ID: <20200530213630.87159-1-tomasz.duszynski@octakon.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [89.70.180.118] X-ClientProxiedBy: DAG2EX1.emp2.local (172.16.2.11) To DAG2EX1.emp2.local (172.16.2.11) X-Ovh-Tracer-Id: 15161086671329451031 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduhedrudeftddgudeiudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecunecujfgurhephffvufffkffoggfgtghisehtkeertdertddtnecuhfhrohhmpefvohhmrghsiicuffhushiihihnshhkihcuoehtohhmrghsiidrughushiihihnshhkihesohgtthgrkhhonhdrtghomheqnecuggftrfgrthhtvghrnhephedtgefgkeduvdekheeggefghffhteekleetvdekvddtveeutdetueefueehieetnecukfhppedtrddtrddtrddtpdekledrjedtrddukedtrdduudeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhpqdhouhhtpdhhvghlohepphhrohdvrdhmrghilhdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomhepthhomhgrshiirdguuhhsiiihnhhskhhisehotghtrghkohhnrdgtohhmpdhrtghpthhtohepphhmvggvrhifsehpmhgvvghrfidrnhgvth Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Following series adds support for Sensirion SCD30 sensor module capable of measuring carbon dioxide, temperature and relative humidity. CO2 measurements base on NDIR principle while temperature and relative humidity are measured by the on board SHT31. As for sensor communication, both I2C and serial interfaces are supported. v2: * move asm/byteorder.h towards the bottom of include list * make channel address names in enum more specific * add postfixes to defines and extra comments * drop unneeded i2c include from scd30 header * break generic command sending function into specialized options * expose automatic calibration and forced calibration via the same attr * use SAMP_FREQ to set frequency instead of meas_interval attr * use CALISCALE to set pressure compensation instead of pressure_comp attr * use CALIBBIAS to set temperature offset instead of temp_offset attr * fix order in MAINTAINERS * drop attribute allowing one to reset sensor * as we have dt probing drop board file based probing (i2c_device_id) * merge patches touching related files * use fwnode API to retrieve interrupt from dt * fix interrupt-parent spelling * change binding license * drop supply from required property Tomasz Duszynski (4): iio: chemical: scd30: add core driver iio: chemical: scd30: add I2C interface driver iio: chemical: scd30: add serial interface driver dt-bindings: iio: scd30: add device binding file Documentation/ABI/testing/sysfs-bus-iio-scd30 | 20 + .../iio/chemical/sensirion,scd30.yaml | 68 ++ MAINTAINERS | 9 + drivers/iio/chemical/Kconfig | 33 + drivers/iio/chemical/Makefile | 3 + drivers/iio/chemical/scd30.h | 75 ++ drivers/iio/chemical/scd30_core.c | 764 ++++++++++++++++++ drivers/iio/chemical/scd30_i2c.c | 134 +++ drivers/iio/chemical/scd30_serial.c | 266 ++++++ 9 files changed, 1372 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-scd30 create mode 100644 Documentation/devicetree/bindings/iio/chemical/sensirion,scd30.yaml create mode 100644 drivers/iio/chemical/scd30.h create mode 100644 drivers/iio/chemical/scd30_core.c create mode 100644 drivers/iio/chemical/scd30_i2c.c create mode 100644 drivers/iio/chemical/scd30_serial.c -- 2.26.2