Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2677043imu; Sun, 27 Jan 2019 10:20:13 -0800 (PST) X-Google-Smtp-Source: ALg8bN6XSCjvaSWg9GLS9d0huH6wWs02BQHkxOfgJUDUPwKGKPyW2TB4XNnysrjbTBG1mAhOBG/v X-Received: by 2002:a63:4246:: with SMTP id p67mr17004600pga.335.1548613213031; Sun, 27 Jan 2019 10:20:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548613213; cv=none; d=google.com; s=arc-20160816; b=CphcCkwwbhDPl7pxbS5YtAE1vgv8BG0VVrGx+LwNb81kb/H+mTDQYz2tLTQS++2C3+ c/uH3kBfzDrz3Tjw36y8CqUn86CXphqBfGSsi1cr5RLVuH/zKj1rNfoYwcZmWN0VaMYa 36RGJnSmEgSniLmp4QBWzD5NLnQwSLwaWo0DpCRUwu38eOhi9phymoBMm8Dti3nrd790 tXRmz2qVJwJMLHS09eB1yRE4H4AGbbaZMOgycMpDlspUN/ZW8hgusr//I7pBIw0OUVBJ MPmCwTNkLzHwuDN6DPvLrJzirQWEsSqKjR0RTQ6zsgKKkIJSdY8tQi1cUvSCfJjyPF/E QW9A== 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=y7Xb4yPG85jlMuLRU3473tCMgZkpOw6XFjvHhmT4K6g=; b=S2JmlxQqrgwmlSTFz0MNJwMVR2NaH/maOhRY4GVetCW926qOfARSdF+qBH6rI1WKXm JLN2Pl/VtI92rZ60lObgw9MouQNYfCe+Pp8m44RZXS2ig9aTXjrBPoJSyfen7D3AhCT2 SsOEtc6DA37r8EmC7XM06U76vNx406HyXEndSVZonNi1jdf5waRh5Eb8P6k7GKykB8El 9EfjCeZ+8zqIPoTyNqkJvz+4mThFEyg2BBfudeWY75wbAk9YFvEyDItWK3BrZPBM8bUb tZh/RyxAKV1cePXBZXUD0onLg8rqqK1nJwzHyOt7ZIuShdVaWx/vw1lxzMirUGmySR3q C5sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Enkv7g6h; 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 p14si29512383pfi.12.2019.01.27.10.19.57; Sun, 27 Jan 2019 10:20:12 -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=Enkv7g6h; 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 S1726954AbfA0STr (ORCPT + 99 others); Sun, 27 Jan 2019 13:19:47 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:38734 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725941AbfA0STr (ORCPT ); Sun, 27 Jan 2019 13:19:47 -0500 Received: by mail-lf1-f66.google.com with SMTP id a8so10235229lfk.5; Sun, 27 Jan 2019 10:19:46 -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=y7Xb4yPG85jlMuLRU3473tCMgZkpOw6XFjvHhmT4K6g=; b=Enkv7g6hct8AR9cQSRKoF5eXIiFra6+okK/L7hQjsXr/U6t4bdOrO0nA7GLVOoQmMB taBg+1w11XNFp6zOrPd/6be82FLguLgGhHVGEoQQSgrCKdoCBDRXyi/KFa6NDXkE6psz ik5cmS8Hl60ErEu/WGpf3OKXMBFM91JDF6fBiQSt+SvxgmdTymwZVEafssUGjNFm2cu3 PbpPiZxWp/lbU4bHDwV1zgfpWxQCAadk4Mx8YuZKDah6sgorFK20kWRDsoTwq1Ox9N89 OAvaKqdPZ7Bwaeg+UE3qtJNYeytoKPuqqLexNhPIDLJqXD6ZsKMxmp2zkFJn2YGP8saA EwgQ== 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=y7Xb4yPG85jlMuLRU3473tCMgZkpOw6XFjvHhmT4K6g=; b=R3BZp1hgunELDspOA2DTG+pN/2z2qtEaZav1Np59riZOjWgYY+3XYFw1svHV9apIYd NKkCpBqSNNi9LBKuOPMM3Qp9hjAQ0C/bu3WNHJWeOMK064W1sdv+MzSOrwP+EVNFl/Sz sG/PXqD5LFD4i8HgkXv5hqdbbV7uakP2fkblFVIQOkKAEoccLx0hPEbZC4IjswDFXQxt xOYC4Ec6c10mKAMegCsghLHfOvtZECaHL5vkqrU0qun/KSg0uncFnB7WtCOJ6WxQ2qOs ko+dli5GeGNZcUGQa48S8fWhxaRbNYUp6JOu4e9L4ck0ieN3jWo6OUlAB1IPBkqbwH2w RXUg== X-Gm-Message-State: AJcUukeL4gAXgH/GeS1Xz89cz6XzdLCAlEoS4JFxl00ss6LWsyMR4MxQ p5PlH3PRNgM+IAAjj9cG9QlPeky9eZQ= X-Received: by 2002:a19:8c1b:: with SMTP id o27mr13745265lfd.90.1548613185062; Sun, 27 Jan 2019 10:19:45 -0800 (PST) Received: from arch.domain.name (89-70-37-207.dynamic.chello.pl. [89.70.37.207]) by smtp.gmail.com with ESMTPSA id c20sm2518923lfj.67.2019.01.27.10.19.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 27 Jan 2019 10:19:44 -0800 (PST) From: Tomasz Duszynski To: linux-iio@vger.kernel.org Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, johan@kernel.org, robh@kernel.org, jic23@jic23.retrosnub.co.uk, Tomasz Duszynski Subject: [PATCH v2 0/3] add support for PMS7003 PM sensor Date: Sun, 27 Jan 2019 19:19:13 +0100 Message-Id: <20190127181916.19948-1-tduszyns@gmail.com> X-Mailer: git-send-email 2.20.1 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 Plantower PMS7003 PM matter sensor. Unfortunately datasheet is not available for download from the Plantower website so one needs to find it elsewhere, for instance here: https://download.kamami.com/p564008-p564008-PMS7003%20series%20data%20manua_English_V2.5.pdf v2: * check number of bytes returned from serdev_device_write() (due to changes in linux 5.0 serdev api) * add missing pins descriptions to the driver binding * keep commands in the lookup table * buffer data and process everything in one go instead of using state machine * keep pm offset in channel address to simplify reading measurements Tomasz Duszynski (3): iio: chemical: add support for Plantower PMS7003 sensor dt-bindings: add Plantower to the vendor prefixes dt-bindings: iio: chemical: pms7003: add device tree support .../iio/chemical/plantower,pms7003.txt | 19 + .../devicetree/bindings/vendor-prefixes.txt | 1 + drivers/iio/chemical/Kconfig | 10 + drivers/iio/chemical/Makefile | 1 + drivers/iio/chemical/pms7003.c | 343 ++++++++++++++++++ 5 files changed, 374 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/chemical/plantower,pms7003.txt create mode 100644 drivers/iio/chemical/pms7003.c -- 2.20.1