Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5663196imu; Wed, 30 Jan 2019 01:14:13 -0800 (PST) X-Google-Smtp-Source: ALg8bN7YcMr58mELexQDtsaL1p+nUUv+sidunI86qhyVlDDEUpPUGgf2gF+uFJSQ7c48snQdmoPh X-Received: by 2002:a62:28c9:: with SMTP id o192mr30315745pfo.57.1548839653659; Wed, 30 Jan 2019 01:14:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548839653; cv=none; d=google.com; s=arc-20160816; b=UCdpNvrr+rxLJURukgVyn0M1J+26GT3dTQf0K++B5Qj/AUhDXbvScsMj1zJvpurPMv RWOulTOSBxgBzLydd806qaNbsp4Oqb7eu+p04ww5ZFGuOXWSln5+1QmzBhdIu73vSM5n 9YsAQVP0WctFdurtqq6OydTxAVGg1EpcZU83KxmQhfQuTbu3+dBpte0pSHr3VlGdljPX yqWuxiE2TXL79gfwCQ5FKA+QmKvzubQnoieXra5b510GC0NDR8mxCwCPK7Seo/RifiTa uFOrf1jOofAyHupbpa7znoBMSItiZxhnneK34am1BjLuowSBKBMT+6rnKVRMDf3JQOcc lVGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=lqotxjbK76cv/Qj1r776CfOAYGu2nY20LaOdD9DQ39E=; b=B7itZ8cOnG6rcPYu93I9Nmv4eZkfMObVtX5B02RJrT0cq5s3Mc/lRM4jbKQ7lOeSmP bex/voErDhCGwQGxj6U2aOZXM53QafMqmfS2+DKX5RrWtPGdte/KNxGGVU4cclq0EK8N t2rJwZXpWTwTdvNvNkhUiER+1F2WP5/EsL3Yq8Hifd/g/aeurZPd3A+qClJiUganPrPi Dv4FG0BVid3iK7MTJP+ZNErA3cEhrlyvjzmQMPGTDbIV7ARh3fC/WNUe9XQJzYCgFw3K dcV6C18eUECKTo4GtOrP/7UM9/eWFOVnHtyjvEalxldIYKN1v2iIgVnJQIxBXXTv9sma 88Tg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32si983649pld.387.2019.01.30.01.13.58; Wed, 30 Jan 2019 01:14:13 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730663AbfA3JNC (ORCPT + 99 others); Wed, 30 Jan 2019 04:13:02 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:46203 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730652AbfA3JNC (ORCPT ); Wed, 30 Jan 2019 04:13:02 -0500 Received: by mail-lj1-f194.google.com with SMTP id v15-v6so19996624ljh.13; Wed, 30 Jan 2019 01:13:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=lqotxjbK76cv/Qj1r776CfOAYGu2nY20LaOdD9DQ39E=; b=PEHpX8FjqA4PecyqWrmimXtgBNmgVqVk728IGuH3Qt/LhkOdqAKzGzaVTQtbhoeCHC 5IV99ethFomnD/dlcvBT0vVMVzyIVV6Nmq3M9DEwED3eqNfcjzCTjyuN/noqXAA+Rq7W fQCe7VAZ5n/cRz3qevpOxyfvi3MyCeNoaVSy4bwQN3jr6sgeHY/F3/5kPscPJydGIsH1 fJATEXgaDPmIsx4hW7lqWL3kIPjkJBgHr7K2JSHciJLJ2+FFiVHvt8CR5cZ+v5AY7guy 1CNq6H0lbEobEv1ueVXu7FebvAJ8VtYLS47LlnQq7ZOjyB5L6BVhPWg0GgdsF1JTHUYC zWkw== X-Gm-Message-State: AJcUukePzqjWB5s4yl3jEbd6Fh00/PsXkZheVpTdPoJbF4ohEVazIBqH 9xWHsiBm3SHRFndERFnc1Ls= X-Received: by 2002:a2e:910d:: with SMTP id m13-v6mr23298512ljg.187.1548839579742; Wed, 30 Jan 2019 01:12:59 -0800 (PST) Received: from xi.terra (c-74bee655.07-184-6d6c6d4.bbcust.telenor.se. [85.230.190.116]) by smtp.gmail.com with ESMTPSA id b25-v6sm173215lji.94.2019.01.30.01.12.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Jan 2019 01:12:58 -0800 (PST) Received: from johan by xi.terra with local (Exim 4.91) (envelope-from ) id 1golvS-0000xa-Vm; Wed, 30 Jan 2019 10:12:55 +0100 Date: Wed, 30 Jan 2019 10:12:54 +0100 From: Johan Hovold To: Tomasz Duszynski Cc: Johan Hovold , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh@kernel.org, jic23@jic23.retrosnub.co.uk Subject: Re: [PATCH v2 3/3] dt-bindings: iio: chemical: pms7003: add device tree support Message-ID: <20190130091254.GN3691@localhost> References: <20190127181916.19948-1-tduszyns@gmail.com> <20190127181916.19948-4-tduszyns@gmail.com> <20190128075819.GK3691@localhost> <20190128184332.GA25627@arch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190128184332.GA25627@arch> User-Agent: Mutt/1.11.2 (2019-01-07) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 28, 2019 at 07:43:33PM +0100, Tomasz Duszynski wrote: > On Mon, Jan 28, 2019 at 08:58:19AM +0100, Johan Hovold wrote: > > On Sun, Jan 27, 2019 at 07:19:16PM +0100, Tomasz Duszynski wrote: > > > Add device tree support for Plantower PMS7003 particulate matter sensor. > > > > > > Signed-off-by: Tomasz Duszynski > > > --- > > > .../iio/chemical/plantower,pms7003.txt | 19 +++++++++++++++++++ > > > 1 file changed, 19 insertions(+) > > > create mode 100644 Documentation/devicetree/bindings/iio/chemical/plantower,pms7003.txt > > > > > > diff --git a/Documentation/devicetree/bindings/iio/chemical/plantower,pms7003.txt b/Documentation/devicetree/bindings/iio/chemical/plantower,pms7003.txt > > > new file mode 100644 > > > index 000000000000..e4c7f2fb1e30 > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/iio/chemical/plantower,pms7003.txt > > > @@ -0,0 +1,19 @@ > > > +* Plantower PMS7003 particulate matter sensor > > > + > > > +Required properties: > > > +- compatible: must be "plantower,pms7003" > > > + > > > +Optional properties: > > > +- vcc-supply: phandle to the regulator that provides power to the sensor > > > > Shouldn't this one be a required property? > > > > Driver does not use regulator framework hence to me this property fits > here better. The device tree describes hardware, not any particular driver. That said, there is a bit of an on-going debate on whether mandatory supplies (from a hardware perspective) should always be represented in device tree or not. https://lore.kernel.org/lkml/20181123133126.GF2089@sirena.org.uk/T/#u https://lore.kernel.org/lkml/20180409102244.GB11532@sirena.org.uk/T/#u https://lore.kernel.org/lkml/20180425171123.xhyoay3nu463btoq@rob-hp-laptop/T/#u > > > +- set-gpios: phandle to the GPIO connected to the SET line > > > +- reset-gpios: phandle to the GPIO connected to the RESET line > > > + > > > +Refer to serial/slave-device.txt for generic serial attached device bindings. > > > + > > > +Example: > > > + > > > +&uart0 { > > > + pms7003 { > > > > The node name should be generic and reflect the functionality rather > > than model. Perhaps "pms" will do here. > > Agree, ideally we should have a generic dt name for this kind of sensors > (something like air-pollution-sensor perhaps?). But unfortunately there isn't > anything available now so I guess compatible part name should be okay > (besides this is the type of naming commonly used in other iio bindings). What's wrong with particulate matter sensor ("pms")? Seems like a better fix than any particular model name to me at least. > > > + compatible = "plantower,pms7003"; > > > + }; > > > +}; Johan