diff mbox series

Input: max77693-haptic - add device-tree compatible strings

Message ID 20231005114816.1101953-1-m.szyprowski@samsung.com
State Accepted
Commit f737020d24e47d6e8b893a2fee2b43268a6af629
Headers show
Series Input: max77693-haptic - add device-tree compatible strings | expand

Commit Message

Marek Szyprowski Oct. 5, 2023, 11:48 a.m. UTC
Add the needed device-tree compatible strings to the MAX77693 haptic
driver, so it can be automatically loaded when compiled as a kernel
module and given device-tree contains separate (i.e. 'motor-driver')
node under the main PMIC node.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 drivers/input/misc/max77693-haptic.c | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/drivers/input/misc/max77693-haptic.c b/drivers/input/misc/max77693-haptic.c
index 80f4416ffe2f..2a6e713b32f4 100644
--- a/drivers/input/misc/max77693-haptic.c
+++ b/drivers/input/misc/max77693-haptic.c
@@ -412,6 +412,13 @@  static const struct platform_device_id max77693_haptic_id[] = {
 };
 MODULE_DEVICE_TABLE(platform, max77693_haptic_id);
 
+static const struct of_device_id of_max77693_haptic_dt_match[] = {
+	{ .compatible = "maxim,max77693-haptic", },
+	{ .compatible = "maxim,max77843-haptic", },
+	{ /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, of_max77693_haptic_dt_match);
+
 static struct platform_driver max77693_haptic_driver = {
 	.driver		= {
 		.name	= "max77693-haptic",