Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp739230yba; Wed, 24 Apr 2019 08:50:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqwZoKDLW4te1qccfzKUnC3NEcsc3W9p/FXcYVGX1vreJA/kUnRfeQjlenY5xvQ+cdqOAfgw X-Received: by 2002:a63:374b:: with SMTP id g11mr31699016pgn.421.1556121009606; Wed, 24 Apr 2019 08:50:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556121009; cv=none; d=google.com; s=arc-20160816; b=CCiSI3c6FV/dncpu/WKdb0gNK7FumxdnN2HFcJVzw7WssvKAi4NPNzsNmGBe50UO3N mqWltMwnqbtwB+DkuxGFVnQJ/sI4ljczbviHQrTrEjmVqmtZWBuZBwPBaqmwfDPduTtf M6jWWw6YWWHvlT3RM1JJ7sdm22swgiZHIXyQSJDygEnBn0F1m1yGrEE4e1iHuqZZ2hok NKZyKfZzkdZxwZ077kAlyOsqUTXUegizIFWu6+pgzGVD15d5H7FfccR1z4FtCyNNuEGw DmUS5REVGNc833SBJqClxUe8X8S/5Q4KJ3DT9uuqjfT8oh9dGdO2tihGnzq/AGtjiHs8 2vEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=wX+dgCiRMJcGnU8+keaxJFE51npC2Rv0qYMTd5JeK2Q=; b=pheWj4hcBctnOlBepWZAVesE00N8gaQMa4bF1ihKC8mN/8+6lPLZChHR5ioPGpTaH2 CzuU+tncHKiGvUmW0wzHn+Mz7Gw1Dts5/GsU7QrTRuUSWIfx6oZ6vgbcqwZshP315G3g CbK4uznFEE0E8z2fP6/BIPzjNRwPSm3NpStDt7CFiHm6UDpe70EqEMQju6q+mtRDW6Sw wdG64wkVeM9M7SzCqHDVMdx/R1wBt/gcwKq3LPzhGYOi33K3TsjlE72sLm3exsnl0emA 7kI4bbWR+rsdfKvOVBBzs4y9AL6r/VmkcmDhrVpDcxLmxVM6GeHN0KbLjVyo5GRIrGS4 GuSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SpxLD8y7; 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 f20si19397620pfd.51.2019.04.24.08.49.53; Wed, 24 Apr 2019 08:50:09 -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=SpxLD8y7; 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 S1731772AbfDXPsC (ORCPT + 99 others); Wed, 24 Apr 2019 11:48:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:54638 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731094AbfDXPsC (ORCPT ); Wed, 24 Apr 2019 11:48:02 -0400 Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CC28421902; Wed, 24 Apr 2019 15:48:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556120880; bh=Lz8P2pOdqkylqA6PefAVJPK5SZUmgNH17yrLVKVRv4s=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=SpxLD8y7LfGADw2qFaeTZJlvIWl04jms/EgL8YSO9nriV1l7pM/IiqXwjCEolIaUv Ah8v1insv0ndMGfuMPY8otbW0+mwBkAS++aoXvu1edu3DtRkhClI4LA48WxCYB3nG9 ZYEePK+1lDYTAba2rNDjgpp+KjBOEWlEG8LpGBXw= Received: by mail-qt1-f173.google.com with SMTP id l17so1652231qtp.2; Wed, 24 Apr 2019 08:48:00 -0700 (PDT) X-Gm-Message-State: APjAAAVHJYL8eE6N8gF+SWgh0WtBGBTbM5D7k/BLMq6HNdwPN6qNXBKx BtcgiWhdDFpsppNCV+C3d8jxbMffCY3YX5+MjQ== X-Received: by 2002:ac8:74d6:: with SMTP id j22mr6572824qtr.144.1556120880023; Wed, 24 Apr 2019 08:48:00 -0700 (PDT) MIME-Version: 1.0 References: <20190424092238.6381-1-masneyb@onstation.org> In-Reply-To: <20190424092238.6381-1-masneyb@onstation.org> From: Rob Herring Date: Wed, 24 Apr 2019 10:47:48 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 1/2] dt-bindings: iio: tsl2772: convert bindings to YAML format To: Brian Masney Cc: Jonathan Cameron , Lars-Peter Clausen , Peter Meerwald , Mark Rutland , "open list:IIO SUBSYSTEM AND DRIVERS" , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 24, 2019 at 4:22 AM Brian Masney wrote: > > Convert the tsl2772 device tree bindings to the new YAML format. > > Signed-off-by: Brian Masney > --- > Changes since v1: > - Dropped description from reg and interrupts properties. > - Dropped $ref from led-max-microamp, vdd-supply, and vddio-supply. > - Changed 'tsl2772@39' in example to 'proximity-sensor@39' > > .../devicetree/bindings/iio/light/tsl2772.txt | 42 ---------- > .../bindings/iio/light/tsl2772.yaml | 80 +++++++++++++++++++ > 2 files changed, 80 insertions(+), 42 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/iio/light/tsl2772.txt > create mode 100644 Documentation/devicetree/bindings/iio/light/tsl2772.yaml > > diff --git a/Documentation/devicetree/bindings/iio/light/tsl2772.txt b/Documentation/devicetree/bindings/iio/light/tsl2772.txt > deleted file mode 100644 > index 1c5e6f17a1df..000000000000 > --- a/Documentation/devicetree/bindings/iio/light/tsl2772.txt > +++ /dev/null > @@ -1,42 +0,0 @@ > -* AMS/TAOS ALS and proximity sensor > - > -Required properties: > - > - - compatible: Should be one of > - "amstaos,tsl2571" > - "amstaos,tsl2671" > - "amstaos,tmd2671" > - "amstaos,tsl2771" > - "amstaos,tmd2771" > - "amstaos,tsl2572" > - "amstaos,tsl2672" > - "amstaos,tmd2672" > - "amstaos,tsl2772" > - "amstaos,tmd2772" > - "avago,apds9930" > - - reg: the I2C address of the device > - > -Optional properties: > - > - - amstaos,proximity-diodes - proximity diodes to enable. <0>, <1>, or <0 1> > - are the only valid values. > - - led-max-microamp - current for the proximity LED. Must be 100000, 50000, > - 25000, or 13000. > - - vdd-supply: phandle to the regulator that provides power to the sensor. > - - vddio-supply: phandle to the regulator that provides power to the bus. > - - interrupts: the sole interrupt generated by the device > - > - Refer to interrupt-controller/interrupts.txt for generic interrupt client > - node bindings. > - > -Example: > - > -tsl2772@39 { > - compatible = "amstaos,tsl2772"; > - reg = <0x39>; > - interrupts-extended = <&msmgpio 61 IRQ_TYPE_EDGE_FALLING>; > - vdd-supply = <&pm8941_l17>; > - vddio-supply = <&pm8941_lvs1>; > - amstaos,proximity-diodes = <0>; > - led-max-microamp = <100000>; > -}; > diff --git a/Documentation/devicetree/bindings/iio/light/tsl2772.yaml b/Documentation/devicetree/bindings/iio/light/tsl2772.yaml > new file mode 100644 > index 000000000000..2ebc8d727f09 > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/light/tsl2772.yaml > @@ -0,0 +1,80 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iio/light/tsl2772.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: AMS/TAOS Ambient Light Sensor (ALS) and Proximity Detector > + > +maintainers: > + - Brian Masney > + > +description: | > + Ambient light sensing and proximity detection with an i2c interface. > + https://ams.com/documents/20143/36005/TSL2772_DS000181_2-00.pdf > + > +properties: > + compatible: > + enum: > + - amstaos,tsl2571 > + - amstaos,tsl2671 > + - amstaos,tmd2671 > + - amstaos,tsl2771 > + - amstaos,tmd2771 > + - amstaos,tsl2572 > + - amstaos,tsl2672 > + - amstaos,tmd2672 > + - amstaos,tsl2772 > + - amstaos,tmd2772 > + - avago,apds9930 > + > + reg: > + maxItems: 1 > + > + amstaos,proximity-diodes: > + description: Proximity diodes to enable > + allOf: > + - $ref: /schemas/types.yaml#/definitions/uint32-array > + - minItems: 1 > + maxItems: 2 > + items: > + minimum: 0 > + maximum: 1 > + > + interrupts: > + maxItems: 1 > + > + led-max-microamp: > + description: Current for the proximity LED > + allOf: No need for the allOf here with only one entry. > + - enum: [13000, 25000, 50000, 100000]