Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp356263yba; Wed, 24 Apr 2019 02:24:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqwsRn696BrZggoAB/5/H+Q2ei4wExe8DIVFx3ZZIrnrFQ0LstNZdCbfLhm9WHB87J0jTIvE X-Received: by 2002:a17:902:b407:: with SMTP id x7mr31989748plr.288.1556097858582; Wed, 24 Apr 2019 02:24:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556097858; cv=none; d=google.com; s=arc-20160816; b=uizA2dcSBS5gyY1NfVhEVD3UabkJ0gJHY/Oh9HTZtXsjZojloLwYPuTKNYZH2kSlUB v+I9s7a4ONAE1yJiNjkTr3A184wPaTxwNP7KDNPKFJ2IWT2efn2hNvzO9720OCtIF6aB K2/bGDDh9gIzpVv4jC5WGqZ4pRqBZAhzpT64QwQzNE0J2FaMOgefXZCcu1b7YYRgH7Jn qruglO4FDTKJPV9GCWvzooNTFrPgl25zyE8zon5YPN+QrT2rX9UMRs9Ly5wDs32eEDGt sWdWXkOG5URQukW6wdIml3JL94m7YcOWZM2BpVFHvZxb7UmTHit/O3UUtXZLkKuRKTaH iwYg== 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=Nk0pv1H1XNxU3KuDm2i/Hx/LirG2jH07oMTskc62e6E=; b=GGd08fTJU8aRmTCUiTXxxGvxzC3fXnuuEcpZN33yltWe5c1wA3E3ZZPk3W6/Hq+OIH fLcujG8zXnp5WHdFiuh9NfboiT8mKWB20wdqsgz1qcJhZSM2Wco67vOY1QCusw9qW36q MZdZmqeFAtkllMxF2IRqOaPdz5F++ZKifzw4kLJjeA9/8mOLiyhaxwWuEiuPvurA90IL eRoivMRGJKLxbfmlTZz44Is4whD99DXhzNf7ps6zmeFw6wviyEcZq4Xn5uReDsUnPsoY ukLD1t+E6ynJfKjmPvrzCMTpnjCQTqSQc+OzKgjRXAeMseI50w3T17yNqOPEJn5KsJpG /9Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@onstation.org header.s=default header.b=nNB7FerG; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r184si17293913pgr.24.2019.04.24.02.24.03; Wed, 24 Apr 2019 02:24:18 -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 (test mode) header.i=@onstation.org header.s=default header.b=nNB7FerG; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727960AbfDXJWq (ORCPT + 99 others); Wed, 24 Apr 2019 05:22:46 -0400 Received: from onstation.org ([52.200.56.107]:38194 "EHLO onstation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726451AbfDXJWq (ORCPT ); Wed, 24 Apr 2019 05:22:46 -0400 Received: from localhost.localdomain (c-98-239-145-235.hsd1.wv.comcast.net [98.239.145.235]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: masneyb) by onstation.org (Postfix) with ESMTPSA id B88913EE68; Wed, 24 Apr 2019 09:22:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=onstation.org; s=default; t=1556097765; bh=MriOHkE2SHiGikJJbiFQlSS7pHsZcIgtj9Evnmc1YqM=; h=From:To:Cc:Subject:Date:From; b=nNB7FerGv5bh5/MAi3VXdzoQ/6V34g5iYldpN+uJ/71kfDyAJk5t/jmAcvU7pdaRB +CwbbIlx+RprKQqoeVnP5KT+2kmbBVnyi2Whl/zhVufDBCZA+v+FKuhgtmtbjJCd6t DSpXPhGgqIW5gc+rbA2ZLyAkbLO3a5hsRNgDOW3Q= From: Brian Masney To: jic23@kernel.org, robh+dt@kernel.org Cc: lars@metafoo.de, pmeerw@pmeerw.net, mark.rutland@arm.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] dt-bindings: iio: tsl2772: convert bindings to YAML format Date: Wed, 24 Apr 2019 05:22:37 -0400 Message-Id: <20190424092238.6381-1-masneyb@onstation.org> 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 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: + - enum: [13000, 25000, 50000, 100000] + + vdd-supply: + description: Regulator that provides power to the sensor + + vddio-supply: + description: Regulator that provides power to the bus + +required: + - compatible + - reg + +examples: + - | + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + proximity-sensor@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>; + }; + }; +... -- 2.20.1