Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'linux-watchdog-5.6-rc3' of git://www.linux-watchdog.org/linux-watchdog

Pull watchdog fixes from Wim Van Sebroeck:

- mtk_wdt needs RESET_CONTROLLER to build

- da9062 driver fixes:
- fix power management ops
- do not ping the hw during stop()
- add dependency on I2C

* tag 'linux-watchdog-5.6-rc3' of git://www.linux-watchdog.org/linux-watchdog:
watchdog: da9062: Add dependency on I2C
watchdog: da9062: fix power management ops
watchdog: da9062: do not ping the hw during stop()
watchdog: fix mtk_wdt.c RESET_CONTROLLER build error

+14 -7
+2
drivers/watchdog/Kconfig
··· 207 207 config DA9062_WATCHDOG 208 208 tristate "Dialog DA9062/61 Watchdog" 209 209 depends on MFD_DA9062 || COMPILE_TEST 210 + depends on I2C 210 211 select WATCHDOG_CORE 211 212 help 212 213 Support for the watchdog in the DA9062 and DA9061 PMICs. ··· 842 841 tristate "Mediatek SoCs watchdog support" 843 842 depends on ARCH_MEDIATEK || COMPILE_TEST 844 843 select WATCHDOG_CORE 844 + select RESET_CONTROLLER 845 845 help 846 846 Say Y here to include support for the watchdog timer 847 847 in Mediatek SoCs.
+12 -7
drivers/watchdog/da9062_wdt.c
··· 16 16 #include <linux/jiffies.h> 17 17 #include <linux/mfd/da9062/registers.h> 18 18 #include <linux/mfd/da9062/core.h> 19 + #include <linux/property.h> 19 20 #include <linux/regmap.h> 20 21 #include <linux/of.h> 21 22 ··· 32 31 struct da9062_watchdog { 33 32 struct da9062 *hw; 34 33 struct watchdog_device wdtdev; 34 + bool use_sw_pm; 35 35 }; 36 36 37 37 static unsigned int da9062_wdt_timeout_to_sel(unsigned int secs) ··· 96 94 { 97 95 struct da9062_watchdog *wdt = watchdog_get_drvdata(wdd); 98 96 int ret; 99 - 100 - ret = da9062_reset_watchdog_timer(wdt); 101 - if (ret) { 102 - dev_err(wdt->hw->dev, "Failed to ping the watchdog (err = %d)\n", 103 - ret); 104 - return ret; 105 - } 106 97 107 98 ret = regmap_update_bits(wdt->hw->regmap, 108 99 DA9062AA_CONTROL_D, ··· 195 200 if (!wdt) 196 201 return -ENOMEM; 197 202 203 + wdt->use_sw_pm = device_property_present(dev, "dlg,use-sw-pm"); 204 + 198 205 wdt->hw = chip; 199 206 200 207 wdt->wdtdev.info = &da9062_watchdog_info; ··· 223 226 static int __maybe_unused da9062_wdt_suspend(struct device *dev) 224 227 { 225 228 struct watchdog_device *wdd = dev_get_drvdata(dev); 229 + struct da9062_watchdog *wdt = watchdog_get_drvdata(wdd); 230 + 231 + if (!wdt->use_sw_pm) 232 + return 0; 226 233 227 234 if (watchdog_active(wdd)) 228 235 return da9062_wdt_stop(wdd); ··· 237 236 static int __maybe_unused da9062_wdt_resume(struct device *dev) 238 237 { 239 238 struct watchdog_device *wdd = dev_get_drvdata(dev); 239 + struct da9062_watchdog *wdt = watchdog_get_drvdata(wdd); 240 + 241 + if (!wdt->use_sw_pm) 242 + return 0; 240 243 241 244 if (watchdog_active(wdd)) 242 245 return da9062_wdt_start(wdd);