summaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorDamien Riegel <damien.riegel@savoirfairelinux.com>2017-04-04 16:29:59 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-04-05 08:52:39 -0700
commit792ad66839b89802673ec1398161234674638255 (patch)
tree62d82f053c9f46af404b831ac0d30c36d3d4b7a1 /drivers/input
parentd4c7c5c96c9254017a1aff596a1f43b5bcef7bef (diff)
downloadlinux-792ad66839b89802673ec1398161234674638255.tar.gz
linux-792ad66839b89802673ec1398161234674638255.tar.bz2
linux-792ad66839b89802673ec1398161234674638255.zip
Input: pm8xxx-vib - add support for pm8916's vibrator
Add pm8xxx_regs for this PMIC and the device tree match table entry. Signed-off-by: Damien Riegel <damien.riegel@savoirfairelinux.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/misc/Kconfig2
-rw-r--r--drivers/input/misc/pm8xxx-vibrator.c10
2 files changed, 11 insertions, 1 deletions
diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
index 5b6c52210d20..79d0be9885c5 100644
--- a/drivers/input/misc/Kconfig
+++ b/drivers/input/misc/Kconfig
@@ -143,7 +143,7 @@ config INPUT_PM8941_PWRKEY
config INPUT_PM8XXX_VIBRATOR
tristate "Qualcomm PM8XXX vibrator support"
- depends on MFD_PM8XXX
+ depends on MFD_PM8XXX || MFD_SPMI_PMIC
select INPUT_FF_MEMLESS
help
This option enables device driver support for the vibrator
diff --git a/drivers/input/misc/pm8xxx-vibrator.c b/drivers/input/misc/pm8xxx-vibrator.c
index 3dc8ffbc6b9d..7dd1c1fbe42a 100644
--- a/drivers/input/misc/pm8xxx-vibrator.c
+++ b/drivers/input/misc/pm8xxx-vibrator.c
@@ -43,6 +43,15 @@ static const struct pm8xxx_regs pm8058_regs = {
.drv_en_manual_mask = 0xfc,
};
+static struct pm8xxx_regs pm8916_regs = {
+ .enable_addr = 0xc046,
+ .enable_mask = BIT(7),
+ .drv_addr = 0xc041,
+ .drv_mask = 0x1F,
+ .drv_shift = 0,
+ .drv_en_manual_mask = 0,
+};
+
/**
* struct pm8xxx_vib - structure to hold vibrator data
* @vib_input_dev: input device supporting force feedback
@@ -240,6 +249,7 @@ static SIMPLE_DEV_PM_OPS(pm8xxx_vib_pm_ops, pm8xxx_vib_suspend, NULL);
static const struct of_device_id pm8xxx_vib_id_table[] = {
{ .compatible = "qcom,pm8058-vib", .data = &pm8058_regs },
{ .compatible = "qcom,pm8921-vib", .data = &pm8058_regs },
+ { .compatible = "qcom,pm8916-vib", .data = &pm8916_regs },
{ }
};
MODULE_DEVICE_TABLE(of, pm8xxx_vib_id_table);