From patchwork Wed Jul 12 15:12: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: 119255 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1244385vqm; Wed, 12 Jul 2023 08:52:26 -0700 (PDT) X-Google-Smtp-Source: APBJJlG3S7Wwdkf/dFch3c9lci5VjKii1tvft0mTupPDn2SjPs4QSFKtuwY0febNcf1cRYZoeZM6 X-Received: by 2002:a05:6a00:3921:b0:682:a6c5:6f28 with SMTP id fh33-20020a056a00392100b00682a6c56f28mr25179296pfb.32.1689177145870; Wed, 12 Jul 2023 08:52:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689177145; cv=none; d=google.com; s=arc-20160816; b=k4exAIEboXMZhvgWC9TpX8zuHhjPG54s1EA8nyUVSgRE9gBwV9hg8V3v37AZRkPw4O R+Pzbdfg7Z4Bd5+wU8pr3YKbFNcVyJIt5LWMoVmIAOD9JstuxvbdVz8qxBDPgv2BH4bo PKTeOnE5Dad8QpR9wvFris8tXbOzeI5Aj1/rO2/mgqYxc/sIomWRmXWHGAhzvIXYISjw pN9A993Or+PwUOu20H3BSl0HMpq/BT2FnbjKSnRadjzj+dgm9g00YPy3hiac6TdUcVRM 0GZPeFnIYnWis7upWu0+s3cgsqN84bUwM8RJEuHz91Kn1F19FRhYcnibjO2D9E1vfWHC St0w== 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=HV2jebiOT6mQ2HdkOPhLHt3aK1bDvbiJCC1sTblJH5M=; fh=1r5uxeNWeyLofALjZLvyUdh7Op2Q1tBQj7UeKMpzdN0=; b=CSY4mDOcHv+4poJv8X6FPam7fp8RgdTleIHd001Q5n/quzAcT4TfiNwLgZd4kxkKVw C14YU2OQvoSM99/kLJ19RLJll5GaYnv9MLQVa9Ly8HjEgMnaQGukDZ8x63XnXhKZpSYG NtV1ZxBIxoM6BYEhj62/5OBDidD9vJWs++KlOBIA/Y4IrrbWaJZgT9zLmrYVNkJbngrF q3zMYwPIX90JXr7T/vXCCPMjnzZ49HJ9FZHaG+8boMa0AXy4+vOvU7ZRFGqhzn4U1lzW MxKVSUUPQfLCbyIyr0bm1I6OOrNvPhznh4YMFz+mHOAB5dluSGNKEoi4VHtPcIihfLzw f/eA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=dkNrtssc; 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 cb13-20020a056a00430d00b0068273fe79fdsi3388543pfb.163.2023.07.12.08.52.13; Wed, 12 Jul 2023 08:52: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=dkNrtssc; 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 S233655AbjGLP2R (ORCPT + 99 others); Wed, 12 Jul 2023 11:28:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233379AbjGLP2H (ORCPT ); Wed, 12 Jul 2023 11:28:07 -0400 Received: from smtp2.axis.com (smtp2.axis.com [195.60.68.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C56D1BD5; Wed, 12 Jul 2023 08:28:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1689175686; x=1720711686; h=references:from:to:cc:subject:in-reply-to:date: message-id:mime-version; bh=HV2jebiOT6mQ2HdkOPhLHt3aK1bDvbiJCC1sTblJH5M=; b=dkNrtssclX51nFDUdqZgyelD1J0g5QUPFBm0Cl6Kxepd72WGhCOZFfVb x0tC4au7lzk77Z0D1AO5YJQ3pVn4SQFpq9UM8wcCCLQmQHEkPlG192adu +dItZADjgAa96CTDkxNl+UHMfmtWI9XYDtg0z5FxRFYmh78/aZ7NbUQi5 0JNqyO5NnN/fmyRxyEbNBb0kg8OI1x6OQVCc/DKUNq6KVA5OFy+Dl3jmq cVXUhbyvLq+d52CCdgz3pppaiDhP9l60rrKBJHCAyp6X6Iy/9iJCorQtm l1S6Jh0Qbm86a7cedpkBCHmxJGMAsnlewq5B2301mK5r+r/iRxIEmHVh9 w==; References: User-agent: a.out From: Waqar Hameed To: Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: , , , Subject: [PATCH v2 1/3] dt-bindings: iio: proximity: Add Murata IRS-D200 In-Reply-To: Date: Wed, 12 Jul 2023 17:12:16 +0200 Message-ID: <3b9b284effa7d63c5c3c022f0d51312052bbe62c.1689174736.git.waqar.hameed@axis.com> MIME-Version: 1.0 X-Originating-IP: [10.0.5.60] X-ClientProxiedBy: se-mail01w.axis.com (10.20.40.7) 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: 1771230614441399506 X-GMAIL-MSGID: 1771230614441399506 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. Signed-off-by: Waqar Hameed Reviewed-by: Krzysztof Kozlowski --- .../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>; + }; + }; +...