input: pm8xxx-vibrator: refactor to support new SPMI vibrator
authorFenglin Wu <quic_fenglinw@quicinc.com>
Tue, 16 Apr 2024 02:44:32 +0000 (10:44 +0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 17 Apr 2024 22:27:12 +0000 (15:27 -0700)
commit6d84ec254a2283c7a97a89b0dbdc4a6854bf395f
treed8fd38cc2d2d30b0ebcf91d974ab67293fd14ea9
parent48c0687a322d54ac7e7a685c0b6db78d78f593af
input: pm8xxx-vibrator: refactor to support new SPMI vibrator

Currently, vibrator control register addresses are hard coded,
including the base address and offsets, it's not flexible to
support new SPMI vibrator module which is usually included in
different PMICs with different base address. Refactor it by using
the base address defined in devicetree.

Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240416-pm8xxx-vibrator-new-design-v11-1-7b1c951e1515@quicinc.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/pm8xxx-vibrator.c