All of lore.kernel.org
 help / color / mirror / Atom feed
* Extending wdt-gpio to be used on non-of (no DT) platforms
@ 2014-03-29 11:54 ` Rafał Miłecki
  0 siblings, 0 replies; 13+ messages in thread
From: Rafał Miłecki @ 2014-03-29 11:54 UTC (permalink / raw)
  To: linux-watchdog-u79uwXL29TY76Z2rM5mHXA, Alexander Shiyan,
	Florian Fainelli
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Wim Van Sebroeck, Rob Herring,
	Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell,
	Grant Likely, Hauke Mehrtens

Hi guys,

I've noticed gpio_wdt was added to the kernel to support some devices
based on devicetree.
We used to have our own (not mainlined) gpio_wdt in OpenWrt project:
http://git.openwrt.org/?p=openwrt.git;a=blob;f=target/linux/generic/patches-3.10/990-gpio_wdt.patch;hb=HEAD

The main difference is that the mainlined one uses OF, while OpenWrt's
one uses plain platform API (with struct gpio_wdt_platform_data).

I wanted to bring a topic of mainlining OpenWrt's solution. We
definitely need that and at the same time our device(s) don't use OF /
DT.

Do you think we should extend wdt-gpio to handle that? Or do you think
this driver is so small, it's not worth it and we should submit a
separated one?

Apart from API being used, one other difference I see is OpenWrt
supports different values for "first tick" and "interval". But that
could be easily handled.

-- 
Rafał
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Extending wdt-gpio to be used on non-of (no DT) platforms
@ 2014-03-29 11:54 ` Rafał Miłecki
  0 siblings, 0 replies; 13+ messages in thread
From: Rafał Miłecki @ 2014-03-29 11:54 UTC (permalink / raw)
  To: linux-watchdog, Alexander Shiyan, Florian Fainelli
  Cc: devicetree, Wim Van Sebroeck, Rob Herring, Pawel Moll,
	Mark Rutland, Stephen Warren, Ian Campbell, Grant Likely,
	Hauke Mehrtens

Hi guys,

I've noticed gpio_wdt was added to the kernel to support some devices
based on devicetree.
We used to have our own (not mainlined) gpio_wdt in OpenWrt project:
http://git.openwrt.org/?p=openwrt.git;a=blob;f=target/linux/generic/patches-3.10/990-gpio_wdt.patch;hb=HEAD

The main difference is that the mainlined one uses OF, while OpenWrt's
one uses plain platform API (with struct gpio_wdt_platform_data).

I wanted to bring a topic of mainlining OpenWrt's solution. We
definitely need that and at the same time our device(s) don't use OF /
DT.

Do you think we should extend wdt-gpio to handle that? Or do you think
this driver is so small, it's not worth it and we should submit a
separated one?

Apart from API being used, one other difference I see is OpenWrt
supports different values for "first tick" and "interval". But that
could be easily handled.

-- 
Rafał

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Extending wdt-gpio to be used on non-of (no DT) platforms
  2014-03-29 11:54 ` Rafał Miłecki
  (?)
@ 2014-03-29 12:29 ` Alexander Shiyan
       [not found]   ` <1396096185.560264234-mjcJgDj8AytsdVUOrk1QfQ@public.gmane.org>
  -1 siblings, 1 reply; 13+ messages in thread
From: Alexander Shiyan @ 2014-03-29 12:29 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: devicetree, Wim Van Sebroeck, Rob Herring, Pawel Moll,
	Mark Rutland, Stephen Warren, Ian Campbell, Grant Likely,
	Hauke Mehrtens, linux-watchdog, Florian Fainelli

Sat, 29 Mar 2014 12:54:40 +0100 от Rafał Miłecki <zajec5@gmail.com>:
> Hi guys,
> 
> I've noticed gpio_wdt was added to the kernel to support some devices
> based on devicetree.
> We used to have our own (not mainlined) gpio_wdt in OpenWrt project:
> http://git.openwrt.org/?p=openwrt.git;a=blob;f=target/linux/generic/patches-3.10/990-gpio_wdt.patch;hb=HEAD
> 
> The main difference is that the mainlined one uses OF, while OpenWrt's
> one uses plain platform API (with struct gpio_wdt_platform_data).
> 
> I wanted to bring a topic of mainlining OpenWrt's solution. We
> definitely need that and at the same time our device(s) don't use OF /
> DT.
> 
> Do you think we should extend wdt-gpio to handle that? Or do you think
> this driver is so small, it's not worth it and we should submit a
> separated one?
> 
> Apart from API being used, one other difference I see is OpenWrt
> supports different values for "first tick" and "interval". But that
> could be easily handled.

In fact, this driver can be extended to non-DT support without adding
any platform_data headers. This can be implemented by convert driver
to using descriptor-based GPIO functions (gpiod_{}).
HW timeout value in this case can be taken with module_param().

---


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Extending wdt-gpio to be used on non-of (no DT) platforms
  2014-03-29 12:29 ` Alexander Shiyan
@ 2014-03-29 13:16       ` Hauke Mehrtens
  0 siblings, 0 replies; 13+ messages in thread
From: Hauke Mehrtens @ 2014-03-29 13:16 UTC (permalink / raw)
  To: Alexander Shiyan, Rafał Miłecki
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Wim Van Sebroeck, Rob Herring,
	Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell,
	Grant Likely, linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	Florian Fainelli, m.adam--linux-kMOp4+VwI+uzQB+pC5nmwQ

On 03/29/2014 01:29 PM, Alexander Shiyan wrote:
> Sat, 29 Mar 2014 12:54:40 +0100 от Rafał Miłecki <zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
>> Hi guys,
>>
>> I've noticed gpio_wdt was added to the kernel to support some devices
>> based on devicetree.
>> We used to have our own (not mainlined) gpio_wdt in OpenWrt project:
>> http://git.openwrt.org/?p=openwrt.git;a=blob;f=target/linux/generic/patches-3.10/990-gpio_wdt.patch;hb=HEAD
>>
>> The main difference is that the mainlined one uses OF, while OpenWrt's
>> one uses plain platform API (with struct gpio_wdt_platform_data).
>>
>> I wanted to bring a topic of mainlining OpenWrt's solution. We
>> definitely need that and at the same time our device(s) don't use OF /
>> DT.
>>
>> Do you think we should extend wdt-gpio to handle that? Or do you think
>> this driver is so small, it's not worth it and we should submit a
>> separated one?
>>
>> Apart from API being used, one other difference I see is OpenWrt
>> supports different values for "first tick" and "interval". But that
>> could be easily handled.
> 
> In fact, this driver can be extended to non-DT support without adding
> any platform_data headers. This can be implemented by convert driver
> to using descriptor-based GPIO functions (gpiod_{}).
> HW timeout value in this case can be taken with module_param().

The Huawei E970, the only device with a bcm47xx SoC which uses this gpio
watchdog I know of, needs the gpio driver very early. It is not possible
to deactivate the watchdogs, so it has to get trigged very early in the
boot process. Module load time is too late. I think wdt-gpio should be
extended to support the old platform device interface with a own
platform_data header.

I added Mathias Adam, the author of the patch in OpenWrt.

Hauke
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Extending wdt-gpio to be used on non-of (no DT) platforms
@ 2014-03-29 13:16       ` Hauke Mehrtens
  0 siblings, 0 replies; 13+ messages in thread
From: Hauke Mehrtens @ 2014-03-29 13:16 UTC (permalink / raw)
  To: Alexander Shiyan, Rafał Miłecki
  Cc: devicetree, Wim Van Sebroeck, Rob Herring, Pawel Moll,
	Mark Rutland, Stephen Warren, Ian Campbell, Grant Likely,
	linux-watchdog, Florian Fainelli, m.adam--linux

On 03/29/2014 01:29 PM, Alexander Shiyan wrote:
> Sat, 29 Mar 2014 12:54:40 +0100 от Rafał Miłecki <zajec5@gmail.com>:
>> Hi guys,
>>
>> I've noticed gpio_wdt was added to the kernel to support some devices
>> based on devicetree.
>> We used to have our own (not mainlined) gpio_wdt in OpenWrt project:
>> http://git.openwrt.org/?p=openwrt.git;a=blob;f=target/linux/generic/patches-3.10/990-gpio_wdt.patch;hb=HEAD
>>
>> The main difference is that the mainlined one uses OF, while OpenWrt's
>> one uses plain platform API (with struct gpio_wdt_platform_data).
>>
>> I wanted to bring a topic of mainlining OpenWrt's solution. We
>> definitely need that and at the same time our device(s) don't use OF /
>> DT.
>>
>> Do you think we should extend wdt-gpio to handle that? Or do you think
>> this driver is so small, it's not worth it and we should submit a
>> separated one?
>>
>> Apart from API being used, one other difference I see is OpenWrt
>> supports different values for "first tick" and "interval". But that
>> could be easily handled.
> 
> In fact, this driver can be extended to non-DT support without adding
> any platform_data headers. This can be implemented by convert driver
> to using descriptor-based GPIO functions (gpiod_{}).
> HW timeout value in this case can be taken with module_param().

The Huawei E970, the only device with a bcm47xx SoC which uses this gpio
watchdog I know of, needs the gpio driver very early. It is not possible
to deactivate the watchdogs, so it has to get trigged very early in the
boot process. Module load time is too late. I think wdt-gpio should be
extended to support the old platform device interface with a own
platform_data header.

I added Mathias Adam, the author of the patch in OpenWrt.

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Extending wdt-gpio to be used on non-of (no DT) platforms
  2014-03-29 13:16       ` Hauke Mehrtens
@ 2014-03-29 13:33           ` Alexander Shiyan
  -1 siblings, 0 replies; 13+ messages in thread
From: Alexander Shiyan @ 2014-03-29 13:33 UTC (permalink / raw)
  To: Hauke Mehrtens
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Wim Van Sebroeck, Rob Herring,
	Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell,
	Grant Likely, linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	Florian Fainelli, m.adam--linux-kMOp4+VwI+uzQB+pC5nmwQ,
	Rafał Miłecki

Sat, 29 Mar 2014 14:16:40 +0100 от Hauke Mehrtens <hauke@hauke-m.de>:
> On 03/29/2014 01:29 PM, Alexander Shiyan wrote:
> > Sat, 29 Mar 2014 12:54:40 +0100 от Rafał Miłecki <zajec5@gmail.com>:
> >> Hi guys,
> >>
> >> I've noticed gpio_wdt was added to the kernel to support some devices
> >> based on devicetree.
> >> We used to have our own (not mainlined) gpio_wdt in OpenWrt project:
> >> http://git.openwrt.org/?p=openwrt.git;a=blob;f=target/linux/generic/patches-3.10/990-gpio_wdt.patch;hb=HEAD
> >>
> >> The main difference is that the mainlined one uses OF, while OpenWrt's
> >> one uses plain platform API (with struct gpio_wdt_platform_data).
> >>
> >> I wanted to bring a topic of mainlining OpenWrt's solution. We
> >> definitely need that and at the same time our device(s) don't use OF /
> >> DT.
> >>
> >> Do you think we should extend wdt-gpio to handle that? Or do you think
> >> this driver is so small, it's not worth it and we should submit a
> >> separated one?
> >>
> >> Apart from API being used, one other difference I see is OpenWrt
> >> supports different values for "first tick" and "interval". But that
> >> could be easily handled.
> > 
> > In fact, this driver can be extended to non-DT support without adding
> > any platform_data headers. This can be implemented by convert driver
> > to using descriptor-based GPIO functions (gpiod_{}).
> > HW timeout value in this case can be taken with module_param().
> 
> The Huawei E970, the only device with a bcm47xx SoC which uses this gpio
> watchdog I know of, needs the gpio driver very early. It is not possible
> to deactivate the watchdogs, so it has to get trigged very early in the

Why it cannot be deactivated?
The driver has been designed for ADM70x ICs, where watchdog is
deactivated by set GPIO to tristate.

---


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Extending wdt-gpio to be used on non-of (no DT) platforms
@ 2014-03-29 13:33           ` Alexander Shiyan
  0 siblings, 0 replies; 13+ messages in thread
From: Alexander Shiyan @ 2014-03-29 13:33 UTC (permalink / raw)
  To: Hauke Mehrtens
  Cc: devicetree, Wim Van Sebroeck, Rob Herring, Pawel Moll,
	Mark Rutland, Stephen Warren, Ian Campbell, Grant Likely,
	linux-watchdog, Florian Fainelli, m.adam--linux,
	Rafał Miłecki

Sat, 29 Mar 2014 14:16:40 +0100 от Hauke Mehrtens <hauke@hauke-m.de>:
> On 03/29/2014 01:29 PM, Alexander Shiyan wrote:
> > Sat, 29 Mar 2014 12:54:40 +0100 от Rafał Miłecki <zajec5@gmail.com>:
> >> Hi guys,
> >>
> >> I've noticed gpio_wdt was added to the kernel to support some devices
> >> based on devicetree.
> >> We used to have our own (not mainlined) gpio_wdt in OpenWrt project:
> >> http://git.openwrt.org/?p=openwrt.git;a=blob;f=target/linux/generic/patches-3.10/990-gpio_wdt.patch;hb=HEAD
> >>
> >> The main difference is that the mainlined one uses OF, while OpenWrt's
> >> one uses plain platform API (with struct gpio_wdt_platform_data).
> >>
> >> I wanted to bring a topic of mainlining OpenWrt's solution. We
> >> definitely need that and at the same time our device(s) don't use OF /
> >> DT.
> >>
> >> Do you think we should extend wdt-gpio to handle that? Or do you think
> >> this driver is so small, it's not worth it and we should submit a
> >> separated one?
> >>
> >> Apart from API being used, one other difference I see is OpenWrt
> >> supports different values for "first tick" and "interval". But that
> >> could be easily handled.
> > 
> > In fact, this driver can be extended to non-DT support without adding
> > any platform_data headers. This can be implemented by convert driver
> > to using descriptor-based GPIO functions (gpiod_{}).
> > HW timeout value in this case can be taken with module_param().
> 
> The Huawei E970, the only device with a bcm47xx SoC which uses this gpio
> watchdog I know of, needs the gpio driver very early. It is not possible
> to deactivate the watchdogs, so it has to get trigged very early in the

Why it cannot be deactivated?
The driver has been designed for ADM70x ICs, where watchdog is
deactivated by set GPIO to tristate.

---


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Extending wdt-gpio to be used on non-of (no DT) platforms
  2014-03-29 13:33           ` Alexander Shiyan
@ 2014-03-29 13:51               ` Rafał Miłecki
  -1 siblings, 0 replies; 13+ messages in thread
From: Rafał Miłecki @ 2014-03-29 13:51 UTC (permalink / raw)
  To: Alexander Shiyan
  Cc: Hauke Mehrtens, devicetree-u79uwXL29TY76Z2rM5mHXA,
	Wim Van Sebroeck, Rob Herring, Pawel Moll, Mark Rutland,
	Stephen Warren, Ian Campbell, Grant Likely,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA, Florian Fainelli,
	m.adam--linux-kMOp4+VwI+uzQB+pC5nmwQ

2014-03-29 14:33 GMT+01:00 Alexander Shiyan <shc_work-JGs/UdohzUI@public.gmane.org>:
> Sat, 29 Mar 2014 14:16:40 +0100 от Hauke Mehrtens <hauke@hauke-m.de>:
>> The Huawei E970, the only device with a bcm47xx SoC which uses this gpio
>> watchdog I know of, needs the gpio driver very early. It is not possible
>> to deactivate the watchdogs, so it has to get trigged very early in the
>
> Why it cannot be deactivated?
> The driver has been designed for ADM70x ICs, where watchdog is
> deactivated by set GPIO to tristate.

I'm not sure how to achieve tri-state with Broadcom SoC. Our code is in:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/bcma/driver_gpio.c

We have bcma_chipco_gpio_control that sets if GPIO is controlled by
ChipCommon (part of the SoC, one of many cores).
Maybe setting GPIO to be *not* controlled by ChipCommon will make it tri-state?

Any other ideas?

-- 
Rafał
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Extending wdt-gpio to be used on non-of (no DT) platforms
@ 2014-03-29 13:51               ` Rafał Miłecki
  0 siblings, 0 replies; 13+ messages in thread
From: Rafał Miłecki @ 2014-03-29 13:51 UTC (permalink / raw)
  To: Alexander Shiyan
  Cc: Hauke Mehrtens, devicetree, Wim Van Sebroeck, Rob Herring,
	Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell,
	Grant Likely, linux-watchdog, Florian Fainelli, m.adam--linux

2014-03-29 14:33 GMT+01:00 Alexander Shiyan <shc_work@mail.ru>:
> Sat, 29 Mar 2014 14:16:40 +0100 от Hauke Mehrtens <hauke@hauke-m.de>:
>> The Huawei E970, the only device with a bcm47xx SoC which uses this gpio
>> watchdog I know of, needs the gpio driver very early. It is not possible
>> to deactivate the watchdogs, so it has to get trigged very early in the
>
> Why it cannot be deactivated?
> The driver has been designed for ADM70x ICs, where watchdog is
> deactivated by set GPIO to tristate.

I'm not sure how to achieve tri-state with Broadcom SoC. Our code is in:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/bcma/driver_gpio.c

We have bcma_chipco_gpio_control that sets if GPIO is controlled by
ChipCommon (part of the SoC, one of many cores).
Maybe setting GPIO to be *not* controlled by ChipCommon will make it tri-state?

Any other ideas?

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Extending wdt-gpio to be used on non-of (no DT) platforms
  2014-03-29 13:51               ` Rafał Miłecki
@ 2014-03-29 13:56                   ` Alexander Shiyan
  -1 siblings, 0 replies; 13+ messages in thread
From: Alexander Shiyan @ 2014-03-29 13:56 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: Hauke Mehrtens, devicetree-u79uwXL29TY76Z2rM5mHXA,
	Wim Van Sebroeck, Rob Herring, Pawel Moll, Mark Rutland,
	Stephen Warren, Ian Campbell, Grant Likely,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA, Florian Fainelli,
	m.adam--linux-kMOp4+VwI+uzQB+pC5nmwQ

Sat, 29 Mar 2014 14:51:34 +0100 от Rafał Miłecki <zajec5@gmail.com>:
> 2014-03-29 14:33 GMT+01:00 Alexander Shiyan <shc_work@mail.ru>:
> > Sat, 29 Mar 2014 14:16:40 +0100 от Hauke Mehrtens <hauke@hauke-m.de>:
> >> The Huawei E970, the only device with a bcm47xx SoC which uses this gpio
> >> watchdog I know of, needs the gpio driver very early. It is not possible
> >> to deactivate the watchdogs, so it has to get trigged very early in the
> >
> > Why it cannot be deactivated?
> > The driver has been designed for ADM70x ICs, where watchdog is
> > deactivated by set GPIO to tristate.
> 
> I'm not sure how to achieve tri-state with Broadcom SoC. Our code is in:
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/bcma/driver_gpio.c
> 
> We have bcma_chipco_gpio_control that sets if GPIO is controlled by
> ChipCommon (part of the SoC, one of many cores).
> Maybe setting GPIO to be *not* controlled by ChipCommon will make it tri-state?
> 
> Any other ideas?

Usually this should be done by setup GPIO direction to input.

---


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Extending wdt-gpio to be used on non-of (no DT) platforms
@ 2014-03-29 13:56                   ` Alexander Shiyan
  0 siblings, 0 replies; 13+ messages in thread
From: Alexander Shiyan @ 2014-03-29 13:56 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: Hauke Mehrtens, devicetree, Wim Van Sebroeck, Rob Herring,
	Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell,
	Grant Likely, linux-watchdog, Florian Fainelli, m.adam--linux

Sat, 29 Mar 2014 14:51:34 +0100 от Rafał Miłecki <zajec5@gmail.com>:
> 2014-03-29 14:33 GMT+01:00 Alexander Shiyan <shc_work@mail.ru>:
> > Sat, 29 Mar 2014 14:16:40 +0100 от Hauke Mehrtens <hauke@hauke-m.de>:
> >> The Huawei E970, the only device with a bcm47xx SoC which uses this gpio
> >> watchdog I know of, needs the gpio driver very early. It is not possible
> >> to deactivate the watchdogs, so it has to get trigged very early in the
> >
> > Why it cannot be deactivated?
> > The driver has been designed for ADM70x ICs, where watchdog is
> > deactivated by set GPIO to tristate.
> 
> I'm not sure how to achieve tri-state with Broadcom SoC. Our code is in:
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/bcma/driver_gpio.c
> 
> We have bcma_chipco_gpio_control that sets if GPIO is controlled by
> ChipCommon (part of the SoC, one of many cores).
> Maybe setting GPIO to be *not* controlled by ChipCommon will make it tri-state?
> 
> Any other ideas?

Usually this should be done by setup GPIO direction to input.

---


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Extending wdt-gpio to be used on non-of (no DT) platforms
  2014-03-29 11:54 ` Rafał Miłecki
@ 2014-04-01  0:13     ` Guenter Roeck
  -1 siblings, 0 replies; 13+ messages in thread
From: Guenter Roeck @ 2014-04-01  0:13 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: linux-watchdog-u79uwXL29TY76Z2rM5mHXA, Alexander Shiyan,
	Florian Fainelli, devicetree-u79uwXL29TY76Z2rM5mHXA,
	Wim Van Sebroeck, Rob Herring, Pawel Moll, Mark Rutland,
	Stephen Warren, Ian Campbell, Grant Likely, Hauke Mehrtens

On Sat, Mar 29, 2014 at 12:54:40PM +0100, Rafał Miłecki wrote:
> Hi guys,
> 
> I've noticed gpio_wdt was added to the kernel to support some devices
> based on devicetree.
> We used to have our own (not mainlined) gpio_wdt in OpenWrt project:
> http://git.openwrt.org/?p=openwrt.git;a=blob;f=target/linux/generic/patches-3.10/990-gpio_wdt.patch;hb=HEAD
> 
> The main difference is that the mainlined one uses OF, while OpenWrt's
> one uses plain platform API (with struct gpio_wdt_platform_data).
> 
> I wanted to bring a topic of mainlining OpenWrt's solution. We
> definitely need that and at the same time our device(s) don't use OF /
> DT.
> 
> Do you think we should extend wdt-gpio to handle that? Or do you think
> this driver is so small, it's not worth it and we should submit a
> separated one?
> 
> Apart from API being used, one other difference I see is OpenWrt
> supports different values for "first tick" and "interval". But that
> could be easily handled.
> 
If you can sort out those differences, I would suggest to add platform data
support to the existing upstream driver.

Guenter
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Extending wdt-gpio to be used on non-of (no DT) platforms
@ 2014-04-01  0:13     ` Guenter Roeck
  0 siblings, 0 replies; 13+ messages in thread
From: Guenter Roeck @ 2014-04-01  0:13 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: linux-watchdog, Alexander Shiyan, Florian Fainelli, devicetree,
	Wim Van Sebroeck, Rob Herring, Pawel Moll, Mark Rutland,
	Stephen Warren, Ian Campbell, Grant Likely, Hauke Mehrtens

On Sat, Mar 29, 2014 at 12:54:40PM +0100, Rafał Miłecki wrote:
> Hi guys,
> 
> I've noticed gpio_wdt was added to the kernel to support some devices
> based on devicetree.
> We used to have our own (not mainlined) gpio_wdt in OpenWrt project:
> http://git.openwrt.org/?p=openwrt.git;a=blob;f=target/linux/generic/patches-3.10/990-gpio_wdt.patch;hb=HEAD
> 
> The main difference is that the mainlined one uses OF, while OpenWrt's
> one uses plain platform API (with struct gpio_wdt_platform_data).
> 
> I wanted to bring a topic of mainlining OpenWrt's solution. We
> definitely need that and at the same time our device(s) don't use OF /
> DT.
> 
> Do you think we should extend wdt-gpio to handle that? Or do you think
> this driver is so small, it's not worth it and we should submit a
> separated one?
> 
> Apart from API being used, one other difference I see is OpenWrt
> supports different values for "first tick" and "interval". But that
> could be easily handled.
> 
If you can sort out those differences, I would suggest to add platform data
support to the existing upstream driver.

Guenter

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-04-01  0:14 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-29 11:54 Extending wdt-gpio to be used on non-of (no DT) platforms Rafał Miłecki
2014-03-29 11:54 ` Rafał Miłecki
2014-03-29 12:29 ` Alexander Shiyan
     [not found]   ` <1396096185.560264234-mjcJgDj8AytsdVUOrk1QfQ@public.gmane.org>
2014-03-29 13:16     ` Hauke Mehrtens
2014-03-29 13:16       ` Hauke Mehrtens
     [not found]       ` <5336C7B8.90707-5/S+JYg5SzeELgA04lAiVw@public.gmane.org>
2014-03-29 13:33         ` Alexander Shiyan
2014-03-29 13:33           ` Alexander Shiyan
     [not found]           ` <1396100017.585010881-zErZ3GTiYPVsdVUOrk1QfQ@public.gmane.org>
2014-03-29 13:51             ` Rafał Miłecki
2014-03-29 13:51               ` Rafał Miłecki
     [not found]               ` <CACna6rw5eryfe_yFzUs4oTv697LudngogmdOJNK-P8Qq12fJLQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-29 13:56                 ` Alexander Shiyan
2014-03-29 13:56                   ` Alexander Shiyan
     [not found] ` <CACna6rwRzw1fo2_DyV3T4fa4+cA3=LTcFHRpRsfZWwR2ugQn_w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-01  0:13   ` Guenter Roeck
2014-04-01  0:13     ` Guenter Roeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.