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>

authored by Steve Twiss and committed by Guenter Roeck 72106c18 bb790362

+12 -4
+2 -2
drivers/watchdog/Kconfig
··· 104 This driver can be built as a module. The module name is da9063_wdt. 105 106 config DA9062_WATCHDOG 107 - tristate "Dialog DA9062 Watchdog" 108 depends on MFD_DA9062 109 select WATCHDOG_CORE 110 help 111 - Support for the watchdog in the DA9062 PMIC. 112 113 This driver can be built as a module. The module name is da9062_wdt. 114
··· 104 This driver can be built as a module. The module name is da9063_wdt. 105 106 config DA9062_WATCHDOG 107 + tristate "Dialog DA9062/61 Watchdog" 108 depends on MFD_DA9062 109 select WATCHDOG_CORE 110 help 111 + Support for the watchdog in the DA9062 and DA9061 PMICs. 112 113 This driver can be built as a module. The module name is da9062_wdt. 114
+10 -2
drivers/watchdog/da9062_wdt.c
··· 1 /* 2 - * da9062_wdt.c - WDT device driver for DA9062 3 * Copyright (C) 2015 Dialog Semiconductor Ltd. 4 * 5 * This program is free software; you can redistribute it and/or ··· 188 .set_timeout = da9062_wdt_set_timeout, 189 }; 190 191 static int da9062_wdt_probe(struct platform_device *pdev) 192 { 193 int ret; ··· 251 .remove = da9062_wdt_remove, 252 .driver = { 253 .name = "da9062-watchdog", 254 }, 255 }; 256 module_platform_driver(da9062_wdt_driver); 257 258 MODULE_AUTHOR("S Twiss <stwiss.opensource@diasemi.com>"); 259 - MODULE_DESCRIPTION("WDT device driver for Dialog DA9062"); 260 MODULE_LICENSE("GPL"); 261 MODULE_ALIAS("platform:da9062-watchdog");
··· 1 /* 2 + * Watchdog device driver for DA9062 and DA9061 PMICs 3 * Copyright (C) 2015 Dialog Semiconductor Ltd. 4 * 5 * This program is free software; you can redistribute it and/or ··· 188 .set_timeout = da9062_wdt_set_timeout, 189 }; 190 191 + static const struct of_device_id da9062_compatible_id_table[] = { 192 + { .compatible = "dlg,da9062-watchdog", }, 193 + { }, 194 + }; 195 + 196 + MODULE_DEVICE_TABLE(of, da9062_compatible_id_table); 197 + 198 static int da9062_wdt_probe(struct platform_device *pdev) 199 { 200 int ret; ··· 244 .remove = da9062_wdt_remove, 245 .driver = { 246 .name = "da9062-watchdog", 247 + .of_match_table = da9062_compatible_id_table, 248 }, 249 }; 250 module_platform_driver(da9062_wdt_driver); 251 252 MODULE_AUTHOR("S Twiss <stwiss.opensource@diasemi.com>"); 253 + MODULE_DESCRIPTION("WDT device driver for Dialog DA9062 and DA9061"); 254 MODULE_LICENSE("GPL"); 255 MODULE_ALIAS("platform:da9062-watchdog");