From patchwork Wed Jul 19 07:51:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Waqar Hameed X-Patchwork-Id: 122445 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp2281318vqt; Wed, 19 Jul 2023 01:16:58 -0700 (PDT) X-Google-Smtp-Source: APBJJlE6bk2a5gKiYU9e4zFEIHXRRVLH21h4R0Z9RCSiywPYpPLuPajhuzz3qbKVkJhw4EX/LXuQ X-Received: by 2002:a05:6402:1299:b0:51d:961a:b27a with SMTP id w25-20020a056402129900b0051d961ab27amr1695741edv.7.1689754617743; Wed, 19 Jul 2023 01:16:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689754617; cv=none; d=google.com; s=arc-20160816; b=LZgdMB1K2vCmnFcGOrLrSoxCIpKxDWlMtWKLm/4IJjjL0+FTmgOMu8vnFlPJ1Z/Kkz EE7EIEvIfjFwpdodzTQ8FPQ3+9vVbuV45pbA+Dwn8XaINDnkkCpLeXf5QRBDPVp3rNYB Mbqt8uaUZd6PJ62AhbrGvpvTQfYIoiS4xyn6Ih2r7Uvo76ocb1mThrgkP//kft6j1IN9 0zNb5GP8SppyiMdnWMZli8HPOoimU8gAHALL7NmHG8UgYJ2D7e98NLfKWyowUXZxxrMM 6kyocyQko80hoguE18p1tUyMFhm+hvWMBCNxPC4zyjVD7CS8468ZGiKAHbVHkzBtHaib FjGQ== 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=HEOWBVTqS7nsnqWTSIJTPs/ZW0To6OJxImQIHvMuRWs=; b=K+zpGwSBPoxw0yzDCRkQXOkJ80ixgjXkF12np/fwnb0nmg3t1yKC3O9lAxv4j5Napg 24xip9n3ik3hBUaXUIQSil7sYT3MQYi26lhNsy8fF/HNmfiJ5R0gos4T4i3hFEauUJWj NFzKgzX6U9u0aFKWotH9d79VPc3jzk3OSQZOk/c1S1OgeTtU32utoHO6pZzGxl/DUG7c m0+F4bJIDlUIRmsk1O2xTIRE9/0FbpmZ9fzk9w81HsFEIXoBeHc0z8LugsML6lB/tKCW WetZpkvYYftmoG6R7QLr5goUFcvRFXZKIUQXCht9qnpl+W8hYzGF0xNQrTNrjhhqmJ8u JjGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b="VHECJyJ/"; 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 c23-20020a056402121700b0051ddbdeef98si2550841edw.121.2023.07.19.01.16.33; Wed, 19 Jul 2023 01:16:57 -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="VHECJyJ/"; 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 S230437AbjGSHyF (ORCPT + 99 others); Wed, 19 Jul 2023 03:54:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230253AbjGSHxm (ORCPT ); Wed, 19 Jul 2023 03:53:42 -0400 Received: from smtp1.axis.com (smtp1.axis.com [195.60.68.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 552571FFA; Wed, 19 Jul 2023 00:53:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1689753221; x=1721289221; h=references:from:to:cc:subject:in-reply-to:date: message-id:mime-version; bh=sGKc3f9aEi49syc8A8ZbaYt31rq0mocNyOVaPh8IHJY=; b=VHECJyJ/Gh8dURIpkrhfmUCQTRcqFt9+K1B6AnicmwILSYr+S3o5EW41 YM8GrikeQ12PhOhscsoNv3D+HCB4EWfbzrFOW7VG7/sdzGyRwugTXgS+Y OawqG+Nt88sYNUO8TyE1IYlMmoMhKIQ2/X6hv8kFw/xOyP1hAdFfv3KKV 1O45DLyW0hIa2XajgSO4n58KvvvzBvZFoHUs+PDRfXm0FmHfaJBwTdRfG ZinfuBTVIon0O9L9OhEnBxaP/6TF2/8P9vREXxQyLYI7xrOq84q8QcnHN j2jvYIRm55n8mzIpoTIbAiCti4n5RlMT0b9V0VYxr2n09xeEhdg+S+Wts Q==; References: User-agent: a.out From: Waqar Hameed To: Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Waqar Hameed CC: , , , Subject: [PATCH v4 1/3] dt-bindings: iio: proximity: Add Murata IRS-D200 In-Reply-To: Date: Wed, 19 Jul 2023 09:51:16 +0200 Message-ID: <09975910ea638a9aa893411124bbd2a5c98e45c3.1689753076.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=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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: 1771836137701929565 X-GMAIL-MSGID: 1771836137701929565 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>; + }; + }; +...