Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp871208imj; Sat, 9 Feb 2019 09:37:47 -0800 (PST) X-Google-Smtp-Source: AHgI3IYHR4BD43rEy8jwNjfqINJDeyzQZwpG4Tt1HI+CvkA8x3w+4yPER1mMArzon3wv7VR91cEL X-Received: by 2002:a63:e20a:: with SMTP id q10mr1875601pgh.206.1549733867820; Sat, 09 Feb 2019 09:37:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549733867; cv=none; d=google.com; s=arc-20160816; b=nJKhUXoyvVXCaXGT5wa8wHxiPjDMjPUUljl3a+/PcrtXYOXTH0LzLoWQ7Ecit2Ddoz /RDLAX/gwXpUuY0BEGpYF344w69IGl7LhqaHHsySWmJiScXqq1TtGwK/Gy6kCBosA5/Z HSCwM45T0gH3eNLyHgBb7zIWdsPt6tNa7ODNEV93QjnrXbAOppFliX6I5ONV3hxMYqUZ hmS1xqSUE46XJgTMjY+JkY+DrcKtXnUkEdtU6iFIu25R34yGiwly7z5YC2Cn9fVoblb/ zMbGE8jTtW01IRYIFdGwF2T9GzLK9KSgB2ZiEYrsiJCXzS/NfMWKk0d1sCluD24ro6a3 +ORg== 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=14SHX6gOpkpcYinVjnT6VYgcZFI4T3ul/sfiG/oKpuI=; b=cZ7ORb4iOfzk8c3VaDX3Im2cLxgjED0uREiUOQQdyKwEgLCMd4Dbksy8Uqwptd4beR bxCwjLmWfgZunOp5l+mTDf//+brGJ+DpI3xlK33pL3DjulJdGEHCmaE1rWmHFcB8p0+M M8EoYWvzVuOEiyORuA3isBZQI2dZoDCSbYdkJjhqFBjjG0aA06wPfT/DGeje3LJcNH+j LeK6WhKmSIlNmcivGzvoXxg6dAmUIWHc8KbelCNA9MXaDMnkioSb0WW+wnhorI9Wz+YW BwjamEPma51Wca3L6p8aGkpiN5OUl6oIZfTzL0xuOI1+D1rIm1R/lJmCkE0kPM3ISYlG sGkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=l5o2YCiY; 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 y27si5428604pga.459.2019.02.09.09.37.32; Sat, 09 Feb 2019 09:37:47 -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=l5o2YCiY; 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 S1728012AbfBIRgm (ORCPT + 99 others); Sat, 9 Feb 2019 12:36:42 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:35605 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728000AbfBIRgl (ORCPT ); Sat, 9 Feb 2019 12:36:41 -0500 Received: by mail-lj1-f195.google.com with SMTP id j13-v6so5607916ljc.2; Sat, 09 Feb 2019 09:36:39 -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=14SHX6gOpkpcYinVjnT6VYgcZFI4T3ul/sfiG/oKpuI=; b=l5o2YCiYUtZfB6vKWJ8J+QjlkMOw08lWO+YTIeHWFXKHtrSl5lGLZICUHn+U3v+maQ X03b5Y76/KBfTJC6L924YEO6XvLVRfareSzTQ7yBtkSkEWirg0fGYASeYdoYs8gPNw6y RAIv8kRuRSxwt9lkxzvT98SkWaScGNevfsDtnYi+RnYiLF63j/BQai1WKHOYdErMuaYy YAltd6iuZE4C3G01CizUqnO9SwZPQTc5dK/WoP8UGIO7MO1kXliLjB1wVkyq2NioGyP8 EK1WmbREs8K51Q5xplDjr4R/XMd8hhSBFBuheJhgCQuRaFrdpGxHDDpv7bt6F3yeqON/ yIag== 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=14SHX6gOpkpcYinVjnT6VYgcZFI4T3ul/sfiG/oKpuI=; b=bZ0GokelSTSUnF+LGDO5B+k/r5zRUvM2FsPV9EDq8SBbwVVNxbjlq6LuWhzpRVP65a 5Cj2IgE500wn9TE2bXFVI7U5OuhmMW/XGfHQPRWmHEqyWYzakMOJS19a3YRexn5Awg8C mglyb8tYAe3Mm2hRAVcWxPlwRUTjXjZuvoTZhUmEYnjJV9aa/X3iD2cmTMxGrK9+pSMl SvPwg9bX9w5T1xpggaO8owR06MUWDlDNAEHQaGv96ZxCI1qU4KPcVXaDYQlOUbEXiF+r 4fvm/WF5s03yUUKi1qKiR7gnMOgSCBgomt6aM4yKLtNK6ojyb43FGxAraatYwpWD1Ty4 QEfw== X-Gm-Message-State: AHQUAuYhAkpyBhVt33BFYXpNZEFUtT3TmaGXgFOPNndRlbmHBBFIW4Lz PTwR9SRS/B8A0PBsACxGf+CTg0xhen0= X-Received: by 2002:a2e:9706:: with SMTP id r6-v6mr14114510lji.171.1549733798613; Sat, 09 Feb 2019 09:36:38 -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 n12-v6sm1080508ljj.32.2019.02.09.09.36.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 Feb 2019 09:36:37 -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, pmeerw@pmeerw.net, johan@kernel.org, Tomasz Duszynski Subject: [PATCH v4 0/3] add support for PMS7003 PM sensor Date: Sat, 9 Feb 2019 18:36:06 +0100 Message-Id: <20190209173609.13220-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 v4: * add vendor prefix to set-gpios property v3: * fix whitespaces * drop unused printk format specifier * make vcc-supply mandatory in dt binding * use a generic node name (air-pollution-sensor) instead of a sensor model 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 | 20 ++ .../devicetree/bindings/vendor-prefixes.txt | 1 + drivers/iio/chemical/Kconfig | 10 + drivers/iio/chemical/Makefile | 1 + drivers/iio/chemical/pms7003.c | 340 ++++++++++++++++++ 5 files changed, 372 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/chemical/plantower,pms7003.txt create mode 100644 drivers/iio/chemical/pms7003.c -- 2.20.1