watchdog: db8500_wdt: Rename symbols

For conistency and clarity, rename all symbols and strings from
ux500 to db8500 in the driver.

Cc: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20210922230947.1864357-3-linus.walleij@linaro.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
This commit is contained in:
Linus Walleij 2021-09-23 01:09:47 +02:00 committed by Wim Van Sebroeck
parent d0305aac8e
commit c738888032
2 changed files with 39 additions and 39 deletions

View File

@ -2939,7 +2939,7 @@ static struct regulator_init_data db8500_regulators[DB8500_NUM_REGULATORS] = {
}; };
static const struct mfd_cell common_prcmu_devs[] = { static const struct mfd_cell common_prcmu_devs[] = {
MFD_CELL_NAME("ux500_wdt"), MFD_CELL_NAME("db8500_wdt"),
MFD_CELL_NAME("db8500-cpuidle"), MFD_CELL_NAME("db8500-cpuidle"),
}; };

View File

@ -35,60 +35,60 @@ MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default=" "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
static int ux500_wdt_start(struct watchdog_device *wdd) static int db8500_wdt_start(struct watchdog_device *wdd)
{ {
return prcmu_enable_a9wdog(PRCMU_WDOG_ALL); return prcmu_enable_a9wdog(PRCMU_WDOG_ALL);
} }
static int ux500_wdt_stop(struct watchdog_device *wdd) static int db8500_wdt_stop(struct watchdog_device *wdd)
{ {
return prcmu_disable_a9wdog(PRCMU_WDOG_ALL); return prcmu_disable_a9wdog(PRCMU_WDOG_ALL);
} }
static int ux500_wdt_keepalive(struct watchdog_device *wdd) static int db8500_wdt_keepalive(struct watchdog_device *wdd)
{ {
return prcmu_kick_a9wdog(PRCMU_WDOG_ALL); return prcmu_kick_a9wdog(PRCMU_WDOG_ALL);
} }
static int ux500_wdt_set_timeout(struct watchdog_device *wdd, static int db8500_wdt_set_timeout(struct watchdog_device *wdd,
unsigned int timeout) unsigned int timeout)
{ {
ux500_wdt_stop(wdd); db8500_wdt_stop(wdd);
prcmu_load_a9wdog(PRCMU_WDOG_ALL, timeout * 1000); prcmu_load_a9wdog(PRCMU_WDOG_ALL, timeout * 1000);
ux500_wdt_start(wdd); db8500_wdt_start(wdd);
return 0; return 0;
} }
static const struct watchdog_info ux500_wdt_info = { static const struct watchdog_info db8500_wdt_info = {
.options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING | WDIOF_MAGICCLOSE, .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING | WDIOF_MAGICCLOSE,
.identity = "Ux500 WDT", .identity = "DB8500 WDT",
.firmware_version = 1, .firmware_version = 1,
}; };
static const struct watchdog_ops ux500_wdt_ops = { static const struct watchdog_ops db8500_wdt_ops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.start = ux500_wdt_start, .start = db8500_wdt_start,
.stop = ux500_wdt_stop, .stop = db8500_wdt_stop,
.ping = ux500_wdt_keepalive, .ping = db8500_wdt_keepalive,
.set_timeout = ux500_wdt_set_timeout, .set_timeout = db8500_wdt_set_timeout,
}; };
static struct watchdog_device ux500_wdt = { static struct watchdog_device db8500_wdt = {
.info = &ux500_wdt_info, .info = &db8500_wdt_info,
.ops = &ux500_wdt_ops, .ops = &db8500_wdt_ops,
.min_timeout = WATCHDOG_MIN, .min_timeout = WATCHDOG_MIN,
.max_timeout = WATCHDOG_MAX28, .max_timeout = WATCHDOG_MAX28,
}; };
static int ux500_wdt_probe(struct platform_device *pdev) static int db8500_wdt_probe(struct platform_device *pdev)
{ {
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
int ret; int ret;
timeout = 600; /* Default to 10 minutes */ timeout = 600; /* Default to 10 minutes */
ux500_wdt.parent = dev; db8500_wdt.parent = dev;
watchdog_set_nowayout(&ux500_wdt, nowayout); watchdog_set_nowayout(&db8500_wdt, nowayout);
/* disable auto off on sleep */ /* disable auto off on sleep */
prcmu_config_a9wdog(PRCMU_WDOG_CPU1, false); prcmu_config_a9wdog(PRCMU_WDOG_CPU1, false);
@ -96,7 +96,7 @@ static int ux500_wdt_probe(struct platform_device *pdev)
/* set HW initial value */ /* set HW initial value */
prcmu_load_a9wdog(PRCMU_WDOG_ALL, timeout * 1000); prcmu_load_a9wdog(PRCMU_WDOG_ALL, timeout * 1000);
ret = devm_watchdog_register_device(dev, &ux500_wdt); ret = devm_watchdog_register_device(dev, &db8500_wdt);
if (ret) if (ret)
return ret; return ret;
@ -106,47 +106,47 @@ static int ux500_wdt_probe(struct platform_device *pdev)
} }
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int ux500_wdt_suspend(struct platform_device *pdev, static int db8500_wdt_suspend(struct platform_device *pdev,
pm_message_t state) pm_message_t state)
{ {
if (watchdog_active(&ux500_wdt)) { if (watchdog_active(&db8500_wdt)) {
ux500_wdt_stop(&ux500_wdt); db8500_wdt_stop(&db8500_wdt);
prcmu_config_a9wdog(PRCMU_WDOG_CPU1, true); prcmu_config_a9wdog(PRCMU_WDOG_CPU1, true);
prcmu_load_a9wdog(PRCMU_WDOG_ALL, timeout * 1000); prcmu_load_a9wdog(PRCMU_WDOG_ALL, timeout * 1000);
ux500_wdt_start(&ux500_wdt); db8500_wdt_start(&db8500_wdt);
} }
return 0; return 0;
} }
static int ux500_wdt_resume(struct platform_device *pdev) static int db8500_wdt_resume(struct platform_device *pdev)
{ {
if (watchdog_active(&ux500_wdt)) { if (watchdog_active(&db8500_wdt)) {
ux500_wdt_stop(&ux500_wdt); db8500_wdt_stop(&db8500_wdt);
prcmu_config_a9wdog(PRCMU_WDOG_CPU1, false); prcmu_config_a9wdog(PRCMU_WDOG_CPU1, false);
prcmu_load_a9wdog(PRCMU_WDOG_ALL, timeout * 1000); prcmu_load_a9wdog(PRCMU_WDOG_ALL, timeout * 1000);
ux500_wdt_start(&ux500_wdt); db8500_wdt_start(&db8500_wdt);
} }
return 0; return 0;
} }
#else #else
#define ux500_wdt_suspend NULL #define db8500_wdt_suspend NULL
#define ux500_wdt_resume NULL #define db8500_wdt_resume NULL
#endif #endif
static struct platform_driver ux500_wdt_driver = { static struct platform_driver db8500_wdt_driver = {
.probe = ux500_wdt_probe, .probe = db8500_wdt_probe,
.suspend = ux500_wdt_suspend, .suspend = db8500_wdt_suspend,
.resume = ux500_wdt_resume, .resume = db8500_wdt_resume,
.driver = { .driver = {
.name = "ux500_wdt", .name = "db8500_wdt",
}, },
}; };
module_platform_driver(ux500_wdt_driver); module_platform_driver(db8500_wdt_driver);
MODULE_AUTHOR("Jonas Aaberg <jonas.aberg@stericsson.com>"); MODULE_AUTHOR("Jonas Aaberg <jonas.aberg@stericsson.com>");
MODULE_DESCRIPTION("Ux500 Watchdog Driver"); MODULE_DESCRIPTION("DB8500 Watchdog Driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:ux500_wdt"); MODULE_ALIAS("platform:db8500_wdt");