Thread (4 messages) 4 messages, 2 authors, 2021-06-13

Re: [PATCH 2/4] input: add Qualcomm QPNP haptics driver

From: Bjorn Andersson <hidden>
Date: 2021-06-13 17:12:31
Also in: linux-arm-msm, lkml, phone-devel

On Sun 13 Jun 11:24 CDT 2021, Caleb Connolly wrote:
Hi Bjorn,

Thanks a lot for your feedback.

On 13/06/2021 5:09 am, Bjorn Andersson wrote:
quoted
On Sat 12 Jun 15:54 CDT 2021, Caleb Connolly wrote:
quoted
Add support for the haptics found in pmi8998 and related PMICs.
Based on the ff-memless interface. Currently this driver provides
a partial implementation of hardware features.

This driver only supports LRAs (Linear Resonant Actuators) in the "buffer"
mode with a single wave pattern.

Signed-off-by: Caleb Connolly <redacted>
Please use a cover letter when posting multiple patches.
I'm not sure why the cover letter didn't make it to your inbox, here's a
link:
https://lore.kernel.org/linux-arm-msm/20210612205405.1233588-1-caleb@connolly.tech/ (local)
It arrived later, for some reason. Sorry for the fuzz.
quoted
quoted
---
 drivers/input/misc/Kconfig        |   11 +
 drivers/input/misc/Makefile       |    1 +
 drivers/input/misc/qpnp-haptics.c | 1022 +++++++++++++++++++++++++++++
 3 files changed, 1034 insertions(+)
 create mode 100644 drivers/input/misc/qpnp-haptics.c
diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
index 498cde376981..b5ba03e6cf58 100644
--- a/drivers/input/misc/Kconfig
+++ b/drivers/input/misc/Kconfig
@@ -186,6 +186,17 @@ config INPUT_PMIC8XXX_PWRKEY
 	  To compile this driver as a module, choose M here: the
 	  module will be called pmic8xxx-pwrkey.

+config INPUT_QPNP_HAPTICS
No-one knows what "QPNP" really is, so please name this
"INPUT_QCOM_SPMI_HAPTICS"
quoted
+	tristate "Qualcomm QPNP HAPTICS"
+	depends on ARCH_QCOM
"depends on SPMI" makes sense here.
quoted
+	select INPUT_FF_MEMLESS
+	help
+	  This option enables support for the haptics found in pmi8998 and
+	  related PMICs. Based on the ff-memless interface.
+
+	  To compile this driver as module, choose M here: the
+	  module will be called qpnp-haptics.
+
 config INPUT_SPARCSPKR
 	tristate "SPARC Speaker support"
 	depends on PCI && SPARC64
diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile
index f593beed7e05..c43290163db0 100644
--- a/drivers/input/misc/Makefile
+++ b/drivers/input/misc/Makefile
@@ -65,6 +65,7 @@ obj-$(CONFIG_INPUT_PMIC8XXX_PWRKEY)	+= pmic8xxx-pwrkey.o
 obj-$(CONFIG_INPUT_POWERMATE)		+= powermate.o
 obj-$(CONFIG_INPUT_PWM_BEEPER)		+= pwm-beeper.o
 obj-$(CONFIG_INPUT_PWM_VIBRA)		+= pwm-vibra.o
+obj-$(CONFIG_INPUT_QPNP_HAPTICS)	+= qpnp-haptics.o
 obj-$(CONFIG_INPUT_RAVE_SP_PWRBUTTON)	+= rave-sp-pwrbutton.o
 obj-$(CONFIG_INPUT_RB532_BUTTON)	+= rb532_button.o
 obj-$(CONFIG_INPUT_REGULATOR_HAPTIC)	+= regulator-haptic.o
diff --git a/drivers/input/misc/qpnp-haptics.c b/drivers/input/misc/qpnp-haptics.c
Again, qcom-spmi-haptics.c
quoted
new file mode 100644
index 000000000000..daa7a18ffc7d
--- /dev/null
+++ b/drivers/input/misc/qpnp-haptics.c
@@ -0,0 +1,1022 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2021, Caleb Connolly <caleb@connolly.tech>
+ * Qualcomm Plug and Play haptics driver for pmi8998 and related PMICs.
+ * Based on ./pm8xxx-vibrator.c
Enough "based on" to warrant carrying some copyrights?
Hmm, I only stole the input device parts, so perhaps not.
Then I think you can drop this comment as well.

Regards,
Bjorn
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help