Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp692572ybb; Sat, 28 Mar 2020 07:59:00 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtgi8L5D5VBZkTOnkZ6ejc/9FI0CQY0j8eO3BYgHT2FN+aSNMZ10ZxMx97pT28VdAwUDS6j X-Received: by 2002:a9d:17ec:: with SMTP id j99mr2870114otj.213.1585407540695; Sat, 28 Mar 2020 07:59:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585407540; cv=none; d=google.com; s=arc-20160816; b=ZI6Fav4ZrxHPlzUsMjVj4bfzRy8mkO462/VpX7IXS03hiMI/CA6+8ykkMVwczB+kX6 eGm4DFjlY25D/ToP9KCLS8jpq5kX2q5Sj4nmvYSy2j544MebnnaCkg5Czrpd1DWYnG3Y ZXsQxQ+lF6ykxjzyBTmtcn5ZZwdg+gPpDhWKrjasliPRd5O4Rkmbyy1U/gfOiz02L4sW 1lSBAs2254K/sGkxj2I7sMtla74WaPPUeO5TfyHzqnTAqc1n2l3C1PKFu78WQxnYm32F NiXo6UkbHMoJIsk+3W1L2FsXXF23AN/2xRf2VuFxUQMvqB4R8aLwLkgeTGBr4PdMJPqT PRxQ== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=UJ2NEVbehgssFNn+YfarYKJL70RIcc3mURnYBDNZ0X4=; b=zIyyhvnH3LBKya1z6UyVhIe73slsLugru8H74ymvX0yeRWpihqK0N5yQUVOPir11BM 2ggmvMKwsAa4FmIQZdLSzW31zZDSYsdNF4zcEDx4k+adL1w/G3ZHbBxpd2GzzF1KvhM3 jBC9/Cg1gU3vFOfetORzcBmykRDG5mAfzWf2UiUSiZJxOXHyq6iSHB5ATwNEEL9xo8kV dIDMNf4bX8YyXLSiP9bVuTxf3xQA9abWNCtEOlUVg44zVGe7SNZInVzqmf9R8O12hNSG tfv5n5zRYjkYDNaDnto9xDTynpCx5yqTNB4vdolec4imOK/+hWeoV/J4QZyeAESBtoXv StOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OLbqOcpr; 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=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 z126si3653016oia.187.2020.03.28.07.58.35; Sat, 28 Mar 2020 07:59:00 -0700 (PDT) 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=@kernel.org header.s=default header.b=OLbqOcpr; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726937AbgC1Ozj (ORCPT + 99 others); Sat, 28 Mar 2020 10:55:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:57124 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726463AbgC1Ozj (ORCPT ); Sat, 28 Mar 2020 10:55:39 -0400 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 672F3206F2; Sat, 28 Mar 2020 14:55:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585407338; bh=sTN/yOwC7X0uLoNfJ9ADxa7Cha6qzKRX2MNvBqrW41M=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=OLbqOcprrVgGuO5bodcCM4BQ/l6Al3r3Ww9tqVljQ+YOVriGez5jmY1ilVGbU2RI5 MChEZD5Ex6p5UEOCJnpXSy5lxMIhODy/AjtkuYZUqKSGeRKbL3lIcZMxkM+9QwpTWp JAFwjKLwtTg54ZMiipEWS13nL6qBWSgBuz5DeViE= Date: Sat, 28 Mar 2020 14:55:33 +0000 From: Jonathan Cameron To: Ivan Mikhaylov Cc: Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , , , , Mark Rutland , Rob Herring , Andy Shevchenko Subject: Re: [PATCH v4 1/2] iio: proximity: provide device tree binding document Message-ID: <20200328145533.35f77e48@archlinux> In-Reply-To: <20200327104954.27829-2-i.mikhaylov@yadro.com> References: <20200327104954.27829-1-i.mikhaylov@yadro.com> <20200327104954.27829-2-i.mikhaylov@yadro.com> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 27 Mar 2020 13:49:53 +0300 Ivan Mikhaylov wrote: > Mostly standard i2c driver with some additional led-current option > for vcnl3020. > > Signed-off-by: Ivan Mikhaylov A few things inline. Thanks, Jonathan > --- > .../bindings/iio/proximity/vcnl3020.yaml | 52 +++++++++++++++++++ > 1 file changed, 52 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iio/proximity/vcnl3020.yaml > > diff --git a/Documentation/devicetree/bindings/iio/proximity/vcnl3020.yaml b/Documentation/devicetree/bindings/iio/proximity/vcnl3020.yaml > new file mode 100644 > index 000000000000..116aa0e0174d > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/proximity/vcnl3020.yaml > @@ -0,0 +1,52 @@ > +# SPDX-License-Identifier: GPL-2.0 > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iio/proximity/vcnl3020.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Integrated Proximity Sensor With Infrared Emitter > + > +maintainers: > + - Ivan Mikhaylov > + > +description: | > + The VCNL3020 is a fully integrated proximity sensor. Fully integrated means > + that the infrared emitter is included in the package. It has 16-bit > + resolution. It includes a signal processing IC and features standard I2C > + communication interface. It features an interrupt function. > + > + Specifications about the devices can be found at: > + https://www.vishay.com/docs/84150/vcnl3020.pdf > + > +properties: > + compatible: > + enum: > + - vishay,vcnl3020 > + > + reg: > + maxItems: 1 > + > + led-current: > + description: Given it has real values, that would be human readable, lets use them! Also I don't think this is a standard binding so also need a vendor prefix. vishay,led-current-microamp taking 0, 10, 20, 30 etc.. Threat it as an enum with all the values listed and we can also enforce that it is a valid value via the binding. > + IR LED current value with valid Range = 0 to 20d. e.g. 0 = 0 mA, > + 1 = 10 mA, 20 = 200 mA (2 = 20 mA = DEFAULT). LED Current is > + limited to 200 mA for values higher than decimal 20. > + > +required: > + - compatible > + - reg > + - led-current You list a default above so is it required? > + > +examples: > + - | > + i2c { > + > + #address-cells = <1>; > + #size-cells = <0>; > + > + iio-proximity@13 { just proximity. IIO is a linux concept, devicetree is general. > + compatible = "vishay,vcnl3020"; > + reg = <0x13>; > + led-current = <0x14>; > + }; > + };