GPIO WDT and open drain

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

 



Hi Alexander,

I converted your driver for GPIO watchdog to use GPIO descriptors
in the last merge window.

It seems there is no upstream device tree for this driver, so I guess
you have some system using it, and it would be nice to hear if you
can confirm that it still works for you.

I was thinking a bit about this code:

        /* Put GPIO back to tristate */
        if (priv->hw_algo == HW_ALGO_TOGGLE)
                gpiod_direction_input(priv->gpiod);

I think the right thing is to remove these lines and instead use
this in the device tree:

gpios = <&gpio0 5 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;

Also we should update the DTS example to use open drain.

This will fall back to software emulation setting the line as input
to drive it high just like the driver does if the hardware doesn't have
explicit open drain support.

The semantic effect would be that the open drain semantic will
be used also when pinging the watchdog, i.e the line will be set
as input to pull the line high. AFAICT this should work, but
obviously it needs to be tested on hardware.

Yours,
Linus Walleij
--
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