Skip to contentSkip to conversation

Generic Watchdog Timer Driver

RFC PATCH Superseded Wim Van Sebroeck 3 participants 4 messages Feb 23, 2011 – Jun 17, 2011 Watchdog device drivers

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

cover Generic Watchdog Timer Driver

Hi All,

To reduce copying the same code over and over in each watchdog device driver, Alan Cox and myself constructed a new framework/API that consolidates the common watchdog timer driver functions.

This framework/API consists of the following patches:
part 1: Introduction of the WatchDog Timer Driver Core part 2: Add the basic ioctl functionality
part 3: Add the WDIOC_KEEPALIVE ioctl
part 4: Add the WDIOC_SETOPTIONS ioctl
part 5: Add the WDIOC_SETTIMEOUT and WDIOC_GETTIMEOUT ioctl part 6: Add orphan control
part 7: Add the Magic Close feature
part 8: Add the nowayout feature
part 9: Add support for a miscdev parent device part 10: Add support for extra ioctl calls

Note: I still need to add the minimum and maximum timeout parameters. (That will become part 11).

Please provide feedback,
Kind regards,
Wim.

Reviewed-by on the v1 series
#1 lore raw
Quoted 16 lines · Wim Van Sebroeck

Hi All,

To reduce copying the same code over and over in each watchdog device driver, Alan Cox and myself constructed a new framework/API that consolidates the common watchdog timer driver functions.

This framework/API consists of the following patches:
part 1: Introduction of the WatchDog Timer Driver Core part 2: Add the basic ioctl functionality
part 3: Add the WDIOC_KEEPALIVE ioctl
part 4: Add the WDIOC_SETOPTIONS ioctl
part 5: Add the WDIOC_SETTIMEOUT and WDIOC_GETTIMEOUT ioctl part 6: Add orphan control
part 7: Add the Magic Close feature
part 8: Add the nowayout feature
part 9: Add support for a miscdev parent device part 10: Add support for extra ioctl calls

Quoted 2 lines

Note: I still need to add the minimum and maximum timeout parameters. (That will become part 11).

Overall, this looks really good IMO. It goes a long way to setting the stage for cleaning up the watchdog drivers themselves :)

#2 lore raw
In reply to Wim Van Sebroeck

Hi Wim,

Quoted 13 lines · Wim Van Sebroeck

To reduce copying the same code over and over in each watchdog device driver, Alan Cox and myself constructed a new framework/API that consolidates the common watchdog timer driver functions.

This framework/API consists of the following patches:
part  1: Introduction of the WatchDog Timer Driver Core part  2: Add the basic ioctl functionality
part  3: Add the WDIOC_KEEPALIVE ioctl
part  4: Add the WDIOC_SETOPTIONS ioctl
part  5: Add the WDIOC_SETTIMEOUT and WDIOC_GETTIMEOUT ioctl part  6: Add orphan control
part  7: Add the Magic Close feature
part  8: Add the nowayout feature
part  9: Add support for a miscdev parent device part 10: Add support for extra ioctl calls

While looking for efforts to provide a generic driver for gpio driven watchdog devices, like some simple hardware supervisors, I came into this patchset RFC, which turned out to be very interesting to me. Maybe I'm looking into the wrong places, but I could not find any upstream commit after this RFC.
Since I don't see any real critic from commenters to the approach you are suggesting, I'd like to know if there still is some work-in-progress on this.

TIA
Kind regards,

Andrea
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw

Hi Andrea,

Quoted 15 lines · Wim Van Sebroeck
Quoted 13 lines

To reduce copying the same code over and over in each watchdog device driver, Alan Cox and myself constructed a new framework/API that consolidates the common watchdog timer driver functions.

This framework/API consists of the following patches:
part  1: Introduction of the WatchDog Timer Driver Core part  2: Add the basic ioctl functionality
part  3: Add the WDIOC_KEEPALIVE ioctl
part  4: Add the WDIOC_SETOPTIONS ioctl
part  5: Add the WDIOC_SETTIMEOUT and WDIOC_GETTIMEOUT ioctl part  6: Add orphan control
part  7: Add the Magic Close feature
part  8: Add the nowayout feature
part  9: Add support for a miscdev parent device part 10: Add support for extra ioctl calls

Quoted 8 lines

While looking for efforts to provide a generic driver for gpio driven watchdog devices, like some simple hardware supervisors, I came into this patchset RFC, which turned out to be very interesting to me. Maybe I'm looking into the wrong places, but I could not find any upstream commit after this RFC.
Since I don't see any real critic from commenters to the approach you are suggesting, I'd like to know if there still is some work-in-progress on this.

I was working on it yesterday and will finish testing today. So expect a new post this afternoon.

I incorporated the comments I received. Orphan control will not be in (as long as the watchdog device is registered you can reopen it). And we will add the minimum and maximum timeout in an extra part.

Kind regards,
Wim.

--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html