From patchwork Thu Apr 21 14:01:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shreeya Patel X-Patchwork-Id: 12821685 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4F76DC433EF for ; Thu, 21 Apr 2022 14:03:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387918AbiDUOGP (ORCPT ); Thu, 21 Apr 2022 10:06:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1387094AbiDUOGN (ORCPT ); Thu, 21 Apr 2022 10:06:13 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A08D63B54C; Thu, 21 Apr 2022 07:03:05 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: shreeya) with ESMTPSA id CC8D81F45A49 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1650549776; bh=KobM/YFW6qteihzgQdGfGwxjmqXEnE6MKH2uFqLZGwM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E9dM1kX+AH8Lm+1VoU/JwvMvyv/43aRbTsEa3rmcMoMbNLkHpsFR/GHzto4acWYOF c4uB4iqq4KaF+u/uN68AkwSUvs1lY8OpV/go3rfkNP87vuJsdJeVFbRJ7YSlApMc2M 9u3Zv94nLhAr2HgLUJfzFnk3XfiJhOBc9xkItX5yYObE5LmKMki4q/CT9+1bymk0YP eY89JuYMIagA6do3njYZR3seXw7KO3LwsTw6stndZJw50iupK5GvGenZ2DHryYsmyw f7DLCm6oXp5gfxQk1D+66wTmZsEpnmvKGwHOqrGzzD2uV/oJu4VBRtxN6/l/5gFGHH X0r+o8EbaRNng== From: Shreeya Patel To: jic23@kernel.org, lars@metafoo.de, robh+dt@kernel.org, Zhigang.Shi@liteon.com, krzk@kernel.org, krisman@collabora.com Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com, alvaro.soliverez@collabora.com, Shreeya Patel Subject: [PATCH v2 2/3] dt-bindings: Document ltrf216a light sensor bindings Date: Thu, 21 Apr 2022 19:31:32 +0530 Message-Id: <20220421140133.354498-3-shreeya.patel@collabora.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220421140133.354498-1-shreeya.patel@collabora.com> References: <20220421140133.354498-1-shreeya.patel@collabora.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Add devicetree bindings for ltrf216a ambient light sensor. Signed-off-by: Shreeya Patel Reviewed-by: Krzysztof Kozlowski --- Changes in v2 - Take over the maintainership for the bindings - Add interrupt and power supply property in DT bindings .../bindings/iio/light/liteon,ltrf216a.yaml | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/light/liteon,ltrf216a.yaml diff --git a/Documentation/devicetree/bindings/iio/light/liteon,ltrf216a.yaml b/Documentation/devicetree/bindings/iio/light/liteon,ltrf216a.yaml new file mode 100644 index 000000000000..61008bcc6b88 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/light/liteon,ltrf216a.yaml @@ -0,0 +1,52 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/light/liteon,ltrf216a.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: LTRF216A Ambient Light Sensor + +maintainers: + - Shreeya Patel + +description: | + Ambient light sensing with an i2c interface. + +properties: + compatible: + oneOf: + - const: liteon,ltrf216a + - const: ltr,ltrf216a + deprecated: true + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + vdd-supply: + description: Regulator that provides power to the sensor. + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + + i2c { + + #address-cells = <1>; + #size-cells = <0>; + + light-sensor@53 { + compatible = "liteon,ltrf216a"; + reg = <0x53>; + vdd-supply = <&vdd_regulator>; + interrupt-parent = <&gpio0>; + interrupts = <5 IRQ_TYPE_LEVEL_LOW>; + }; + };