public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Window watchdog driver design
@ 2015-05-14 11:56 Andreas Werner
  2015-05-14 13:30 ` Guenter Roeck
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas Werner @ 2015-05-14 11:56 UTC (permalink / raw)
  To: linux-watchdog, linux-kernel

Hi,
in the next few weeks I need to write a driver for a window wachtdog
implemented in a CPLD. I have some questions about the design
of the driver and the best way to write this driver to also be able
to submit it.

The triggering and configuration of the Watchdog is done by several GPIOs which
are connected to the CPLD watchdog device. The correct GPIOs are configurable
using the Device Tree.

1. Timeout
	The timeout values are defined in ms and start from 20ms to 2560ms.
	The timout is set by 3 GPIOs this means we have only 8 different
	timout values. It is also possible that a future Watchdog CPLD device
	does have different timeout values.

	Is it possible to set ms timeouts? It seems that the WDT API does
	only support a resolution of 1sec.

	One idea would be to use the API timeout as something like a timeout
	index to set the different values. Of course this needs to be documented.

	e.g.
	timeout	(API)	timeout in device
	1 		20ms
	2		100ms
	3		500ms
	...		...		

2. Upper/Lower Window
	There is currently no support for a windowed watchdog in the wdt core.
	The lower window can be activated by a gpio and its timeout is defined
	as "upper windows timeout/4"	

	What is the best way to implement those additional settings? Adding additional
	ioctl or export these in sysfs?

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-05-15 17:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-14 11:56 Window watchdog driver design Andreas Werner
2015-05-14 13:30 ` Guenter Roeck
2015-05-14 14:09   ` Andreas Werner
2015-05-15  0:52     ` Guenter Roeck
2015-05-15  5:43       ` Andreas Werner
2015-05-15  6:14         ` Guenter Roeck
2015-05-15 17:17           ` Andreas Werner
2015-05-15 17:52           ` Andreas Werner
2015-05-15  6:26         ` Timo Kokkonen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox