Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp11193679imu; Thu, 6 Dec 2018 13:08:48 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vqm+OV4J1eWuRDPiroo1FYY6bFRSh7wV9lALirfOZWOMP/G0GodOgt0c5eaZLBP9AvaaOS X-Received: by 2002:a17:902:780c:: with SMTP id p12mr29051725pll.197.1544130528321; Thu, 06 Dec 2018 13:08:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544130528; cv=none; d=google.com; s=arc-20160816; b=eFuUHxhRxEvEULmZOqY6Y0EO+uqDIMnyNT+tR0HwqWPYDOiQAUh51o8zliyvHCcj84 /a3etuE82T8ApvT8KLnBvotMOHBo1SdCTZg0i7aAoO2en0daNYSIY4JZLbRJxo82KJsp WFIPrjNzLAOef3wr0FayiSGuPDIqPVG+M791yw9+gsSd3ziVbYZpCksamyojvpbxdLPz aE4BAVNxDEGXEtoEEvcY9StKJzy+fCLZZVF5g8gjk+VAXXNtB7iC10GV0X7U2qoLm7ql IwomVnpZIq0XRmYCSdt2VVieD7HlyalMvf7+shYODvypAY8SAj+nBMEhKMgDSCtWa0rn MGHA== 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=qlckCdPuY2t2qCWWyGwxN4+a8ep4ZV8vwpKhBBe/rkY=; b=D9Yc8ZKzpKuHlaarQbpG+qEKNdwSetzgpBbOPEMErJIdSc+cqZ0HPSekVFSC1ZiGn0 VnvPeRXJs6i4Ghytbq836byXbMi6o5itQAiQSbmFUgo6DzEy/E3JrFaWmFnvdwCto/8q LuhjIRMVkDNsR/taItBE5jjlHCP7Se6YJaB5pKVMmyiasaTye0Zwzve/tfPwPthrnH9m 1C6aAYDlW/RC7d898JBJVBUxAyd2w8tWY9BXliHfSJ/A9gx0zKVFNGgroZfaCYotmR25 RXVFb2N5S3jfHPr/zZIXerPhgwSeI/4ZU8B1R4P6ByjCfzicSAtxR2rgPw+SznWpiUWJ sIQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Xcd3IfUo; 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 p8si1104913pls.83.2018.12.06.13.08.30; Thu, 06 Dec 2018 13:08:48 -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=Xcd3IfUo; 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 S1725963AbeLFVFM (ORCPT + 99 others); Thu, 6 Dec 2018 16:05:12 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:44620 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725929AbeLFVFM (ORCPT ); Thu, 6 Dec 2018 16:05:12 -0500 Received: by mail-lj1-f196.google.com with SMTP id k19-v6so1652440lji.11; Thu, 06 Dec 2018 13:05:10 -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=qlckCdPuY2t2qCWWyGwxN4+a8ep4ZV8vwpKhBBe/rkY=; b=Xcd3IfUoBMIpAVpGSWJYQvadKlS8CMl0K/jA0jHms0vZUBP3RWEPw7PpDA4P0sJnBu xVJLwjj1WmKMWD7kO9Nb+g75Bity61Eg9Xg0OSz79D33oaJ2FJ98QRNpVh0JOOl3hjbe jrEFXHIe32/en+ERBAXVuDbqUiFg+egGXLc4rVyE82hUpkBys/o4W4njSiNf2gfpIjg8 9L5zMK8Rpvifi4NALWBJD2RdLLt69ux9Fa/y3boK9vlvs9zuzH3srPCA5oRi9PHPzKbn dg8iDynZtDkxKW5U2DG2uwJ+6kdhDJDgmsQvII9otMXU0yN0CqhFrFfBbK3G0krsg5VJ PeJA== 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=qlckCdPuY2t2qCWWyGwxN4+a8ep4ZV8vwpKhBBe/rkY=; b=Qo7xhCn7NwLmBAPP0pMCBrJizPlwYI7By5w7CVEzSYglgQqX2ttyHJEzOqJLMrLGoN xv/GzhSgJUmj/IWy5jn0GOVYgUbEwO2BVa1Ghoyb9cf9UxNWDgyBT73Z4imNW2HPtvYy +uSvanCiG7/PIapMMRzhZlsMcC+cznkDrc+tW2n/Hl2WkMaDg6UjN0qy41jzfU0a4K9L W2l0RwS8q3JoQLL7eZhG9Mrp0ay+I4I3G9f+cYgkvYtLA/YcdJIu89xQ/ZJ+Drk4Iron 3ZMr20pHQ/8BQo5HYfpvlSu73sElyOPSXbsN9wiVVoQQLKwUYXRh6lV+o8HEDJZR9Mp7 P2/w== X-Gm-Message-State: AA+aEWZ0744MN69+DkPtXZuHdLgg24C5n1CkEfg0RojZBjpOOTf3ozml r7OVKKPMSb3wH5+3HrreZaT3QUZg X-Received: by 2002:a2e:9b84:: with SMTP id z4-v6mr8031302lji.93.1544130309269; Thu, 06 Dec 2018 13:05:09 -0800 (PST) Received: from arch.domain.name (89-70-226-70.dynamic.chello.pl. [89.70.226.70]) by smtp.gmail.com with ESMTPSA id e94sm267366lfi.23.2018.12.06.13.05.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Dec 2018 13:05:08 -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 v2 0/3] add support for Sensirion SPS30 PM sensor Date: Thu, 6 Dec 2018 22:04:40 +0100 Message-Id: <20181206210443.21052-1-tduszyns@gmail.com> X-Mailer: git-send-email 2.19.2 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 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.19.2