Ejemplo n.º 1
0
static void
w83697hf_init(void)
{
	unsigned char bbuf;

	w83697hf_select_wdt();

	bbuf = w83697hf_get_reg(0x29);
	bbuf &= ~0x60;
	bbuf |= 0x20;
	w83697hf_set_reg(0x29, bbuf);	/* Set pin 119 to WDTO# mode (= CR29, WDT0) */

	bbuf = w83697hf_get_reg(0xF3);
	bbuf &= ~0x04;
	w83697hf_set_reg(0xF3, bbuf);	/* Count mode is seconds */

	w83697hf_deselect_wdt();
}
Ejemplo n.º 2
0
static void w83697hf_init(void)
{
    unsigned char bbuf;

    w83697hf_select_wdt();

    bbuf = w83697hf_get_reg(0x29);
    bbuf &= ~0x60;
    bbuf |= 0x20;


    w83697hf_set_reg(0x29, bbuf);

    bbuf = w83697hf_get_reg(0xF3);
    bbuf &= ~0x04;
    w83697hf_set_reg(0xF3, bbuf);

    w83697hf_deselect_wdt();
}
Ejemplo n.º 3
0
static void wdt_disable(void)
{
	spin_lock(&io_lock);
	w83697hf_select_wdt();

	w83697hf_set_reg(0x30, 0);	/* Disable timer */
	w83697hf_write_timeout(0);

	w83697hf_deselect_wdt();
	spin_unlock(&io_lock);
}
Ejemplo n.º 4
0
static void wdt_enable(void)
{
	spin_lock(&io_lock);
	w83697hf_select_wdt();

	w83697hf_write_timeout(timeout);
	w83697hf_set_reg(0x30, 1);	/* Enable timer */

	w83697hf_deselect_wdt();
	spin_unlock(&io_lock);
}
Ejemplo n.º 5
0
static void
w83697hf_select_wdt(void)
{
	w83697hf_unlock();
	w83697hf_set_reg(0x07, 0x08);	/* Switch to logic device 8 (GPIO2) */
}
Ejemplo n.º 6
0
static void
w83697hf_write_timeout(int timeout)
{
	w83697hf_set_reg(0xF4, timeout);	/* Write Timeout counter to CRF4 */
}
Ejemplo n.º 7
0
static void w83697hf_select_wdt(void)
{
    w83697hf_unlock();
    w83697hf_set_reg(0x07, 0x08);
}
Ejemplo n.º 8
0
static void w83697hf_write_timeout(int timeout)
{

    w83697hf_set_reg(0xF4, timeout);
}