linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [DT Question] "simple-mfd" DT binding
@ 2017-05-22  1:29 Masahiro Yamada
  2017-05-22  7:40 ` Lee Jones
  2017-05-22  8:43 ` Linus Walleij
  0 siblings, 2 replies; 7+ messages in thread
From: Masahiro Yamada @ 2017-05-22  1:29 UTC (permalink / raw)
  To: devicetree, Rob Herring, Arnd Bergmann, Lee Jones, Linus Walleij
  Cc: masahiroy, Linux Kernel Mailing List, linux-arm-kernel, Mark Rutland

Hi DT experts,

I have a question about "simple-mfd".


Documentation/devicetree/bindings/mfd/mfd.txt says as allows:

----------------------8<---------------------
Optional properties:

- compatible : "simple-mfd" - this signifies that the operating system should
  consider all subnodes of the MFD device as separate devices akin to how
  "simple-bus" indicates when to see subnodes as children for a simple
  memory-mapped bus.   <snip>
----------------------8<---------------------


I'd like to be sure about the statement above.

Does this mean, "simple-bus" and "simple-mfd" are technically interchangeable?



If so, I thought the example some lines below is questionable.

---------------------8<---------------------------
Example:

foo@1000 {
        compatible = "syscon", "simple-mfd";
        reg = <0x01000 0x1000>;

        led@08.0 {
                compatible = "register-bit-led";
                offset = <0x08>;
                mask = <0x01>;
                label = "myled";
                default-state = "on";
        };
};
---------------------8<---------------------------


Because "simple-bus" indicates that child nodes are
simply memory mapped, but the node "register-bit-led"
can not be memory-mapped.
So, "simple-mfd" can not be replaced "simple-bus" here.



arch/arm/boot/dts/arm-realview-pb1176.dts is a real example.

If I replace "simple-mfd" with "simple-bus",
DTC warns "empty reg/ranges property".



$ sed -i  -e 's/simple-mfd/simple-bus/'
arch/arm/boot/dts/arm-realview-pb1176.dts
$ make -s ARCH=arm defconfig
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- W=1  arm-realview-pb1176.dtb
   ...
arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
Node /soc/syscon@10000000/led@08.0 missing or empty reg/ranges
property
arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
Node /soc/syscon@10000000/led@08.1 missing or empty reg/ranges
property
arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
Node /soc/syscon@10000000/led@08.2 missing or empty reg/ranges
property
arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
Node /soc/syscon@10000000/led@08.3 missing or empty reg/ranges
property
arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
Node /soc/syscon@10000000/led@08.4 missing or empty reg/ranges
property
arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
Node /soc/syscon@10000000/led@08.5 missing or empty reg/ranges
property
arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
Node /soc/syscon@10000000/led@08.6 missing or empty reg/ranges
property
arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
Node /soc/syscon@10000000/led@08.7 missing or empty reg/ranges
property
arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
Node /soc/syscon@10000000/osc0@0c missing or empty reg/ranges property
arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
Node /soc/syscon@10000000/osc1@10 missing or empty reg/ranges property
arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
Node /soc/syscon@10000000/osc2@14 missing or empty reg/ranges property
arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
Node /soc/syscon@10000000/osc3@18 missing or empty reg/ranges property
arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
Node /soc/syscon@10000000/osc4@1c missing or empty reg/ranges property






-- 
Best Regards
Masahiro Yamada

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

end of thread, other threads:[~2017-05-24  7:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-22  1:29 [DT Question] "simple-mfd" DT binding Masahiro Yamada
2017-05-22  7:40 ` Lee Jones
2017-05-22  8:43 ` Linus Walleij
2017-05-23  1:21   ` Masahiro Yamada
2017-05-23  7:05     ` Lee Jones
2017-05-24  4:48       ` Masahiro Yamada
2017-05-24  7:16         ` Lee Jones

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).