Linux Input/HID development
 help / color / mirror / Atom feed
From: David Heidelberg <david@ixit.cz>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, Lee Jones <lee@kernel.org>,
	Stephen Boyd <sboyd@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Abel Vesa <abelvesa@kernel.org>,
	Subbaraman Narayanamurthy
	<subbaraman.narayanamurthy@oss.qualcomm.com>,
	Kamal Wadhwa <kamal.wadhwa@oss.qualcomm.com>,
	Fenglin Wu <fenglin.wu@oss.qualcomm.com>,
	Casey Connolly <casey@connolly.tech>,
	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
Subject: Re: [PATCH v8 3/9] Input: qcom-pmi8998-haptics - Add Qualcomm PMI8998 haptics driver
Date: Tue, 1 Dec 2026 10:57:47 +0100	[thread overview]
Message-ID: <fc9d0000-5a7f-4b1e-8ec9-3cefd185350f@ixit.cz> (raw)
In-Reply-To: <e2198b0a278df12f939c0264cdf6be2b@gmail.com>

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 <david@ixit.cz>
> 
> 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.

[...]

  reply	other threads:[~2026-12-01  9:57 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30  0:13 [PATCH v8 0/9] input: Add support for the Qualcomm PMI8998 and PM660 haptics David Heidelberg via B4 Relay
2026-11-30  0:13 ` [PATCH v8 1/9] dt-bindings: input: Add Qualcomm PMI8998 / " David Heidelberg via B4 Relay
2026-11-30  0:22   ` sashiko-bot
2026-11-30 13:59   ` Rob Herring (Arm)
2026-11-30  0:13 ` [PATCH v8 2/9] dt-bindings: mfd: qcom,spmi-pmic: Allow the PMI8998 haptics child node David Heidelberg via B4 Relay
2026-11-30 13:59   ` Rob Herring (Arm)
2026-11-30  0:13 ` [PATCH v8 3/9] Input: qcom-pmi8998-haptics - Add Qualcomm PMI8998 haptics driver David Heidelberg via B4 Relay
2026-11-30  0:26   ` sashiko-bot
2026-11-30  9:33   ` Uwe Kleine-König
2026-11-30 10:36   ` Alexey Minnekhanov
2026-11-30 11:36     ` Uwe Kleine-König
2026-11-30 15:21   ` Andrey Derkach
2026-11-30 16:11     ` David Heidelberg
2026-11-30 16:16       ` Andrey Derkach
2026-11-30 16:26         ` Andrey Derkach
2026-11-30 23:56         ` David Heidelberg
2026-12-01  4:48   ` Dmitry Torokhov
2026-12-01  9:57     ` David Heidelberg [this message]
2026-12-01 19:54       ` Dmitry Torokhov
2026-11-30  0:13 ` [PATCH v8 4/9] arm64: dts: qcom: pmi8998: Add haptics node David Heidelberg via B4 Relay
2026-11-30  0:13 ` [PATCH v8 5/9] arm64: dts: qcom: sdm845-oneplus: Enable haptics David Heidelberg via B4 Relay
2026-11-30  0:13 ` [PATCH v8 6/9] arm64: dts: qcom: sdm845-xiaomi-beryllium: " David Heidelberg via B4 Relay
2026-11-30  0:13 ` [PATCH v8 7/9] arm64: dts: qcom: sdm845-shift-axolotl: " David Heidelberg via B4 Relay
2026-11-30  0:13 ` [PATCH v8 8/9] arm64: dts: qcom: pm660: Add haptics node David Heidelberg via B4 Relay
2026-11-30 15:21   ` Andrey Derkach
2026-11-30  0:13 ` [PATCH v8 9/9] arm64: dts: qcom: sdm660-xiaomi-lavender: Enable haptics David Heidelberg via B4 Relay
2026-11-30 10:38   ` Alexey Minnekhanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fc9d0000-5a7f-4b1e-8ec9-3cefd185350f@ixit.cz \
    --to=david@ixit.cz \
    --cc=abelvesa@kernel.org \
    --cc=andersson@kernel.org \
    --cc=casey@connolly.tech \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=fenglin.wu@oss.qualcomm.com \
    --cc=kamal.wadhwa@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mfd@lists.linux.dev \
    --cc=phone-devel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=subbaraman.narayanamurthy@oss.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox