Skip to content

Commit e6cc0b5

Browse files
committed
Merge tag 'linux-watchdog-5.20-rc1' of git://www.linux-watchdog.org/linux-watchdog
Pull watchdog updates from Wim Van Sebroeck: - add RTL9310 support - sp805_wdt: add arm cmsdk apb wdt support - Remove #ifdef guards for PM related functions for several watchdog device drivers - pm8916_wdt reboot improvements - Several other fixes and improvements * tag 'linux-watchdog-5.20-rc1' of git://www.linux-watchdog.org/linux-watchdog: (24 commits) watchdog: armada_37xx_wdt: check the return value of devm_ioremap() in armada_37xx_wdt_probe() watchdog: dw_wdt: Fix comment typo watchdog: Fix comment typo dt-bindings: watchdog: Add fsl,scu-wdt yaml file watchdog:Fix typo in comment watchdog: pm8916_wdt: Handle watchdog enabled by bootloader watchdog: pm8916_wdt: Report reboot reason watchdog: pm8916_wdt: Avoid read of write-only PET register watchdog: wdat_wdt: Remove #ifdef guards for PM related functions watchdog: tegra_wdt: Remove #ifdef guards for PM related functions watchdog: st_lpc_wdt: Remove #ifdef guards for PM related functions watchdog: sama5d4_wdt: Remove #ifdef guards for PM related functions watchdog: s3c2410_wdt: Remove #ifdef guards for PM related functions watchdog: mtk_wdt: Remove #ifdef guards for PM related functions watchdog: dw_wdt: Remove #ifdef guards for PM related functions watchdog: bcm7038_wdt: Remove #ifdef guards for PM related functions watchdog: realtek-otto: add RTL9310 support dt-bindings: watchdog: realtek,otto-wdt: add RTL9310 watchdog: sp805_wdt: add arm cmsdk apb wdt support watchdog: sp5100_tco: Fix a memory leak of EFCH MMIO resource ...
2 parents 507f811 + 2d27e52 commit e6cc0b5

19 files changed

+80
-57
lines changed

Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ properties:
2424
- qcom,apss-wdt-sc8280xp
2525
- qcom,apss-wdt-sdm845
2626
- qcom,apss-wdt-sdx55
27+
- qcom,apss-wdt-sdx65
2728
- qcom,apss-wdt-sm6350
2829
- qcom,apss-wdt-sm8150
2930
- qcom,apss-wdt-sm8250

Documentation/devicetree/bindings/watchdog/realtek,otto-wdt.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ properties:
2929
- realtek,rtl8380-wdt
3030
- realtek,rtl8390-wdt
3131
- realtek,rtl9300-wdt
32+
- realtek,rtl9310-wdt
3233

3334
reg:
3435
maxItems: 1

drivers/watchdog/armada_37xx_wdt.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,8 @@ static int armada_37xx_wdt_probe(struct platform_device *pdev)
274274
if (!res)
275275
return -ENODEV;
276276
dev->reg = devm_ioremap(&pdev->dev, res->start, resource_size(res));
277+
if (!dev->reg)
278+
return -ENOMEM;
277279

278280
/* init clock */
279281
dev->clk = devm_clk_get(&pdev->dev, NULL);

drivers/watchdog/bcm7038_wdt.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ static int bcm7038_wdt_probe(struct platform_device *pdev)
192192
return 0;
193193
}
194194

195-
#ifdef CONFIG_PM_SLEEP
196195
static int bcm7038_wdt_suspend(struct device *dev)
197196
{
198197
struct bcm7038_watchdog *wdt = dev_get_drvdata(dev);
@@ -212,10 +211,9 @@ static int bcm7038_wdt_resume(struct device *dev)
212211

213212
return 0;
214213
}
215-
#endif
216214

217-
static SIMPLE_DEV_PM_OPS(bcm7038_wdt_pm_ops, bcm7038_wdt_suspend,
218-
bcm7038_wdt_resume);
215+
static DEFINE_SIMPLE_DEV_PM_OPS(bcm7038_wdt_pm_ops,
216+
bcm7038_wdt_suspend, bcm7038_wdt_resume);
219217

220218
static const struct of_device_id bcm7038_wdt_match[] = {
221219
{ .compatible = "brcm,bcm6345-wdt" },
@@ -236,7 +234,7 @@ static struct platform_driver bcm7038_wdt_driver = {
236234
.driver = {
237235
.name = "bcm7038-wdt",
238236
.of_match_table = bcm7038_wdt_match,
239-
.pm = &bcm7038_wdt_pm_ops,
237+
.pm = pm_sleep_ptr(&bcm7038_wdt_pm_ops),
240238
}
241239
};
242240
module_platform_driver(bcm7038_wdt_driver);

drivers/watchdog/booke_wdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ static unsigned long long period_to_sec(unsigned int period)
7474
/*
7575
* This procedure will find the highest period which will give a timeout
7676
* greater than the one required. e.g. for a bus speed of 66666666 and
77-
* and a parameter of 2 secs, then this procedure will return a value of 38.
77+
* a parameter of 2 secs, then this procedure will return a value of 38.
7878
*/
7979
static unsigned int sec_to_period(unsigned int secs)
8080
{

drivers/watchdog/dw_wdt.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ static int dw_wdt_set_timeout(struct watchdog_device *wdd, unsigned int top_s)
218218

219219
/*
220220
* Set the new value in the watchdog. Some versions of dw_wdt
221-
* have have TOPINIT in the TIMEOUT_RANGE register (as per
221+
* have TOPINIT in the TIMEOUT_RANGE register (as per
222222
* CP_WDT_DUAL_TOP in WDT_COMP_PARAMS_1). On those we
223223
* effectively get a pat of the watchdog right here.
224224
*/
@@ -375,7 +375,6 @@ static irqreturn_t dw_wdt_irq(int irq, void *devid)
375375
return IRQ_HANDLED;
376376
}
377377

378-
#ifdef CONFIG_PM_SLEEP
379378
static int dw_wdt_suspend(struct device *dev)
380379
{
381380
struct dw_wdt *dw_wdt = dev_get_drvdata(dev);
@@ -410,9 +409,8 @@ static int dw_wdt_resume(struct device *dev)
410409

411410
return 0;
412411
}
413-
#endif /* CONFIG_PM_SLEEP */
414412

415-
static SIMPLE_DEV_PM_OPS(dw_wdt_pm_ops, dw_wdt_suspend, dw_wdt_resume);
413+
static DEFINE_SIMPLE_DEV_PM_OPS(dw_wdt_pm_ops, dw_wdt_suspend, dw_wdt_resume);
416414

417415
/*
418416
* In case if DW WDT IP core is synthesized with fixed TOP feature disabled the
@@ -710,7 +708,7 @@ static struct platform_driver dw_wdt_driver = {
710708
.driver = {
711709
.name = "dw_wdt",
712710
.of_match_table = of_match_ptr(dw_wdt_of_match),
713-
.pm = &dw_wdt_pm_ops,
711+
.pm = pm_sleep_ptr(&dw_wdt_pm_ops),
714712
},
715713
};
716714

drivers/watchdog/f71808e_wdt.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,9 @@ static int __init fintek_wdt_init(void)
634634

635635
pdata.type = ret;
636636

637-
platform_driver_register(&fintek_wdt_driver);
637+
ret = platform_driver_register(&fintek_wdt_driver);
638+
if (ret)
639+
return ret;
638640

639641
wdt_res.name = "superio port";
640642
wdt_res.flags = IORESOURCE_IO;

drivers/watchdog/max77620_wdt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Copyright (C) 2022 Luca Ceresoli
77
*
88
* Author: Laxman Dewangan <[email protected]>
9-
* Author: Luca Ceresoli <luca@lucaceresoli.net>
9+
* Author: Luca Ceresoli <luca[email protected]>
1010
*/
1111

1212
#include <linux/err.h>
@@ -260,5 +260,5 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started "
260260
"(default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
261261

262262
MODULE_AUTHOR("Laxman Dewangan <[email protected]>");
263-
MODULE_AUTHOR("Luca Ceresoli <luca@lucaceresoli.net>");
263+
MODULE_AUTHOR("Luca Ceresoli <luca[email protected]>");
264264
MODULE_LICENSE("GPL v2");

drivers/watchdog/mtk_wdt.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,6 @@ static int mtk_wdt_probe(struct platform_device *pdev)
401401
return 0;
402402
}
403403

404-
#ifdef CONFIG_PM_SLEEP
405404
static int mtk_wdt_suspend(struct device *dev)
406405
{
407406
struct mtk_wdt_dev *mtk_wdt = dev_get_drvdata(dev);
@@ -423,7 +422,6 @@ static int mtk_wdt_resume(struct device *dev)
423422

424423
return 0;
425424
}
426-
#endif
427425

428426
static const struct of_device_id mtk_wdt_dt_ids[] = {
429427
{ .compatible = "mediatek,mt2712-wdt", .data = &mt2712_data },
@@ -437,16 +435,14 @@ static const struct of_device_id mtk_wdt_dt_ids[] = {
437435
};
438436
MODULE_DEVICE_TABLE(of, mtk_wdt_dt_ids);
439437

440-
static const struct dev_pm_ops mtk_wdt_pm_ops = {
441-
SET_SYSTEM_SLEEP_PM_OPS(mtk_wdt_suspend,
442-
mtk_wdt_resume)
443-
};
438+
static DEFINE_SIMPLE_DEV_PM_OPS(mtk_wdt_pm_ops,
439+
mtk_wdt_suspend, mtk_wdt_resume);
444440

445441
static struct platform_driver mtk_wdt_driver = {
446442
.probe = mtk_wdt_probe,
447443
.driver = {
448444
.name = DRV_NAME,
449-
.pm = &mtk_wdt_pm_ops,
445+
.pm = pm_sleep_ptr(&mtk_wdt_pm_ops),
450446
.of_match_table = mtk_wdt_dt_ids,
451447
},
452448
};

drivers/watchdog/pc87413_wdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ static long pc87413_ioctl(struct file *file, unsigned int cmd,
442442
}
443443
}
444444

445-
/* -- Notifier funtions -----------------------------------------*/
445+
/* -- Notifier functions -----------------------------------------*/
446446

447447
/**
448448
* pc87413_notify_sys:

0 commit comments

Comments
 (0)