History log of /drivers/watchdog/mtx-1_wdt.c
Revision Date Author Comments
b8ec61189f3b4cd9d1b2856342f5d7676151d01c 29-Nov-2011 Axel Lin <axel.lin@gmail.com> watchdog: convert drivers/watchdog/* to use module_platform_driver()

This patch converts the drivers in drivers/watchdog/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Nicolas Thill <nico@openwrt.org>
Cc: Florian Fainelli <florian@openwrt.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Paul Cercueil <paul@crapouillou.net>
Cc: Marc Zyngier <maz@misterjones.org>
Cc: Wan ZongShun <mcuos.com@gmail.com>
Cc: Alejandro Cabrera <aldaya@gmail.com>
Cc: "George G. Davis" <gdavis@mvista.com>
Cc: Sylver Bruneau <sylver.bruneau@googlemail.com>
Cc: Vitaly Wool <vital@embeddedalley.com>
Cc: Mika Westerberg <mika.westerberg@iki.fi>
Cc: Timo Kokkonen <timo.t.kokkonen@nokia.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
fad0a9dd0da2dc9971e0e71f41134c791f2030c2 15-Jun-2011 Florian Fainelli <florian@openwrt.org> watchdog: mtx1-wdt: use dev_{err,info} instead of printk()

use dev_{err,info} instead of printk(KERN_{ERR,INFO} ...)

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
db98f89a2807966c6e82601f5c57e1a9c214c91a 15-Jun-2011 Florian Fainelli <florian@openwrt.org> watchdog: mtx1-wdt: fix section mismatch

Fix section mismatch and remove unused variable 'tmp'.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2ea4e76e997019ae25ac3417aa46e31ddf7ecb17 15-Jun-2011 Florian Fainelli <florian@openwrt.org> watchdog: mtx1-wdt: fix GPIO toggling

Commit e391be76 (MIPS: Alchemy: Clean up GPIO registers and accessors)
changed the way the GPIO was toggled. Prior to this patch, we would
always actively drive the GPIO output to either 0 or 1, this patch
drove the GPIO active to 0, and put the GPIO in tristate to drive it
to 1, unfortunately this does not work, revert back to active driving.

Using a signed variable (gstate) to hold the gpio state and using a bit-
wise operation on it also resulted in toggling value from 1 to -2 since
the variable is signed. This value was then passed on to gpio_direction_
output, which always perform a if (value) ... to set the value to the
gpio, so we were always writing a 1 to this GPIO instead of 1 -> 0 -> 1 ...

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Cc: stable <stable@kernel.org>
9b19d40aa3ebaf1078779da10555da2ab8512422 15-Jun-2011 Florian Fainelli <florian@openwrt.org> watchdog: mtx1-wdt: request gpio before using it

Otherwise, the gpiolib autorequest feature will produce a WARN_ON():

WARNING: at drivers/gpio/gpiolib.c:101 0x8020ec6c()
autorequest GPIO-215
[...]

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Cc: stable <stable@kernel.org>
b7f720d68c0042cc8ce496e31a61df79a77f1b48 08-May-2011 Manuel Lauss <manuel.lauss@googlemail.com> MIPS: Alchemy: Clean up GPIO registers and accessors

remove au_readl/au_writel, remove the predefined GPIO1/2 KSEG1 register
addresses and fix the fallout in all boards and drivers.

This also fixes a bug in the mtx-1_wdt driver which was introduced by
commit 6ea8115bb6f359df4f45152f2b40e1d4d1891392
("Convert mtx1 wdt to be a platform device and use generic GPIO API")
before this patch mtx-1_wdt only modified GPIO215, the patch then
used the gpio resource information as bit index into the GPIO2 register
but the conversion to the GPIO API didn't realize that.
With this patch the drivers original behaviour is restored and GPIO15
is left alone.

Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
Cc: Florian Fainelli <florian@openwrt.org>
To: Linux-MIPS <linux-mips@linux-mips.org>
Cc: linux-watchdog@vger.kernel.org
Cc: Wim Van Sebroeck <wim@iguana.be>
Patchwork: https://patchwork.linux-mips.org/patch/2381/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org
5f3b27569fc0286a51f8d0655c7fb4f5b36aea65 23-Feb-2011 Wim Van Sebroeck <wim@iguana.be> watchdog: cleanup spaces before tabs

cleanup spaces before tabs in drivers/watchdog/

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
b6bf291f1c5bc84272a138b7367741e459005a81 14-Apr-2009 Wim Van Sebroeck <wim@iguana.be> [WATCHDOG] move platform probe and remove function to devinit and devexit

A pointer to probe and remove functions is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
143a2e54bf53216674eada16e8953f48b159e08a 18-Mar-2009 Wim Van Sebroeck <wim@iguana.be> [WATCHDOG] More coding-style and trivial clean-up

Some more cleaning-up of the watchdog drivers.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
f80e919bb42c191bbe60ab078a59b30336d11d3b 24-Oct-2008 Florian Fainelli <florian@openwrt.org> [WATCHDOG] fix mtx1_wdt compilation failure

Using spin_lock_irqsave with a local variable called flags without
declaring is a bad idea, fix this by declaring it.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
7944d3a5a70ee5c1904ed1e8b1d71ff0af2854d9 06-Aug-2008 Wim Van Sebroeck <wim@iguana.be> [WATCHDOG] more coding style clean-up's

More coding style clean-up's.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
0c06090c9472db0525cb6fe229c3bea33bbbbb3c 18-Jul-2008 Wim Van Sebroeck <wim@iguana.be> [WATCHDOG] Coding style - Indentation - part 2

This brings the watchdog drivers into line with coding style.
This patch takes cares of the indentation as described in chapter 1.
Main changes:
* Re-structure the ioctl switch call for all drivers as follows:
switch (cmd) {
case WDIOC_GETSUPPORT:
case WDIOC_GETSTATUS:
case WDIOC_GETBOOTSTATUS:
case WDIOC_GETTEMP:
case WDIOC_SETOPTIONS:
case WDIOC_KEEPALIVE:
case WDIOC_SETTIMEOUT:
case WDIOC_GETTIMEOUT:
case WDIOC_GETTIMELEFT:
default:
}

This to make the migration from the drivers to the uniform watchdog
device driver easier in the future.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
ed78c2da14924793310d96fa4b6a8c3a4172f72f 19-May-2008 Alan Cox <alan@redhat.com> [WATCHDOG 28/57] mtx-1_wdt: clean up, coding style, unlocked ioctl

Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
f37d193c7c150c40059c7ce5de34e8b28a9cd4ae 11-Apr-2008 Kay Sievers <kay.sievers@vrfy.org> watchdog: fix platform driver hotplug/coldplug

Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is
prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable watchdog
drivers, to re-enable auto loading.

[dbrownell@users.sourceforge.net: more drivers; registration fixes]
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
996d62d449a7d5e691b0da22b7c877df08c2b0a4 25-Feb-2008 Florian Fainelli <florian.fainelli@telecomint.eu> [WATCHDOG] Remove volatiles from watchdog device structures

Remove the volatile since those are useless in such a structure.

Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
6ea8115bb6f359df4f45152f2b40e1d4d1891392 07-Jan-2008 Florian Fainelli <florian.fainelli@telecomint.eu> [WATCHDOG] Convert mtx1 wdt to be a platform device and use generic GPIO API

This patch converts the MTX-1 to be a platform device, use the available
generic GPIO API for the MTX-1 board and register the miscdev alias.

Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
b47a166ed0baaaa30112532bad41b21e7c5e4d31 22-Jan-2008 Jan Engelhardt <jengelh@computergmbh.de> [WATCHDOG] constify function pointer tables

"static struct file_operations" should be
"static const struct file_operations".

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
b7e04f8c61a46d742de23af5d7ca2b41b33e40ac 17-Aug-2007 Wim Van Sebroeck <wim@iguana.be> mv watchdog tree under drivers

move watchdog tree from drivers/char/watchdog to drivers/watchdog.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>