summaryrefslogtreecommitdiff
path: root/drivers/watchdog/menz69_wdt.c
AgeCommit message (Collapse)Author
2023-08-13watchdog: menz069_wdt: Remove redundant initialization owner in men_z069_driverLi Zetao
The module_mcb_driver() will set "THIS_MODULE" to driver.owner when register a mcb_driver driver, so it is redundant initialization to set driver.owner in men_z069_driver statement. Remove it for clean code. Signed-off-by: Li Zetao <lizetao1@huawei.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20230804100617.100251-1-lizetao1@huawei.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
2023-04-22watchdog: menz069_wdt: fix timeout settingJohannes Thumshirn
When setting the timeout for the menz069_wdt watchdog driver, we erroneously read from the 'watchdog value register' (WVR) instead of the 'watchdog timer register' (WTR) and then write the value back into WTR. This can potentially lead to wrong timeouts and wrong enable bit settings. Signed-off-by: Johannes Thumshirn <jth@kernel.org> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20230418172531.177349-3-jth@kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
2023-04-22watchdog: menz069_wdt: fix watchdog initialisationJohannes Thumshirn
Doing a 'cat /dev/watchdog0' with menz069_wdt as watchdog0 will result in a NULL pointer dereference. This happens because we're passing the wrong pointer to watchdog_register_device(). Fix this by getting rid of the static watchdog_device structure and use the one embedded into the driver's per-instance private data. Signed-off-by: Johannes Thumshirn <jth@kernel.org> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20230418172531.177349-2-jth@kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
2019-11-03drivers: mcb: use symbol namespacesJohannes Thumshirn
Now that we have symbol namespaces, use them in MCB to not pollute the default namespace with MCB internals. Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Jessica Yu <jeyu@kernel.org> Reviewed-by: Michael Moese <mmoese@suse.de> Link: https://lore.kernel.org/r/20191016100158.1400-1-jthumshirn@suse.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02watchdog: add driver for the MEN 16z069 IP-CoreJohannes Thumshirn
Add a driver for the MEN 16z069 Watchdog and Reset Controller IP-Core. Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Michael Moese <mmoese@suse.de> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>