Commit graph

18 commits

Author SHA1 Message Date
Jean Delvare
487722cf2d watchdog: Get rid of MODULE_ALIAS_MISCDEV statements
I just can't find any value in MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR)
and MODULE_ALIAS_MISCDEV(TEMP_MINOR) statements.

Either the device is enumerated and the driver already has a module
alias (e.g. PCI, USB etc.) that will get the right driver loaded
automatically.

Or the device is not enumerated and loading its driver will lead to
more or less intrusive hardware poking. Such hardware poking should be
limited to a bare minimum, so the user should really decide which
drivers should be tried and in what order. Trying them all in
arbitrary order can't do any good.

On top of that, loading that many drivers at once bloats the kernel
log. Also many drivers will stay loaded afterward, bloating the output
of "lsmod" and wasting memory. Some modules (cs5535_mfgpt which gets
loaded as a dependency) can't even be unloaded!

If defining char-major-10-130 is needed then it should happen in
user-space.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Mike Frysinger <vapier.adi@gmail.com>
Cc: Wan ZongShun <mcuos.com@gmail.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Zwane Mwaikambo <zwane@arm.linux.org.uk>
Cc: Jim Cromie <jim.cromie@gmail.com>
2013-11-17 19:38:13 +01:00
Wim Van Sebroeck
86a1e1896c watchdog: nowayout is bool
nowayout is actually a boolean value.
So make it bool for all watchdog device drivers.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2012-03-27 20:06:02 +02:00
Joe Perches
27c766aaac watchdog: Use pr_<fmt> and pr_<level>
Use the current logging styles.

Make sure all output has a prefix.
Add missing newlines.
Remove now unnecessary PFX, NAME, and miscellaneous other #defines.
Coalesce formats.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2012-03-27 19:59:26 +02:00
Wim Van Sebroeck
2260286886 watchdog: it8712f_wdt.c: improve includes
remove unneeded pci.h include.
and include ioport.h to avoid build errors for the region functions.

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2011-07-26 21:28:23 +00:00
Nat Gurumoorthy
a134b82560 watchdog: Use "request_muxed_region" in it87 watchdog drivers
Changes the it87 watchdog drivers to use "request_muxed_region".
Serialize access to the hardware by using "request_muxed_region" macro defined
by Alan Cox. Call to this macro will hold off the requestor if the resource is
currently busy. 

The use of the above macro makes it possible to get rid of
spinlocks in it8712f_wdt.c and it87_wdt.c watchdog drivers.
This also greatly simplifies the implementation of it87_wdt.c driver.

 "superio_enter" will return an error if call to "request_muxed_region" fails. 
Rest of the code change is to ripple an error return from superio_enter to
the top level.

Signed-off-by: Nat Gurumoorthy <natg@google.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2011-07-22 08:55:23 +00:00
Wim Van Sebroeck
5f3b27569f watchdog: cleanup spaces before tabs
cleanup spaces before tabs in drivers/watchdog/

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2011-03-15 16:02:27 +00:00
Timo Juhani Lindfors
a422088db2 watchdog: it8712f_wdt: Add module parameter for alternative reset sources
On iEi PCISA-9652-R10 (BIOS version 1.5) single board computer reads
from the game port do not seem to reset the watchdog timer. This patch
adds a module parameter wdt_config_reg to specify alternative reset
sources. At least WDT_RESET_KBD has been tested, even just running

while true; do
    setleds -L +scroll
    sleep 1
    setleds -L -scroll
    sleep 1
done

is enough to keep the watchdog happy.

Signed-off-by: Timo Juhani Lindfors <timo.lindfors@iki.fi>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2010-10-28 21:42:32 +00:00
Timo Juhani Lindfors
f0fc10745a watchdog: it8712f_wdt: Add comments for config/control register names
Signed-off-by: Timo Juhani Lindfors <timo.lindfors@iki.fi>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2010-10-28 21:42:14 +00:00
Wim Van Sebroeck
42747d712d [WATCHDOG] watchdog_info constify
make the watchdog_info struct const where possible.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2010-03-07 10:30:57 +00:00
Wim Van Sebroeck
e73a780272 [WATCHDOG] Correct WDIOF_MAGICCLOSE flag
Make sure that when the WDIOF_MAGICCLOSE flag is set we also
support the magic-close feature...

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2009-06-18 07:30:57 +00:00
Wim Van Sebroeck
7944d3a5a7 [WATCHDOG] more coding style clean-up's
More coding style clean-up's.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-08-06 20:19:41 +00:00
Wim Van Sebroeck
0c06090c94 [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>
2008-08-06 13:21:09 +00:00
Alan Cox
d6547378df it8712f_wdt: Locking and coding style
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-04 17:12:07 -07:00
Andrew Paprocki
cc1020f15a [WATCHDOG] it8712f_wdt Zero MSB timeout byte when disabling watchdog
I noticed this while testing the latest code. I'm not sure if it is required,
but the normal (or LSB) timeout value is set to zero, so the MSB should
be as well to stay consistent.

If the chip revision is >= 8, set MSB of the 16-bit timeout value to zero
when disabling the watchdog in it8712f_wdt_disable().

Signed-off-by: Andrew Paprocki <andrew@ishiboo.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-04-06 19:12:22 +00:00
Oliver Schuster
0e45adb8f5 [WATCHDOG] Fix it8712f_wdt.c wrong byte order accessing WDT_TIMEOUT
This patch corrects an error in the driver it8712f_wdt.  You cannot set
the 16-bit WDT_TIMEOUT access as a 16-bit outw, because the byte
ordering will be wrong.  So just do the high 8 bits as a separate
access.

Signed-off-by: Oliver Schuster <olivers137@aol.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-01 11:31:05 -07:00
Andrew Paprocki
5e69960865 [WATCHDOG] it8712f_wdt support for 16-bit timeout values, WDIOC_GETSTATUS
This patch adds support for 16-bit watchdog timeout values which are
available in chip revisions >= 0x08. Values <= 65535 are seconds precision,
otherwise minutes precision is used up to a maximum value of 3932100. Added
implementation for WDIOC_GETSTATUS which checks the WDT status bit in the
WDT control register.

Signed-off-by: Andrew Paprocki <andrew@ishiboo.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-03-06 11:10:07 +00:00
Jan Engelhardt
b47a166ed0 [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>
2008-01-25 20:41:30 +00:00
Jorge Boncompte [DTI2]
38ff6fd2fa [WATCHDOG] IT8212F watchdog driver
This patch adds support for the ITE Tech Inc. IT8712F EC-LPC Super I/O 
chipset found on many Pentium III and AMD motherboards. Developed using code 
from other watchdog drivers and the datasheet on ITE Tech homepage.

Signed-off-by: Jorge Boncompte <jorge@dti2.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-11-19 21:25:41 +00:00