summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/intel-mid_wdt.c
Commit message (Collapse)AuthorAgeFilesLines
* watchdog: intel-mid_wdt: Keep watchdog runningAndy Shevchenko2017-06-051-2/+15
| | | | | | | | | | | | | | Firmware followed by bootloader leaves watchdog running. Keep it running in the driver. User will not need any additional options to reboot in case of panic during boot. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: intel-mid_wdt: Convert to use device managed functionsGuenter Roeck2017-02-241-10/+1
| | | | | | | | | | | | | | | | | | Use device managed functions to simplify error handling, reduce source code size, improve readability, and reduce the likelyhood of bugs. The conversion was done automatically with coccinelle using the following semantic patches. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches - Drop assignments to otherwise unused variables - Drop remove function - Drop platform_set_drvdata() - Use devm_watchdog_register_driver() to register watchdog device Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* intel-mid_wdt: Error code is just an integerAndy Shevchenko2016-12-161-11/+8
| | | | | | | | | | | | | | | | Error code when printed is more readable if it's represented as plain decimal integer. Otherwise user will see something like intel_mid_wdt: Error stopping watchdog: 0xffffffed which is not quite understandable ("Should I interpret it as a bitfield?"). Make it clear to use plaint integer specifier. While here, move struct device *dev local variable definition to the top of functions. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* intel-mid_wdt: make sure watchdog is not running at startupAndy Shevchenko2016-12-161-0/+3
| | | | | | | | | Make sure that the watchdog is not running after loading and before it is started by opening /dev/watchdog. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* watchdog: intel-mid: add Magic Closure flagDavid Cohen2015-10-281-1/+1
| | | | | | | | | | Adding WDIOF_MAGICCLOSE to Intel MID watchdog driver. Once the watchdog is opened, it makes sense to disable watchdog only if it was gracefully released. Signed-off-by: David Cohen <david.a.cohen@linux.intel.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* Watchdog: Fix parent of watchdog_devicesPratyush Anand2015-09-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | /sys/class/watchdog/watchdogn/device/modalias can help to identify the driver/module for a given watchdog node. However, many wdt devices do not set their parent and so, we do not see an entry for device in sysfs for such devices. This patch fixes parent of watchdog_device so that /sys/class/watchdog/watchdogn/device is populated. Exceptions: booke, diag288, octeon, softdog and w83627hf -- They do not have any parent. Not sure, how we can identify driver for these devices. Signed-off-by: Pratyush Anand <panand@redhat.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Acked-by: Guenter Roeck <linux@roeck-us.net> Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Lee Jones <lee.jones@linaro.org> Acked-by: Lubomir Rintel <lkundrak@v3.sk> Acked-by: Maxime Coquelin <maxime.coquelin@st.com> Acked-by: Thierry Reding <treding@nvidia.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: drop owner assignment from platform_driversWolfram Sang2014-10-201-1/+0
| | | | | | | A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* watchdog: add Intel MID watchdog driver supportDavid Cohen2014-06-101-0/+184
Add initial Intel MID watchdog driver support. This driver is an initial implementation of generic Intel MID watchdog driver. Currently it supports Intel Merrifield platform. Signed-off-by: Eric Ernst <eric.ernst@intel.com> Signed-off-by: David Cohen <david.a.cohen@linux.intel.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
OpenPOWER on IntegriCloud