gpio-altera OF binding discrepancy
Hi!
I've just checked linux-4.4 and linux-next and discovered the following issue.
The Documentation/devicetree/bindings/gpio/gpio-altera.txt lists OF property altr,interrupt-trigger , which is not used anywhere in the kernel tree.
The drivers/gpio/gpio-altera.c on the other hand checks for a mandatory OF property altr,interrupt-type and assigns it into variable altera_gc->interrupt_trigger . Note that if this property is not in the DT, the driver will fail to probe.
Clearly, there is a typo between altr,interrupt-trigger and altr,interrupt-type . Since the driver fails to probe if altr,...-type property is not present, there must be users of this variant in the wild. I believe the Documentation/devicetree is a part of DT ABI, so the bindings there should not be randomly changed.
In this case, I would propose to change the Documentation though, since any users who try to use altr,...-trigger will have probe failures and fix their DT anyway.
Does this make sense ? If so, I will submit a patch .
Thanks!
Signature · 2 lines
Best regards, Marek Vasut
Hi Marex
Yeah, it must've been a typo when I wrote the document, good catch there. Can you help submit a patch to this?
Thanks
Quoted 28 lines · On Sat, 2016-02-27 at 03:10 +0100, [email protected] wrote:
Hi!
I've just checked linux-4.4 and linux-next and discovered the following issue.
The
Documentation/devicetree/bindings/gpio/gpio-altera.txtlists OF property altr,interrupt-trigger , which is not used anywhere in the kernel tree.The
drivers/gpio/gpio-altera.con the other hand checks for a mandatory OF property altr,interrupt-type and assigns it into variablealtera_gc->interrupt_trigger. Note that if this property is not in the DT, the driver will fail to probe.Clearly, there is a typo between altr,interrupt-trigger and altr,interrupt-type . Since the driver fails to probe if altr,...-type property is not present, there must be users of this variant in the wild. I believe the
Documentation/devicetreeis a part of DT ABI, so the bindings there should not be randomly changed.In this case, I would propose to change the Documentation though, since any users who try to use altr,...-trigger will have probe failures and fix their DT anyway.
Does this make sense ? If so, I will submit a patch .
Thanks!
Quoted 1 line · Tien Hock Loh
Hi Marex
Hi Tien!
Quoted 2 lines
Yeah, it must've been a typo when I wrote the document, good catch there. Can you help submit a patch to this?
Sure, I will do shortly (today or tomorrow).
Quoted 32 lines
Thanks
Quoted 28 lines · On Sat, 2016-02-27 at 03:10 +0100, [email protected] wrote:
Hi!
I've just checked linux-4.4 and linux-next and discovered the following issue.
The
Documentation/devicetree/bindings/gpio/gpio-altera.txtlists OF property altr,interrupt-trigger , which is not used anywhere in the kernel tree.The
drivers/gpio/gpio-altera.con the other hand checks for a mandatory OF property altr,interrupt-type and assigns it into variablealtera_gc->interrupt_trigger. Note that if this property is not in the DT, the driver will fail to probe.Clearly, there is a typo between altr,interrupt-trigger and altr,interrupt-type . Since the driver fails to probe if altr,...-type property is not present, there must be users of this variant in the wild. I believe the
Documentation/devicetreeis a part of DT ABI, so the bindings there should not be randomly changed.In this case, I would propose to change the Documentation though, since any users who try to use altr,...-trigger will have probe failures and fix their DT anyway.
Does this make sense ? If so, I will submit a patch .
Thanks!
Signature · 2 lines
Best regards, Marek Vasut