From 67baec659dc0757e3aef5a74a8c756064db42a17 Mon Sep 17 00:00:00 2001 From: Nikita Shubin Date: Sat, 19 Nov 2022 12:09:09 +0300 Subject: [PATCH] input: keypad: ep93xx: add DT support for Cirrus EP93xx - get keymap from the device tree - find register range from the device tree - get interrupts from device tree Signed-off-by: Nikita Shubin --- drivers/input/keyboard/ep93xx_keypad.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/input/keyboard/ep93xx_keypad.c b/drivers/input/keyboard/ep93xx_keypad.c index f5bf7524722a7..732e3c010cb6a 100644 --- a/drivers/input/keyboard/ep93xx_keypad.c +++ b/drivers/input/keyboard/ep93xx_keypad.c @@ -20,6 +20,8 @@ #include #include #include +#include +#include #include #include #include @@ -315,10 +317,19 @@ static int ep93xx_keypad_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_OF +static const struct of_device_id ep93xx_keypad_of_ids[] = { + { .compatible = "cirrus,ep93xx-keypad" }, + {}, +}; +MODULE_DEVICE_TABLE(of, ep93xx_keypad_of_ids); +#endif + static struct platform_driver ep93xx_keypad_driver = { .driver = { .name = "ep93xx-keypad", .pm = &ep93xx_keypad_pm_ops, + .of_match_table = of_match_ptr(ep93xx_keypad_of_ids), }, .probe = ep93xx_keypad_probe, .remove = ep93xx_keypad_remove, -- 2.30.2