Skip to content

Commit

Permalink
watchdog: db8500_wdt: Rename symbols
Browse files Browse the repository at this point in the history
For conistency and clarity, rename all symbols and strings from
ux500 to db8500 in the driver.

Cc: Lee Jones <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Acked-by: Lee Jones <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
Signed-off-by: Wim Van Sebroeck <[email protected]>
  • Loading branch information
linusw authored and Wim Van Sebroeck committed Nov 1, 2021
1 parent d0305aa commit c738888
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 39 deletions.
2 changes: 1 addition & 1 deletion drivers/mfd/db8500-prcmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2939,7 +2939,7 @@ static struct regulator_init_data db8500_regulators[DB8500_NUM_REGULATORS] = {
};

static const struct mfd_cell common_prcmu_devs[] = {
MFD_CELL_NAME("ux500_wdt"),
MFD_CELL_NAME("db8500_wdt"),
MFD_CELL_NAME("db8500-cpuidle"),
};

Expand Down
76 changes: 38 additions & 38 deletions drivers/watchdog/db8500_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,68 +35,68 @@ MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__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);
}

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);
}

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);
}

static int ux500_wdt_set_timeout(struct watchdog_device *wdd,
static int db8500_wdt_set_timeout(struct watchdog_device *wdd,
unsigned int timeout)
{
ux500_wdt_stop(wdd);
db8500_wdt_stop(wdd);
prcmu_load_a9wdog(PRCMU_WDOG_ALL, timeout * 1000);
ux500_wdt_start(wdd);
db8500_wdt_start(wdd);

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,
.identity = "Ux500 WDT",
.identity = "DB8500 WDT",
.firmware_version = 1,
};

static const struct watchdog_ops ux500_wdt_ops = {
static const struct watchdog_ops db8500_wdt_ops = {
.owner = THIS_MODULE,
.start = ux500_wdt_start,
.stop = ux500_wdt_stop,
.ping = ux500_wdt_keepalive,
.set_timeout = ux500_wdt_set_timeout,
.start = db8500_wdt_start,
.stop = db8500_wdt_stop,
.ping = db8500_wdt_keepalive,
.set_timeout = db8500_wdt_set_timeout,
};

static struct watchdog_device ux500_wdt = {
.info = &ux500_wdt_info,
.ops = &ux500_wdt_ops,
static struct watchdog_device db8500_wdt = {
.info = &db8500_wdt_info,
.ops = &db8500_wdt_ops,
.min_timeout = WATCHDOG_MIN,
.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;
int ret;

timeout = 600; /* Default to 10 minutes */
ux500_wdt.parent = dev;
watchdog_set_nowayout(&ux500_wdt, nowayout);
db8500_wdt.parent = dev;
watchdog_set_nowayout(&db8500_wdt, nowayout);

/* disable auto off on sleep */
prcmu_config_a9wdog(PRCMU_WDOG_CPU1, false);

/* set HW initial value */
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)
return ret;

Expand All @@ -106,47 +106,47 @@ static int ux500_wdt_probe(struct platform_device *pdev)
}

#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)
{
if (watchdog_active(&ux500_wdt)) {
ux500_wdt_stop(&ux500_wdt);
if (watchdog_active(&db8500_wdt)) {
db8500_wdt_stop(&db8500_wdt);
prcmu_config_a9wdog(PRCMU_WDOG_CPU1, true);

prcmu_load_a9wdog(PRCMU_WDOG_ALL, timeout * 1000);
ux500_wdt_start(&ux500_wdt);
db8500_wdt_start(&db8500_wdt);
}
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)) {
ux500_wdt_stop(&ux500_wdt);
if (watchdog_active(&db8500_wdt)) {
db8500_wdt_stop(&db8500_wdt);
prcmu_config_a9wdog(PRCMU_WDOG_CPU1, false);

prcmu_load_a9wdog(PRCMU_WDOG_ALL, timeout * 1000);
ux500_wdt_start(&ux500_wdt);
db8500_wdt_start(&db8500_wdt);
}
return 0;
}
#else
#define ux500_wdt_suspend NULL
#define ux500_wdt_resume NULL
#define db8500_wdt_suspend NULL
#define db8500_wdt_resume NULL
#endif

static struct platform_driver ux500_wdt_driver = {
.probe = ux500_wdt_probe,
.suspend = ux500_wdt_suspend,
.resume = ux500_wdt_resume,
static struct platform_driver db8500_wdt_driver = {
.probe = db8500_wdt_probe,
.suspend = db8500_wdt_suspend,
.resume = db8500_wdt_resume,
.driver = {
.name = "ux500_wdt",
.name = "db8500_wdt",
},
};

module_platform_driver(ux500_wdt_driver);
module_platform_driver(db8500_wdt_driver);

MODULE_AUTHOR("Jonas Aaberg <[email protected]>");
MODULE_DESCRIPTION("Ux500 Watchdog Driver");
MODULE_DESCRIPTION("DB8500 Watchdog Driver");
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:ux500_wdt");
MODULE_ALIAS("platform:db8500_wdt");

0 comments on commit c738888

Please sign in to comment.