Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2132943rwi; Tue, 11 Oct 2022 05:21:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6wrdwt2ZD6zhxXf7OmY/WXxNafO/de/TdiP8tSM4a7ufXvrHeJVV0y3lK4VUY3n4ITh0PF X-Received: by 2002:a17:907:97d4:b0:781:c182:c45c with SMTP id js20-20020a17090797d400b00781c182c45cmr18674604ejc.170.1665490870987; Tue, 11 Oct 2022 05:21:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665490870; cv=none; d=google.com; s=arc-20160816; b=c8nLDM7BN1uXw9JkiaF+vQpedYBmitoqwpOTwovsebmu4dHEJBBzMzHaXBhKqIbFjo s8T6++6F98D2BV490aG9socjkyXJY9hmkW/0Jk0iebet5hrvg+0dUlDsyQRvdzxy3dE4 29ORNPeSxnFlD/xuwlze2tIWF02HBb5iFK4OiwykpGi9+KdKfcgssWyiN4eOvOJ1MKZH TU0s80k3B7CstlK80KV1l6U+sWfRPMEVR3JmmCnUhde4BL/xhNVQ2fMvgRMU4ACy92D7 /P/F31sBYht5Dajb6W32/NOoOy55lph/uDs+6gCEM1W8/ODHbd5NutEK+Jz2RegRDOud nkFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=pwx1gdCZLqXzaS+Q30irzvLhEizg6LXUuBfoqUklLTg=; b=CvHWVFg8ErnoFHJm3pnZYrCjhYB16jJkovqRkGZIV6OnCSKJxMj0CnzOsP1qJmMGeI 57E0vGJfiQuaHfw8vWXL+kwhciZ5hdwkqZL7PUiNX/KIIiyIipfd/aqAhY1BLmnS90vI j3wfZYGXnbs6PvI3xvIowshWn12hUYdzv9S3b9OmZ78x3RvZZKZJ+3eLVQtL8befN4LO GGqdFrCk15Lab/x+cpK/4bMBJLJ/byHlm/p6DfGRsgsVqKVQA1hCoTe/arnCXcvrUNVm Wf7oAZN8g/cHh0Uki0DgzIp+whUfBoewCbMf/kNpw3eNZMd6mGUhf9GHUsNatFI8R/mq aPww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dAZT5D1v; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gn9-20020a1709070d0900b00783645da4e5si1837262ejc.582.2022.10.11.05.20.13; Tue, 11 Oct 2022 05:21:10 -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=@linaro.org header.s=google header.b=dAZT5D1v; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229619AbiJKMPy (ORCPT + 99 others); Tue, 11 Oct 2022 08:15:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229590AbiJKMPu (ORCPT ); Tue, 11 Oct 2022 08:15:50 -0400 Received: from mail-qk1-x735.google.com (mail-qk1-x735.google.com [IPv6:2607:f8b0:4864:20::735]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9799042E74 for ; Tue, 11 Oct 2022 05:15:46 -0700 (PDT) Received: by mail-qk1-x735.google.com with SMTP id t25so1228645qkm.2 for ; Tue, 11 Oct 2022 05:15:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=pwx1gdCZLqXzaS+Q30irzvLhEizg6LXUuBfoqUklLTg=; b=dAZT5D1vT/7cmrauerfCRfjuzvHfg0ZeJ59e5GwTzvq/wxuQJK/jUSMIehrAUcKH1Y SUbKjjdU78SSMYzzJ3Lt25Tp5zrszTpOGc9HwdQSwHkecge5f1Rleoc4MU4kwkc7hjGq 5ywlPvgJJsuNlLoT+LDoRIDM8V0YUBirCTeMebmTihRzv4dmacx7P/Yf3NvzxuPwJcoN HjgwNzVGyOx0xLm46lB4E8P8fQBNwj5Fz/4+pVlGLZKy8nfOlKZf+kuZYGrmHuBad+RV nXT+HRy/I4kH7VpEu1I15YdrTUO3//0l2UtZ99vJW2yUtKw/NkDi2NhVs9hSkFabNpED Xwew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=pwx1gdCZLqXzaS+Q30irzvLhEizg6LXUuBfoqUklLTg=; b=AiL5gklWOI7kjOk3dGa4aBWayf303THU9vQTYMxFPgnSdwKymZ5matpOugBlTywkS1 Sy4zDXqmwNmAVNBAujKqDOP84B6+pcA2mWe6fLLgkSmUZxfHoi1WGGscIXeBVeUnmf5B sg4PdzDXdUE3+JKza6gTj3bmU1nB2tr7FZnSwq79CCGZVJ9vMG4BZPqgSeW1wVy5AVVR CRkqh2i1HjQf1zbCaQAfV3kAbCXOfFxPNC10vMizCcXD1u+qyVuZ+t2H0LEvFk3FRoYp HhUv82uK2s+ws/fnl+HaA7l0Vty0pK82EaqBH3Gt7rYaqZImEIeP0J17sUk4k5aSnQEb Rchw== X-Gm-Message-State: ACrzQf31Jw20fVUQiwSQigdKTi6bV8Bt7e9t+MJMDUvcC2mBVvGrKIYZ 8ZitxU2Rajlme7SMUTXzHebfWA== X-Received: by 2002:ae9:ec19:0:b0:6ea:d0cd:a4ed with SMTP id h25-20020ae9ec19000000b006ead0cda4edmr11194620qkg.472.1665490545744; Tue, 11 Oct 2022 05:15:45 -0700 (PDT) Received: from [192.168.1.57] (cpe-72-225-192-120.nyc.res.rr.com. [72.225.192.120]) by smtp.gmail.com with ESMTPSA id k11-20020a05620a0b8b00b006cbc6e1478csm12398844qkh.57.2022.10.11.05.15.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Oct 2022 05:15:45 -0700 (PDT) Message-ID: Date: Tue, 11 Oct 2022 08:13:33 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.2 Subject: Re: [PATCH v6 2/2] input: add Qualcomm SPMI haptics driver Content-Language: en-US To: Caleb Connolly Cc: 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 References: <20221010162945.1325770-3-caleb@connolly.tech> From: Krzysztof Kozlowski In-Reply-To: <20221010162945.1325770-3-caleb@connolly.tech> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 On 10/10/2022 12:30, Caleb Connolly wrote: > Add support for the haptics found in pmi8998 and related PMICs. > Based on the ff-memless interface. Currently this driver provides > a partial implementation of hardware features. > > This driver only supports LRAs (Linear Resonant Actuators) in the "buffer" > mode with a single wave pattern. > > Signed-off-by: Caleb Connolly > --- > drivers/input/misc/Kconfig | 15 + > drivers/input/misc/Makefile | 1 + > drivers/input/misc/qcom-pmi8998-haptics.c | 690 ++++++++++++++++++++++ > 3 files changed, 706 insertions(+) > create mode 100644 drivers/input/misc/qcom-pmi8998-haptics.c > > diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig > index a18ab7358d8f..c3b59ea23144 100644 > --- a/drivers/input/misc/Kconfig > +++ b/drivers/input/misc/Kconfig > @@ -186,6 +186,21 @@ config INPUT_PMIC8XXX_PWRKEY > To compile this driver as a module, choose M here: the > module will be called pmic8xxx-pwrkey. > > +config INPUT_QCOM_PMI8998_HAPTICS > + tristate "Qualcomm SPMI HAPTICS" > + depends on ARCH_QCOM || COMPILE_TEST > + depends on MFD_PM8XXX || MFD_SPMI_PMIC || COMPILE_TEST (and actually test it) > + select INPUT_FF_MEMLESS > + help > + This option enables support for the haptics found in pmi8998 and > + related PMICs. Based on the ff-memless interface. > + > + This driver is for hardware too new for the INPUT_PM8XXX_VIBRATOR > + driver. > + > + To compile this driver as module, choose M here: the > + module will be called qcom_pmi8998_haptics. > + Best regards, Krzysztof