Re: [PATCH v7 2/2] input: misc: Add Qualcomm SPMI PMIC haptics driver

From: Fenglin Wu

Date: Sun Aug 30 2026 - 20:24:28 EST




On 8/28/2026 8:12 PM, David Heidelberg wrote:
> On 28/08/2026 11:49, Fenglin Wu wrote:
>> Add an initial driver for the Qualcomm PMIH0108 PMIC haptics module,
>> named as HAP530_HV. This module supports several play modes, including
>> DIRECT_PLAY, FIFO, PAT_MEM, and SWR, each with distinct data sourcing
>> and hardware data handling logic. Currently, the driver provides support
>> for two play modes using the input force-feedback framework: FF_CONSTANT
>> effect for DIRECT_PLAY mode and FF_PERIODIC effect with FF_CUSTOM
>> waveform for FIFO mode.
>>
>> Assisted-by: Claude:claude-4-8-opus
>> Signed-off-by: Fenglin Wu <fenglin.wu@xxxxxxxxxxxxxxxx>
>> ---
>> drivers/input/misc/Kconfig | 11 +
>> drivers/input/misc/Makefile | 1 +
>> drivers/input/misc/qcom-spmi-haptics.c | 1251 ++++++++++++++++++++++++++++++++
>> 3 files changed, 1263 insertions(+)
>>
>
> [...]
>
>> +
>> +static const struct of_device_id qcom_haptics_of_match[] = {
>> + { .compatible = "qcom,spmi-haptics" },
>
> Hello Fenglin.
>
> Same comment as for v6. As you mentioned, this driver won't work for:
>
> compatible = "qcom,pmi8998-haptics", "qcom,spmi-haptics";
>
> which I'll be upstreaming soon, can you please use device specific compatibles
> here, thus listing the devices which will work? e.g. qcom,pmih0108-haptics or
> any other you tested?
>
> Thanks
> David

Hi David,

Like I mentioned, currently this driver is only supporting pmih0108 PMIC
haptics but it would be easily tweaked to support other haptics modules
inside pm8350, pm8550b etc, as they are having very similar HW design.
PMI8998 is an exception in which the haptics HW design is very different
from the ones that we have in the newer PMICs, so I would suggest to
treat it specifically. What compatible will you have to support pmi8998
haptics?

Thanks
Fenglin
>
>> + { }
>> +};
>> +MODULE_DEVICE_TABLE(of, qcom_haptics_of_match);
>> +
>> +static struct platform_driver qcom_haptics_driver = {
>> + .probe = qcom_haptics_probe,
>> + .driver = {
>> + .name = "qcom-spmi-haptics",
>> + .of_match_table = qcom_haptics_of_match,
>> + .pm = pm_ptr(&qcom_haptics_pm_ops),
>> + },
>> +};
>> +module_platform_driver(qcom_haptics_driver);
>> +
>> +MODULE_DESCRIPTION("Qualcomm SPMI PMIC Haptics driver");
>> +MODULE_LICENSE("GPL");
>>
>