From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F01FC48BE5 for ; Sat, 12 Jun 2021 20:54:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5421B611B0 for ; Sat, 12 Jun 2021 20:54:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231535AbhFLU4a (ORCPT ); Sat, 12 Jun 2021 16:56:30 -0400 Received: from mail2.protonmail.ch ([185.70.40.22]:30129 "EHLO mail2.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231537AbhFLU43 (ORCPT ); Sat, 12 Jun 2021 16:56:29 -0400 Date: Sat, 12 Jun 2021 20:54:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=connolly.tech; s=protonmail; t=1623531268; bh=vM4PAnRTUa2TlxEjYrPkd185UGx9iXx4BFl/sNcY/Zg=; h=Date:To:From:Cc:Reply-To:Subject:From; b=qpkwQr+8Sv6Gl0wYh+6y9ybvhYIKUqpWboqv3ocY61C9Sl9NGLOx+P1CQHV0/3DPt OKTpANUor6CpST6LUCIkTKjXMHcu7+XBG0P7rOmiDZCJyn6hNVM2bGTd6GeEyToVCk w0vZnJENX/RaEAofkuceDp6MJzVWGNxWVv+HrZ2s= To: caleb@connolly.tech From: Caleb Connolly Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, linux-arm-msm@vger.kernel.org Reply-To: Caleb Connolly Subject: input: Introduce QPNP (Qualcomm Plug n Play) haptics found on qcom PMICs Message-ID: <20210612205405.1233588-1-caleb@connolly.tech> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This series introduces a driver for the QPNP haptics hardware block found in Qualcomm PMICs. QPNP haptics support LRA (Linear Resonant Actuator) style haptics, as well as ERM (Eccentric Rotating Mass). It also supports several modes of driving the haptics, e.g. by loading the pattern to play into an internal buffer, or using PWM. More information about the hardware can be found here: https://gitlab.com/sdm845-mainline/linux/-/wikis/PMI8998-QPNP-Hapti= cs This driver has been written based on downstream sources as no public documentation is available. It includes initial support for LRA haptics in buffer mode, this combination seems to be the most common and will enable haptics on the OnePlus 6 and 6T, PocoPhone F1, OnePlus 5 and several other Qualcomm devices with mainline kernel support. The driver is implemented using the ff-memless (forcefeedback) input framework and makes an attempt to control the strength of vibration relativ= e to the magnitude set from userspace. ~ Caleb