how to write watchdog driver in linux