From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=84.42.129.46 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796119072; b=vsQANxcisya8EGJNxNB/vtMOGIc+l6G0ODrIpZhzB2evfZi1RSXaN+GmQUeSx3XB+rrs YH9CH7E478bmtwl0UJP5kQ2DZ3x0XJhSqf5OXjE/y+/aaa8QK1pmGN33whFh6mbZYeYJa /aedTpsdIrWP3iLJmwImZJxrURtchLsemyUlf4Tx5C6jJ9gzRaAwpD+5NdQYjb7eET8qo se61NEQcVfxnz7r+4nmhQVmyvdjVEZiJwTqIkGOuqG4YwWPrcNJy/ftOrfFcukgqobxG/ NQ4aIgr8KJZUv+4airOk57RLohY1pqurr61Z/ap27Kcf7YMxNeYxdtPEdekK1eiJprw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796119072; h=DMARC-Filter:Received:DKIM-Signature:Message-ID:Date:MIME-Version: User-Agent:Subject:To:Cc:References:Content-Language:From:Autocrypt: In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=iH5oAxT21MSj8si1DOEpqsQN7bc6DUs29qwyd2FkYBY=; b=0UIqwjUJeJKvFXmmMYqrkoG6KH+v6Oe/+LXsCg0QC5jmcMUvuKs+FjZA6IxTYWp/FgaE F2khKj5fm8HZUs4G0IjR5l2YIjvsWALFe+QzUx2LClMuZHwYuUwY9vQ5lvDz4vesVezFs iKeMt20xOrlTHsCJ0qq2OtsblZnJwFVylCO7qydZox2VWCR8rvH+FG5I0sXD0BogwhCfA NdV3MwIBn7Dk4fHsfn6AzlxCYr9IJ81LaCgG5bS9OcXkFO+4n4WExbVWVS3eHehbaOJW6 4Sgo/Td3PoEO2BM7EbBM9lFRGIaM/ALz4uODgxx57Sc9n4dLYt79WDzcJgvAnFKAj4w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=ixit.cz; spf=pass smtp.mailfrom=ixit.cz; dkim=pass header.d=ixit.cz header.i=@ixit.cz header.a=rsa-sha256 header.s=dkim header.b=aJE9bvK8; arc=none smtp.remote-ip=84.42.129.46 Received: from ixit.cz (ixit.cz [84.42.129.46]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9AD84606A31A; Tue, 1 Dec 2026 09:57:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9AD84606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ixit.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ixit.cz Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ixit.cz header.i=@ixit.cz header.a=rsa-sha256 header.s=dkim header.b=aJE9bvK8 Received: from [IPV6:2a02:830a:f787:8f00:d622:eaa3:3dd6:8f5e] (unknown [IPv6:2a02:830a:f787:8f00:d622:eaa3:3dd6:8f5e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ixit.cz (Postfix) with ESMTPSA id 9B01553403FE; Tue, 01 Dec 2026 10:57:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ixit.cz; s=dkim; t=1796119067; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=iH5oAxT21MSj8si1DOEpqsQN7bc6DUs29qwyd2FkYBY=; b=aJE9bvK8EofNdzcAmEodJz21v015XYnOUv+Pjh/6ybdHrnPoh96j8IlSJrPznuftJVZI8m hyWZd0XtH75Qu00R0R230OO9W3PKY5Bnl0AQ6SaI2WjNL/K28UUMi272EVxzRHhgCvNqGO p7VD1MqLsVn7tQj8h8kDWoTxVFYnEp0= Message-ID: Date: Tue, 1 Dec 2026 10:57:47 +0100 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v8 3/9] Input: qcom-pmi8998-haptics - Add Qualcomm PMI8998 haptics driver To: Dmitry Torokhov Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Stephen Boyd , Bjorn Andersson , Konrad Dybcio , Abel Vesa , Subbaraman Narayanamurthy , Kamal Wadhwa , Fenglin Wu , Casey Connolly , linux-arm-msm@vger.kernel.org, linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, mfd@lists.linux.dev, phone-devel@vger.kernel.org References: <20261130-qcom-pmi8998-haptics-v8-0-a64ecd72d3bb@ixit.cz> <20261130-qcom-pmi8998-haptics-v8-3-a64ecd72d3bb@ixit.cz> Content-Language: en-US, cs-CZ From: David Heidelberg Autocrypt: addr=david@ixit.cz; keydata= xsFNBF5v1x4BEADS3EddwsNsvVAI1XF8uQKbdYPY/GhjaSLziwVnbwv5BGwqB1tfXoHnccoA 9kTgKAbiXG/CiZFhD6l4WCIskQDKzyQN3JhCUIxh16Xyw0lECI7iqoW9LmMoN1dNKcUmCO9g lZxQaOl+1bY/7ttd7DapLh9rmBXJ2lKiMEaIpUwb/Nw0d7Enp4Jy2TpkhPywIpUn8CoJCv3/ 61qbvI9y5utB/UhfMAUXsaAgwEJyGPAqHlC0YZjaTwOu+YQUE3AFzhCbksq95CwDz4U4gdls dmv9tkATfu2OmzERZQ6vJTehK0Pu4l5KmCAzYg42I9Dy4E6b17x6NncKbcByQFOXMtG0qVUk F1yeeOQUHwu+8t3ZDMBUhCkRL/juu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7XRkqK3QqLcPW79/CFn7q1yxamPkpoXUJq9/fVjlhk7P+da NYQpe4WQQnktBY29SkFnvfIAwqIVU8ix5Oz8rghuCcAdR7lEJ7hCX9bR0EE05FOXdZy5FWL9 GHvFa/Opkq3DPmFl/0nt4HJqq1Nwrr+WR6d0414oo1n2hPEllge/6iD3ZYwptTvOFKEw/v0A yqOoYSiKX9F7Ko7QO+VnYeVDsDDevKic2T/4GDpcSVd9ipiKxCQvUAzKUH7RUpqDTa+rYurm zRKcgRumz2Tc1ouHj6qINlzEe3a5ldctIn/dvR1l2Ko7GBTG+VGp9U5NOAEkGpxHG9yg6eeY fFYnMme51H/HKiyUlFiE3yd5LSmv8Dhbf+vsI4x6BOOOq4Iyop/Exavj1owGxW0hpdUGcCl1 ovlwVPO/6l/XLAmSGwdnGqok5eGZQzSst0tj9RC9O0dXO1TZocOsf0tJ8dR2egX4kxM= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 01/12/2026 05:48, Dmitry Torokhov wrote: > Hi David, > > On Mon, Nov 30, 2026 at 01:13:50AM +0100, David Heidelberg wrote: >> Add a driver for the haptics module in the Qualcomm PMI8998 PMIC, based >> on the downstream qpnp-haptics driver and using the input force-feedback >> framework. >> >> Both linear resonant actuators (LRA) and eccentric rotating mass (ERM) >> motors are supported in direct and 8-sample buffer play modes. >> FF_RUMBLE, FF_CONSTANT, FF_PERIODIC (FF_SINE and FF_CUSTOM) effects and >> FF_GAIN master gain are supported, with requested strength scaled >> linearly between 116 mV and the board's qcom,vmax-microvolt and timed >> effects stopped automatically after replay.length ms. For LRA actuators, >> the module's auto-resonance measurement is polled while driving to track >> resonance drift within the configured variation bounds; ERM actuators >> disable auto-resonance and use the configured sample play rate. Active >> braking and short-circuit fault handling (which shuts down the module if >> shorts persist) are supported. Audio and PWM waveform sources, overdrive >> and multi-set waveforms are not implemented. >> >> PMI8941, PMI8994 and PMI8996 carry a similar block; they can be added >> once tested. >> >> Based on work of Casey Connolly. >> >> Signed-off-by: David Heidelberg > > Thank you for the driver. Please also mention PM660 in the commit > description since the driver adds support for qcom,pm660-haptics. > > The biggest issue here is that the driver grew to over 2000 lines mostly > because it uses input_ff_create() and implements its own asynchronous FF > scheduler (effect array, request queue, spinlock, and multiple work > items). Since this hardware has no autonomous effect memory or replay > timer, please switch to input_ff_create_memless() like the other > vibrator drivers in drivers/input/misc/. That gives proper handling of > replay.delay, repeat counts, FF_GAIN, envelopes, and effect combining, > avoids hand-rolling partial FF_SINE and FF_CONSTANT support, and drops > the custom queue and work races (including the work()/erase() race > Sashiko pointed out). Hi Dmitry. What about our waveform buffer the HW has, I wouldn't be able to utilize it with ff-memless, if I'm correct. While I currently dislike the extra complexity, the problem why I went with this approach was mostly because ff-memless couldn't do much. > > As a heads up, I am looking into reworking the FF core and ff-memless to > better handle suspend, resume, and "slow" (sleepable) memoryless > devices. There is no need to wait on that work, though: a slim driver > built on the existing input_ff_create_memless() with a single > work_struct will be straightforward to adapt once those changes land. If I go for the memless, are there planned at least some changes to, f.e. use the waveform buffers, e.g. opposite of memless? Thank you David P.S. I won't mind if you use your own wording instead of LLM replies, as I remember these were historically just fine. [...]