Should gpio_wdt be enhanced?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I am working on a board that contains a Texas Instruments TPS3851-Q1 which is described by the datasheet (http://www.ti.com/lit/ds/symlink/tps3851-q1.pdf) as "High-Accuracy Voltage Supervisor with Integrated Watchdog Timer".  The operation of the watchdog feature of the chip is quite simple.

1. Use a GPIO of your system to write the SET1 pin of the TPS3851-Q1 high to enable the watchdog
2. Use a GPIO of your system to produce a falling edge to kick the watchdog.  The rate at which this must occur depends upon hardware pin strapping options and whether the chosen part uses "standard" or "extended" timing.
3. If you don't kick the watchdog, the WDO output of the TPS3851-Q1 will go low.  In the case of the board that I am working on, this is tied to the board reset
4. You may write 0 to SET1 to disable the watchdog

I discovered gpio_wdt.c in the Linux kernel and it seems like this driver is mostly compatible with this device.  What seems to be missing is the ability to control the SET1 pin to enable/disable the watchdog hardware.  Would it be sensible to define an optional devicetree property "enable-gpio" which if defined, is written high in gpio_wdt_probe() and low in gpio_wdt_remove().

I also don't think I understand the "always_running" option of the driver.  If this option is false, then a call to gpio_wdt_stop() produces a call to gpio_wdt_disable().  The gpio_wdt_disable() function sets the watchdog signal GPIO to 1 and then reconfigures the GPIO to be an input if the hw_algo setting is HW_ALGO_TOGGLE.  I don't see how this will disable the watchdog since presumably TOGGLE based hardware is expecting the signal to toggle (and now it won't) and LEVEL based hardware is expecting either a rising or falling edge and no more edges will be produced.  Does anyone have any insight into how the driver is supposed to work when "always_running" is false?

Thanks,
David
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux