From patchwork Tue Jul 18 12:30:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Waqar Hameed X-Patchwork-Id: 121995 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp1725982vqt; Tue, 18 Jul 2023 06:02:26 -0700 (PDT) X-Google-Smtp-Source: APBJJlFlVqGZjRL41OkJ9shpTfqCkAN1fpqfE1Q8IAubTRqLdSVFsb+a1rK//5uO/cInek3aqdiK X-Received: by 2002:a17:903:32c9:b0:1b5:5162:53bd with SMTP id i9-20020a17090332c900b001b5516253bdmr17440632plr.33.1689685346160; Tue, 18 Jul 2023 06:02:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689685346; cv=none; d=google.com; s=arc-20160816; b=XhW6NB1DVVfWqakIMYwNnvXd+FTb9OZNsZWwzF5+KoTVI0Dw4bqo356vAKgBz+e42Q Kg8kgFOKoGR2XmX4NyOZ1LX79DPX8ZlpQptjxjSJEHLxLFI5yymL5kh32ZPczv0gE2vx yi5eug23l7qCZi0/VMrRsDFlkXULx1lhRs9bvJDvHzXRQ26TuI9Y3vl435upI7/ueaFA JA9OSn1Uhbv9O6WX/xEfarGWpt2FZ9lHokDYZchUg68nJY3edzRFftHuqVUtEqX2/HWf YcB8oyRoRuWsmhDopPkbEdX9Ts5QaOspah9ywZaXchvvnUcz0Hh+GY3iOtHQZ2KLmeFU dUig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:in-reply-to:subject :cc:to:from:user-agent:references:dkim-signature; bh=sGKc3f9aEi49syc8A8ZbaYt31rq0mocNyOVaPh8IHJY=; fh=1r5uxeNWeyLofALjZLvyUdh7Op2Q1tBQj7UeKMpzdN0=; b=TqmNRKpsNifys6n+gqDbr9WOCP5GWBecxS52jOy1rjj67KnUdxpevYgaP9Ow3IBVZv FaMfBGAsb/HFZ9Ep6E6X+pnNMkAteXW1lyMe3yJ4YEAmpKcYHvugzzGPs6X413NPBeau ELN7wyoTm1X0IWBuBphR82CC6ZzXizzsE69Txu5oeTjWEelVNq93ta238yjT0G4GcCaE e6BoacTaYBFx/GyXW+75pzLNPdF9so0V6wGhO75ESphqsrxlJVMZJVHX/YHKvxq66o60 dkiS6MdY8EN8wWPvg0PxdFfb3ta7SBAJxyh7Wgd3lqA3vXutD1Zpo/A9JR2eLdFbUbOJ tfQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=cwf4DxQd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lg14-20020a170902fb8e00b001b9e1d5eb1dsi1563868plb.279.2023.07.18.06.02.04; Tue, 18 Jul 2023 06:02:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=cwf4DxQd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231821AbjGRMcd (ORCPT + 99 others); Tue, 18 Jul 2023 08:32:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231767AbjGRMcb (ORCPT ); Tue, 18 Jul 2023 08:32:31 -0400 Received: from smtp2.axis.com (smtp2.axis.com [195.60.68.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B971B10F3; Tue, 18 Jul 2023 05:32:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1689683544; x=1721219544; h=references:from:to:cc:subject:in-reply-to:date: message-id:mime-version; bh=sGKc3f9aEi49syc8A8ZbaYt31rq0mocNyOVaPh8IHJY=; b=cwf4DxQdq2tEpsJ60/15DkvmS+SI3nWfgt8efspret1Ry+/1CMjqY/Lq C29xXdJJweOA8IzGQa60ql0BvR/+ViXoTPp056irzehQRHlXZ8HowJcl2 a3KmHBy00Bgy8Stf4sIV4KfsKLqYXOw6l0LtYA4a61vsuQps5I7rh6Xxz 3nbPFDZthB7zctF7dOuBkJAUvfp+Vfp4yS2bpF9mwLqWTTXsJV8WHZ571 muo+0ayx9Vvk3ew7Ex3cVZGzD2ZWjpEt6+zTwlYubba07Yk3Jl/6cqWxJ Okv6L97uvBaUUGSr8Dl5Lhuou/FHUlx7A6rXSIzmCs6o1HDL+gxL73s66 A==; References: User-agent: a.out From: Waqar Hameed To: Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: , , , Subject: [PATCH v3 1/3] dt-bindings: iio: proximity: Add Murata IRS-D200 In-Reply-To: Date: Tue, 18 Jul 2023 14:30:11 +0200 Message-ID: <09975910ea638a9aa893411124bbd2a5c98e45c3.1689683411.git.waqar.hameed@axis.com> MIME-Version: 1.0 X-Originating-IP: [10.0.5.60] X-ClientProxiedBy: se-mail02w.axis.com (10.20.40.8) To se-mail01w.axis.com (10.20.40.7) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771763501328265206 X-GMAIL-MSGID: 1771763501328265206 Murata IRS-D200 is a PIR sensor for human detection. It uses the I2C bus for communication with interrupt support. Add devicetree bindings requiring the compatible string, I2C slave address (reg), power supply and interrupts. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Waqar Hameed --- .../iio/proximity/murata,irsd200.yaml | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/proximity/murata,irsd200.yaml diff --git a/Documentation/devicetree/bindings/iio/proximity/murata,irsd200.yaml b/Documentation/devicetree/bindings/iio/proximity/murata,irsd200.yaml new file mode 100644 index 000000000000..67f5389ece67 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/proximity/murata,irsd200.yaml @@ -0,0 +1,60 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/proximity/murata,irsd200.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Murata IRS-D200 PIR sensor + +maintainers: + - Waqar Hameed + +description: + PIR sensor for human detection. + +properties: + compatible: + const: murata,irsd200 + + reg: + items: + - enum: + - 0x48 + - 0x49 + description: | + When the AD pin is connected to GND, the slave address is 0x48. + When the AD pin is connected to VDD, the slave address is 0x49. + + interrupts: + maxItems: 1 + description: + Type should be IRQ_TYPE_EDGE_RISING. + + vdd-supply: + description: + 3.3 V supply voltage. + +required: + - compatible + - reg + - interrupts + - vdd-supply + +additionalProperties: false + +examples: + - | + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + proximity@48 { + compatible = "murata,irsd200"; + reg = <0x48>; + interrupts = <24 IRQ_TYPE_EDGE_RISING>; + vdd-supply = <®ulator_3v3>; + }; + }; +...