From patchwork Sat Oct 15 17:30:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 2969 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp725996wrs; Sat, 15 Oct 2022 10:31:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Fk+iNIoL/rVYOTHEajUQmxLw5goX8cx2GinjLaP+1d8O3cvR5i0bmXz8nDNvfw1Okf0Mm X-Received: by 2002:a63:5164:0:b0:43b:e57c:a15f with SMTP id r36-20020a635164000000b0043be57ca15fmr3376317pgl.586.1665855118831; Sat, 15 Oct 2022 10:31:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665855118; cv=none; d=google.com; s=arc-20160816; b=Ik00aOcV+i9WAimHzdZjRYniVWLb5oaY5r7kCIMkyIy9/wNR63ro7zXM5uD5osN6pj I51Hrmb+7Xb4EDGsBhwZ9Q+LA/0wLsOLh8REC8dZkkamC+Porw0NWP8SZe9W7LRrvDKR QzRF3BMUgNnSCVX6WeZLn2DpLd/UJqsDKasCDZnIwPvjc1mKA8xUYEMgSbigpP1cErOq xE19g6oggbH60nrrYUAlMAvPencB5KJgK0VEWrolvaeZhNVXJsvIvUOaVpNmAsqDIERV 6S4++PLlbr50jDGzois3qI/9mbJHVntKH/02xP/XWpp3Uj8qRnlQQRuUW+L40R2imx48 bzvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :feedback-id:references:in-reply-to:message-id:subject:cc:from:to :dkim-signature:date; bh=6XcIJc5BwpG2eVT23TcTifJ56CMOgmWWT43932Rpggs=; b=g165zGYoaHEb/S4PvWGzF2BBU5s2YJ8X/8cMP3kHJdw48/kPWkgiLBjsuvL6Ec3A8S WgD0JTZnZHl4jN3DEhMW41pgyOGul0/kt90S7WRoetxvHyU8/9cX836mREKjeIR/tqrf Exl+wfWw26fhN868LQr5V764LghjHq6hZoHCExmdcJtLnEsJyPbo3iXVlMxDj2NmW6GD rmpk151KRO5AUZsNaN6ntSrA+XCu+DM1fOC7brw6qdZ9n2Gt+3/hEsYnDEyUZlAoKmgL 9CjFDOSrxYTNhiX4SVy7xkuLZqLcX6ZKq4JtZGkC3u9Oo0W9pvu5GZkDLYmpLmuMb5eM HbXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@connolly.tech header.s=protonmail header.b="SR4/OwCu"; 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=connolly.tech Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 7-20020a17090a018700b00202be5416b1si11134970pjc.109.2022.10.15.10.31.46; Sat, 15 Oct 2022 10:31:58 -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 header.i=@connolly.tech header.s=protonmail header.b="SR4/OwCu"; 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=connolly.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229695AbiJORar (ORCPT + 99 others); Sat, 15 Oct 2022 13:30:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229691AbiJORap (ORCPT ); Sat, 15 Oct 2022 13:30:45 -0400 Received: from mail-4317.proton.ch (mail-4317.proton.ch [185.70.43.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9481538A02; Sat, 15 Oct 2022 10:30:43 -0700 (PDT) Date: Sat, 15 Oct 2022 17:30:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=connolly.tech; s=protonmail; t=1665855041; x=1666114241; bh=6XcIJc5BwpG2eVT23TcTifJ56CMOgmWWT43932Rpggs=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=SR4/OwCuJcLGAtzq9xQo3MYWjcmjO3Whyt2XWactHWQlXNFvmfOU/n8mP6WZkrT/Q Vkd4wzv3VylKzda5OLqRDfdUUZ0mLYg26GKHIIQwkQ1IqNNLkyUiuc6AKPSufNv8ia JcYOsxjaFHQeB17mZR5E7rfa+LrS3k0z4tHa2MyQ= To: caleb@connolly.tech From: Caleb Connolly Cc: krzysztof.kozlowski@linaro.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Andy Gross , Bjorn Andersson , devicetree@vger.kernel.org, Dmitry Torokhov , Jeff LaBundy , Konrad Dybcio , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Nathan Chancellor , Nick Desaulniers , Rob Herring , Tom Rix Subject: [PATCH v7 1/2] dt-bindings: input: document Qualcomm PMI8998 haptics driver Message-ID: <20221015172915.1436236-2-caleb@connolly.tech> In-Reply-To: <20221015172915.1436236-1-caleb@connolly.tech> References: <20221015172915.1436236-1-caleb@connolly.tech> Feedback-ID: 10753939:user:proton MIME-Version: 1.0 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,TO_EQ_FM_DIRECT_MX autolearn=no 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746775697055046982?= X-GMAIL-MSGID: =?utf-8?q?1746775697055046982?= Add bindings for qcom PMIC PMI8998 haptics driver. Signed-off-by: Caleb Connolly Reviewed-by: Krzysztof Kozlowski --- .../bindings/input/qcom,pmi8998-haptics.yaml | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/qcom,pmi8998-haptics.yaml -- 2.38.0 diff --git a/Documentation/devicetree/bindings/input/qcom,pmi8998-haptics.yaml b/Documentation/devicetree/bindings/input/qcom,pmi8998-haptics.yaml new file mode 100644 index 000000000000..d43324cceb89 --- /dev/null +++ b/Documentation/devicetree/bindings/input/qcom,pmi8998-haptics.yaml @@ -0,0 +1,73 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright 2020 Unisoc Inc. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/qcom,pmi8998-haptics.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm PMI8998/PM660 Haptics + +maintainers: + - Caleb Connolly + +description: | + Qualcomm SPMI haptics is a peripheral on some QTI PMICs. It supports linear resonant + actuators and eccentric rotating mass type haptics commonly found in mobile devices. + It supports multiple sources of wave data such as an internal buffer, direct play + (from kernel or userspace) as well as an audio output mode. + +properties: + compatible: + items: + - enum: + - qcom,pmi8998-haptics + - qcom,pm660-charger + - qcom,pmi8996-haptics + - qcom,pmi8941-haptics + + reg: + maxItems: 1 + + interrupts: + maxItems: 2 + + interrupt-names: + items: + - const: short + - const: play + + qcom,wave-play-duration-us: + description: | + Wave sample duration in microseconds, 1/f where f + is the resonant frequency of the actuator. + This property is named qcom,wave-play-rate-us in + downstream kernels. + minimum: 0 + maximum: 20475 + +required: + - compatible + - reg + - interrupts + - qcom,wave-play-rate-us + +additionalProperties: false + +examples: + - | + #include + + spmi { + #address-cells = <1>; + #size-cells = <0>; + pmi8998_haptics: haptics@c000 { + compatible = "qcom,pmi8998-haptics"; + reg = <0xc000>; + + interrupts = <0x3 0xc0 0x0 IRQ_TYPE_EDGE_BOTH>, + <0x3 0xc0 0x1 IRQ_TYPE_EDGE_BOTH>; + interrupt-names = "short", "play"; + + qcom,wave-play-rate-us = <4255>; + }; + };