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