diff options
author | Steve Twiss <stwiss.opensource@diasemi.com> | 2016-11-14 08:22:45 +0000 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2016-12-16 06:53:55 -0800 |
commit | 72106c1894aa4e26ab403282cc7617fcb07d3d4d (patch) | |
tree | 41335fc806f109080dabd8a97c9f628b3ba52a01 /drivers/watchdog/da9062_wdt.c | |
parent | bb79036215e2ca9d7ef5bd1461981396989c40da (diff) | |
download | linux-72106c1894aa4e26ab403282cc7617fcb07d3d4d.tar.bz2 |
watchdog: da9062/61: watchdog driver
The of_device_id match array is added to support "dlg,da9062-watchdog"
as a valid .compatible string. A MODULE_DEVICE_TABLE() macro is added.
This patch assumes the use of a DA9062 fallback compatible string for the
DTS to pick up the DA9062 device driver for use with the DA9061 watchdog
hardware
Copyright header is updated to add DA9061 in its description and the module
description macro is extended to include DA9061.
Kconfig is updated to reflect support for DA9061/62.
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/watchdog/da9062_wdt.c')
-rw-r--r-- | drivers/watchdog/da9062_wdt.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/watchdog/da9062_wdt.c b/drivers/watchdog/da9062_wdt.c index 7386111220d5..a02cee6820a1 100644 --- a/drivers/watchdog/da9062_wdt.c +++ b/drivers/watchdog/da9062_wdt.c @@ -1,5 +1,5 @@ /* - * da9062_wdt.c - WDT device driver for DA9062 + * Watchdog device driver for DA9062 and DA9061 PMICs * Copyright (C) 2015 Dialog Semiconductor Ltd. * * This program is free software; you can redistribute it and/or @@ -188,6 +188,13 @@ static const struct watchdog_ops da9062_watchdog_ops = { .set_timeout = da9062_wdt_set_timeout, }; +static const struct of_device_id da9062_compatible_id_table[] = { + { .compatible = "dlg,da9062-watchdog", }, + { }, +}; + +MODULE_DEVICE_TABLE(of, da9062_compatible_id_table); + static int da9062_wdt_probe(struct platform_device *pdev) { int ret; @@ -244,11 +251,12 @@ static struct platform_driver da9062_wdt_driver = { .remove = da9062_wdt_remove, .driver = { .name = "da9062-watchdog", + .of_match_table = da9062_compatible_id_table, }, }; module_platform_driver(da9062_wdt_driver); MODULE_AUTHOR("S Twiss <stwiss.opensource@diasemi.com>"); -MODULE_DESCRIPTION("WDT device driver for Dialog DA9062"); +MODULE_DESCRIPTION("WDT device driver for Dialog DA9062 and DA9061"); MODULE_LICENSE("GPL"); MODULE_ALIAS("platform:da9062-watchdog"); |