Re: [PATCH] documentation/devicetree: Move DT bindigns from gpio to watchdog

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

 




On 08/22/2013 01:37 AM, Johannes Thumshirn wrote:
> On Wed, Aug 21, 2013 at 11:34:00AM -0600, Stephen Warren wrote:
>> On 08/21/2013 06:42 AM, Johannes Thumshirn wrote:
>>> I accidently put the devicetree bindings for the MEN A21 watchdog driver in
>>> Documentation/devicetree/bindings/gpio instead of
>>> Documentation/devicetree/bindings/watchdog, this patch addresses this error.
>>
>> The rename sounds fine, so that part,
>> Acked-by: Stephen Warren <swarren@xxxxxxxxxx>
>>
>> However, the binding itself doesn't look right; it appears to have a
>> single "gpios" property rather than using separate named xxx-gpios
>> properties for different things...
> 
> Ok, so I'll need something like the following?
> 
> watchdog {
> 	compatible ="men,a021-wdt";
> 	enable-gpios = <&gpio3 9 1>; /* WD_EN */
> 	fast-gpios = <&gpio3 10 1>;  /* WD_FAST */
> 	trig-gpios = <&gpio3 11 1>;  /* WD_TRIG */
> 	rst0-gpio = <&gpio3 6 1>;    /* RST_CAUSE[0] */
> 	rst1-gpio = <&gpio3 7 1>;    /* RST_CAUSE[1] */
> 	rst2-gpio = <&gpio3 8 1>;    /* RST_CAUSE[2] */
> };

Yes, that looks more like what I'd expect, albeit I'd probably expect to
see a rst-gpio property with 3 entries.

> Or is there something like of_get_named_gpios(...) so I can put all 3 rst-gpios
> into one property? A quick grep only revealed of_get_named_gpio(...).

The availablity of APIs within Linux shouldn't impact the binding
definitions. I would imagine it's easy enough to add
of_get_named_gpio_by_index() or similar to Linux.

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




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux