* How to add multiple example with conflicting includes
@ 2019-07-26 18:11 Corentin Labbe
2019-08-13 5:44 ` Maxime Ripard
2019-08-20 21:08 ` Rob Herring
0 siblings, 2 replies; 3+ messages in thread
From: Corentin Labbe @ 2019-07-26 18:11 UTC (permalink / raw)
To: robh+dt, mark.rutland, devicetree, linux-kernel
Hello
When I try to check the following examples of a devicetree schema:
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/sun50i-a64-ccu.h>
#include <dt-bindings/reset/sun50i-a64-ccu.h>
crypto: crypto@1c15000 {
compatible = "allwinner,sun8i-h3-crypto";
reg = <0x01c15000 0x1000>;
interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&ccu CLK_BUS_CE>, <&ccu CLK_CE>;
clock-names = "ahb", "mod";
resets = <&ccu RST_BUS_CE>;
reset-names = "ahb";
};
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/sun50i-h6-ccu.h>
#include <dt-bindings/reset/sun50i-h6-ccu.h>
crypto: crypto@1904000 {
compatible = "allwinner,sun50i-h6-crypto";
reg = <0x01904000 0x1000>;
interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&ccu CLK_BUS_CE>, <&ccu CLK_CE>, <&ccu CLK_MBUS_CE>;
clock-names = "ahb", "mod", "mbus";
resets = <&ccu RST_BUS_CE>;
reset-names = "ahb";
};
I get:
In file included from Documentation/devicetree/bindings/crypto/allwinner,sun8i-ce.example.dts:42:
/linux-next/scripts/dtc/include-prefixes/dt-bindings/clock/sun50i-h6-ccu.h:9: warning: "CLK_PLL_PERIPH0" redefined
#define CLK_PLL_PERIPH0 3
[...]
So how can I add multiple examples which need somes conflicting #include to be validated.
Thanks
Regards
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to add multiple example with conflicting includes
2019-07-26 18:11 How to add multiple example with conflicting includes Corentin Labbe
@ 2019-08-13 5:44 ` Maxime Ripard
2019-08-20 21:08 ` Rob Herring
1 sibling, 0 replies; 3+ messages in thread
From: Maxime Ripard @ 2019-08-13 5:44 UTC (permalink / raw)
To: robh+dt; +Cc: mark.rutland, devicetree, linux-kernel, Corentin Labbe
Hi Rob,
On Fri, Jul 26, 2019 at 08:11:08PM +0200, Corentin Labbe wrote:
> When I try to check the following examples of a devicetree schema:
> examples:
> - |
> #include <dt-bindings/interrupt-controller/arm-gic.h>
> #include <dt-bindings/clock/sun50i-a64-ccu.h>
> #include <dt-bindings/reset/sun50i-a64-ccu.h>
>
> crypto: crypto@1c15000 {
> compatible = "allwinner,sun8i-h3-crypto";
> reg = <0x01c15000 0x1000>;
> interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
> clocks = <&ccu CLK_BUS_CE>, <&ccu CLK_CE>;
> clock-names = "ahb", "mod";
> resets = <&ccu RST_BUS_CE>;
> reset-names = "ahb";
> };
>
> - |
> #include <dt-bindings/interrupt-controller/arm-gic.h>
> #include <dt-bindings/clock/sun50i-h6-ccu.h>
> #include <dt-bindings/reset/sun50i-h6-ccu.h>
>
> crypto: crypto@1904000 {
> compatible = "allwinner,sun50i-h6-crypto";
> reg = <0x01904000 0x1000>;
> interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
> clocks = <&ccu CLK_BUS_CE>, <&ccu CLK_CE>, <&ccu CLK_MBUS_CE>;
> clock-names = "ahb", "mod", "mbus";
> resets = <&ccu RST_BUS_CE>;
> reset-names = "ahb";
> };
>
> I get:
> In file included from Documentation/devicetree/bindings/crypto/allwinner,sun8i-ce.example.dts:42:
> /linux-next/scripts/dtc/include-prefixes/dt-bindings/clock/sun50i-h6-ccu.h:9: warning: "CLK_PLL_PERIPH0" redefined
> #define CLK_PLL_PERIPH0 3
> [...]
>
> So how can I add multiple examples which need somes conflicting
> #include to be validated.
I'm having the same issue right now, is there a proper fix /
workaround?
Thanks!
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to add multiple example with conflicting includes
2019-07-26 18:11 How to add multiple example with conflicting includes Corentin Labbe
2019-08-13 5:44 ` Maxime Ripard
@ 2019-08-20 21:08 ` Rob Herring
1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2019-08-20 21:08 UTC (permalink / raw)
To: Corentin Labbe; +Cc: Mark Rutland, devicetree, linux-kernel@vger.kernel.org
On Fri, Jul 26, 2019 at 1:11 PM Corentin Labbe
<clabbe.montjoie@gmail.com> wrote:
>
> Hello
>
> When I try to check the following examples of a devicetree schema:
> examples:
> - |
> #include <dt-bindings/interrupt-controller/arm-gic.h>
> #include <dt-bindings/clock/sun50i-a64-ccu.h>
> #include <dt-bindings/reset/sun50i-a64-ccu.h>
>
> crypto: crypto@1c15000 {
> compatible = "allwinner,sun8i-h3-crypto";
> reg = <0x01c15000 0x1000>;
> interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
> clocks = <&ccu CLK_BUS_CE>, <&ccu CLK_CE>;
> clock-names = "ahb", "mod";
> resets = <&ccu RST_BUS_CE>;
> reset-names = "ahb";
> };
>
> - |
> #include <dt-bindings/interrupt-controller/arm-gic.h>
> #include <dt-bindings/clock/sun50i-h6-ccu.h>
> #include <dt-bindings/reset/sun50i-h6-ccu.h>
>
> crypto: crypto@1904000 {
> compatible = "allwinner,sun50i-h6-crypto";
> reg = <0x01904000 0x1000>;
> interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
> clocks = <&ccu CLK_BUS_CE>, <&ccu CLK_CE>, <&ccu CLK_MBUS_CE>;
> clock-names = "ahb", "mod", "mbus";
> resets = <&ccu RST_BUS_CE>;
> reset-names = "ahb";
> };
>
> I get:
> In file included from Documentation/devicetree/bindings/crypto/allwinner,sun8i-ce.example.dts:42:
> /linux-next/scripts/dtc/include-prefixes/dt-bindings/clock/sun50i-h6-ccu.h:9: warning: "CLK_PLL_PERIPH0" redefined
> #define CLK_PLL_PERIPH0 3
> [...]
>
> So how can I add multiple examples which need somes conflicting #include to be validated.
2 clocks versus 3 clocks hardly seems like a reason for a 2nd example
and I would just drop it IMO.
You could rename your defines to not collide, but that's kind of painful.
The 3rd option is getting dt-extract-example to spit out N example
files and then build each one separately. That was more complicated
than I cared to figure out with kbuild, so I went the simple route.
Rob
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-08-20 21:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-26 18:11 How to add multiple example with conflicting includes Corentin Labbe
2019-08-13 5:44 ` Maxime Ripard
2019-08-20 21:08 ` Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).