From: Nikita Shubin Date: Sat, 19 Nov 2022 09:09:09 +0000 (+0300) Subject: input: keypad: ep93xx: add DT support for Cirrus EP93xx X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a47b5ef30b359d66bb6d5acfec025885f35cad96;p=linux.git 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 --- diff --git a/drivers/input/keyboard/ep93xx_keypad.c b/drivers/input/keyboard/ep93xx_keypad.c index 55075addcac26..bf77754fa4c7b 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,17 @@ static int ep93xx_keypad_remove(struct platform_device *pdev) return 0; } +static const struct of_device_id ep93xx_keypad_of_ids[] = { + { .compatible = "cirrus,ep9301-keypad" }, + {}, +}; +MODULE_DEVICE_TABLE(of, ep93xx_keypad_of_ids); + static struct platform_driver ep93xx_keypad_driver = { .driver = { .name = "ep93xx-keypad", .pm = pm_sleep_ptr(&ep93xx_keypad_pm_ops), + .of_match_table = ep93xx_keypad_of_ids, }, .probe = ep93xx_keypad_probe, .remove = ep93xx_keypad_remove,