Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2408326imu; Fri, 14 Dec 2018 10:29:44 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vn788xtM9KQe4ICEEtrbmBdBw1UC1mfUOfDRCaYVRaxYPznGDEj9akvn8KqKoZDcUlohxP X-Received: by 2002:aa7:81d0:: with SMTP id c16mr3768065pfn.153.1544812184507; Fri, 14 Dec 2018 10:29:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544812184; cv=none; d=google.com; s=arc-20160816; b=scxHZQNl81Pk5aw4ghiz52X2zeg5szbSTaKNKfq5/S6hEpoUZDHY/Sm3mmuN4O65/T VOlXctmJGy5AqsxACJ4OPspEv5LWxbJHRmWo3hZMM3Y2bzGi4vM2/+Pku3Gb7+o9JA5z Hsyti6LBNNprgWmVbk0m80t3N6RXPg0eV6EcVwmnWFO7vWcnjXk8h8OvS6Nm2bkd7dbq SACknEgVP8KgaNgFJ00BZuqu4y8CuWVFy/QIRNf9bv5aVYbFKgDF5LRcfFpVTnaiVnNE S/j/5luMsqO51k8gerG3o3RzNQ2dV/CFVkXUIbG5YDxa9uchhmJn0Vg1ZZK0QjVYprdo poOg== 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:dkim-signature; bh=UY4MZrqT9fOFmcCS99HsY3w6J1Hvl7LgpuVuFvc2yho=; b=ZBRiMYpZLUeaK9Sy+cQ7QMO5grVbTvjJrjTq9OOpia+G1MPgWJ5h9zRAzpTOKUdRiV tuG8LgdU/Qlq6laOKM66vZ4LmECTWtwE6uEZ0P1HWRlHLvESy8l0XjtjusMlOoIsyzSF +ZLaVfOn5nEIW/7jt6cnvlgt5XMe+aVdn79hE7ZCzXKndoa+r2VjSEVMLd/qjLi3lWb4 2ebMg0axA6hKktNZdQf6FE0BKAJME8UtKvVVYNiXRA5Po9gfPw/Z1fhbR/VUGDVlMc81 0Cfe2dRIpvDu4GrkSw+//yS0EuHMzx0t1gmox137M1FZ7pfQJhYtMPcodXFKUI5jXoof AhHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PUsd7wnf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w24si4327123plp.304.2018.12.14.10.29.24; Fri, 14 Dec 2018 10:29:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PUsd7wnf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730403AbeLNS2c (ORCPT + 99 others); Fri, 14 Dec 2018 13:28:32 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:38220 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729619AbeLNS2c (ORCPT ); Fri, 14 Dec 2018 13:28:32 -0500 Received: by mail-lj1-f193.google.com with SMTP id c19-v6so5717598lja.5; Fri, 14 Dec 2018 10:28:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=UY4MZrqT9fOFmcCS99HsY3w6J1Hvl7LgpuVuFvc2yho=; b=PUsd7wnfyputS55sdWacjqL3xgV1uC8A3h2wWzjzlJ6LSiTRlGJAHa+sFeZli6hoil BOmdYQ/5q4OODgQPcEtiDwct/jXmZyf1G5YkR2cs+mrD7VAS7RzzYG0FmK+zDMj2xHno qIIOB8TSKz+2unh8UicwsM6lPXxZfLqo8Mmrk9qsSc51J2L+3yrgTKEBAYdAS3X+HUZv n2l0glwwPAZxqsZOffhbuU1LaPo6uINNuvhLgUJvtta7GemzTAyFXe5IOjGnjCohi9D1 9HZnMYY94r1U07O2oK67INxJwYgcH6EwcHiaUCe8SBOhIxSlP+oMcH4mI3lXXyhpK5XU MJ1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=UY4MZrqT9fOFmcCS99HsY3w6J1Hvl7LgpuVuFvc2yho=; b=Ry8locCLyytqn0tRLNFAygY6ELWKnH27JAI/2Iy90Lp0VtPeL28nuDjrJXaMcKba6Y 6AX1/P8Koqfb4Pw8zHaLO74bVEnMuygllswI+tYYWRkYpje41PT+ja0GU7XA5X8QMABi pkvQO+vLlLtot/LgS5zgUoxsUUMcvfhPVEMxwg0HXF0xeiZvVXYT/aclyWb191Jq3gxp Nx85iskS++VPc0kimAoukG32/F9BAPUY72CRuJX8jzodjsRIUK7MTVfv39HPXvh/A47B 0/4J5oggBTtZ7tgwjfLlUVb6IkH170TyKH+7CZG1AxCM35PLgFNjK5V3ZFJZdQY8mKRA gXsg== X-Gm-Message-State: AA+aEWaSiDk2VhGiDmdrmMO0xdoYbqehY+oiQe0Oh9YfGNIg7S/zvIFI +8BGr8KSEeMPEp3V2QGl8NtX1mD5yYw= X-Received: by 2002:a2e:92:: with SMTP id e18-v6mr2667379lji.130.1544812109268; Fri, 14 Dec 2018 10:28:29 -0800 (PST) Received: from arch.domain.name (89-70-220-87.dynamic.chello.pl. [89.70.220.87]) by smtp.gmail.com with ESMTPSA id e14-v6sm947961ljb.31.2018.12.14.10.28.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Dec 2018 10:28:28 -0800 (PST) From: Tomasz Duszynski To: linux-iio@vger.kernel.org Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, jic23@jic23.retrosnub.co.uk, a.brauchli@elementarea.net, Tomasz Duszynski Subject: [PATCH v4 0/3] add support for Sensirion SPS30 PM sensor Date: Fri, 14 Dec 2018 19:28:00 +0100 Message-Id: <20181214182803.9006-1-tduszyns@gmail.com> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series adds support for Sensirion SPS30 particulate matter sensor. Along with a driver itself, new channel type and modifiers for distinguishing between coarse and fine particles measurements are introduced. Sensor datasheet can be downloaded from https://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/0_Datasheets/Particulate_Matter/Sensirion_PM_Sensors_SPS30_Datasheet.pdf v4: * this will likely go in next release cycle so increase version to 4.22 * use KBUILD_MODNAME in format specifier v3: * convert be32 to cpu using predefined macro * remove semicolon: reported by semicolon.cocci * use capitalization consistently (particulate matter) v2: * add support for PM1 and PM4 measurements * get rid of variable length arrays * do proper cleanup via devm_add_action_or_reset() * add extra level of precision (two decimal places) while displaying measurements * improve comments a little bit * slight refactoring and general improvements here and there Tomasz Duszynski (3): iio: add IIO_MASSCONCENTRATION channel type iio: chemical: add support for Sensirion SPS30 sensor iio: chemical: sps30: add device tree support Documentation/ABI/testing/sysfs-bus-iio | 17 +- .../bindings/iio/chemical/sensirion,sps30.txt | 12 + drivers/iio/chemical/Kconfig | 11 + drivers/iio/chemical/Makefile | 1 + drivers/iio/chemical/sps30.c | 406 ++++++++++++++++++ drivers/iio/industrialio-core.c | 5 + include/uapi/linux/iio/types.h | 5 + tools/iio/iio_event_monitor.c | 10 + 8 files changed, 466 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/iio/chemical/sensirion,sps30.txt create mode 100644 drivers/iio/chemical/sps30.c -- 2.20.0