From: Nikita Shubin Date: Wed, 26 May 2021 11:54:13 +0000 (+0300) Subject: pwm: ep93xx: add DT support for Cirrus EP93xx X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=0e4cefd6cf9a47fa3503e1dac2ed25f6b82c3aa2;p=linux.git pwm: ep93xx: add DT support for Cirrus EP93xx - find register range from the device tree - provide clock access via of Signed-off-by: Nikita Shubin --- diff --git a/drivers/pwm/pwm-ep93xx.c b/drivers/pwm/pwm-ep93xx.c index c45a75e65c869..0f75feaa04efe 100644 --- a/drivers/pwm/pwm-ep93xx.c +++ b/drivers/pwm/pwm-ep93xx.c @@ -17,6 +17,7 @@ */ #include +#include #include #include #include @@ -190,9 +191,18 @@ static int ep93xx_pwm_probe(struct platform_device *pdev) return 0; } +#ifdef CONFIG_OF +static const struct of_device_id ep93xx_pwm_of_ids[] = { + { .compatible = "cirrus,ep93xx-pwm" }, + {}, +}; +MODULE_DEVICE_TABLE(of, ep93xx_pwm_of_ids); +#endif + static struct platform_driver ep93xx_pwm_driver = { .driver = { .name = "ep93xx-pwm", + .of_match_table = of_match_ptr(ep93xx_pwm_of_ids), }, .probe = ep93xx_pwm_probe, };