All of lore.kernel.org
 help / color / mirror / Atom feed
* [DT Question] "simple-mfd" DT binding
@ 2017-05-22  1:29 ` Masahiro Yamada
  0 siblings, 0 replies; 17+ 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] 17+ messages in thread

* [DT Question] "simple-mfd" DT binding
@ 2017-05-22  1:29 ` Masahiro Yamada
  0 siblings, 0 replies; 17+ messages in thread
From: Masahiro Yamada @ 2017-05-22  1:29 UTC (permalink / raw)
  To: linux-arm-kernel

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 at 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 at 10000000/led at 08.0 missing or empty reg/ranges
property
arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
Node /soc/syscon at 10000000/led at 08.1 missing or empty reg/ranges
property
arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
Node /soc/syscon at 10000000/led at 08.2 missing or empty reg/ranges
property
arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
Node /soc/syscon at 10000000/led at 08.3 missing or empty reg/ranges
property
arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
Node /soc/syscon at 10000000/led at 08.4 missing or empty reg/ranges
property
arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
Node /soc/syscon at 10000000/led at 08.5 missing or empty reg/ranges
property
arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
Node /soc/syscon at 10000000/led at 08.6 missing or empty reg/ranges
property
arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
Node /soc/syscon at 10000000/led at 08.7 missing or empty reg/ranges
property
arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
Node /soc/syscon at 10000000/osc0 at 0c missing or empty reg/ranges property
arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
Node /soc/syscon at 10000000/osc1 at 10 missing or empty reg/ranges property
arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
Node /soc/syscon at 10000000/osc2 at 14 missing or empty reg/ranges property
arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
Node /soc/syscon at 10000000/osc3 at 18 missing or empty reg/ranges property
arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
Node /soc/syscon at 10000000/osc4@1c missing or empty reg/ranges property






-- 
Best Regards
Masahiro Yamada

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

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

On Mon, 22 May 2017, Masahiro Yamada wrote:

> 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?

You can use them interchangeably and they will 'work', but the
implication will be wrong.  Hence why both exist.

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

Correct.  It would be inappropriate to use "simple-bus" for this use
case.  That is most likely why "simple-mfd" is used instead.

> 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

Exactly.  Don't do that. :)

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* [DT Question] "simple-mfd" DT binding
@ 2017-05-22  7:40   ` Lee Jones
  0 siblings, 0 replies; 17+ messages in thread
From: Lee Jones @ 2017-05-22  7:40 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, 22 May 2017, Masahiro Yamada wrote:

> 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?

You can use them interchangeably and they will 'work', but the
implication will be wrong.  Hence why both exist.

> If so, I thought the example some lines below is questionable.
> 
> ---------------------8<---------------------------
> Example:
> 
> foo at 1000 {
>         compatible = "syscon", "simple-mfd";
>         reg = <0x01000 0x1000>;
> 
>         led at 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.

Correct.  It would be inappropriate to use "simple-bus" for this use
case.  That is most likely why "simple-mfd" is used instead.

> 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 at 10000000/led at 08.0 missing or empty reg/ranges
> property
> arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
> Node /soc/syscon at 10000000/led at 08.1 missing or empty reg/ranges
> property
> arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
> Node /soc/syscon at 10000000/led at 08.2 missing or empty reg/ranges
> property
> arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
> Node /soc/syscon at 10000000/led at 08.3 missing or empty reg/ranges
> property
> arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
> Node /soc/syscon at 10000000/led at 08.4 missing or empty reg/ranges
> property
> arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
> Node /soc/syscon at 10000000/led at 08.5 missing or empty reg/ranges
> property
> arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
> Node /soc/syscon at 10000000/led at 08.6 missing or empty reg/ranges
> property
> arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
> Node /soc/syscon at 10000000/led at 08.7 missing or empty reg/ranges
> property
> arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
> Node /soc/syscon at 10000000/osc0 at 0c missing or empty reg/ranges property
> arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
> Node /soc/syscon at 10000000/osc1 at 10 missing or empty reg/ranges property
> arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
> Node /soc/syscon at 10000000/osc2 at 14 missing or empty reg/ranges property
> arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
> Node /soc/syscon at 10000000/osc3 at 18 missing or empty reg/ranges property
> arch/arm/boot/dts/arm-realview-pb1176.dtb: Warning (simple_bus_reg):
> Node /soc/syscon at 10000000/osc4 at 1c missing or empty reg/ranges property

Exactly.  Don't do that. :)

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

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

On Mon, May 22, 2017 at 3:29 AM, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:

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

Yeah... just like Lee points out, you are spot on, this is exactly
the reason why we created "simple-mfd" in the first place
IIRC.

Yours,
Linus Walleij

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

* [DT Question] "simple-mfd" DT binding
@ 2017-05-22  8:43   ` Linus Walleij
  0 siblings, 0 replies; 17+ messages in thread
From: Linus Walleij @ 2017-05-22  8:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, May 22, 2017 at 3:29 AM, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:

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

Yeah... just like Lee points out, you are spot on, this is exactly
the reason why we created "simple-mfd" in the first place
IIRC.

Yours,
Linus Walleij

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

* Re: [DT Question] "simple-mfd" DT binding
@ 2017-05-23  1:21     ` Masahiro Yamada
  0 siblings, 0 replies; 17+ messages in thread
From: Masahiro Yamada @ 2017-05-23  1:21 UTC (permalink / raw)
  To: Linus Walleij
  Cc: devicetree, Rob Herring, Arnd Bergmann, Lee Jones,
	Linux Kernel Mailing List, linux-arm-kernel, Mark Rutland

Hi Lee, Linus,

Thanks for your comments!

2017-05-22 17:43 GMT+09:00 Linus Walleij <linus.walleij@linaro.org>:
> On Mon, May 22, 2017 at 3:29 AM, Masahiro Yamada
> <yamada.masahiro@socionext.com> wrote:
>
>> 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.
>
> Yeah... just like Lee points out, you are spot on, this is exactly
> the reason why we created "simple-mfd" in the first place
> IIRC.

OK, Linux treats simple-bus and simple-mfd in the same way
as far as I see drivers/of/platform.c

Perhaps, can we document the difference between simple-bus and
simple-mfd clearly?
For example, "Unlike simple-bus, it is legitimate that simple-mfd has
subnodes without reg property"


I think this is typical when "simple-mfd" is used together with "syscon".
The child devices will use regmap of the parent node.
I'd like to be sure this is valid usage.


-- 
Best Regards
Masahiro Yamada

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

* Re: [DT Question] "simple-mfd" DT binding
@ 2017-05-23  1:21     ` Masahiro Yamada
  0 siblings, 0 replies; 17+ messages in thread
From: Masahiro Yamada @ 2017-05-23  1:21 UTC (permalink / raw)
  To: Linus Walleij
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Arnd Bergmann,
	Lee Jones, Linux Kernel Mailing List, linux-arm-kernel,
	Mark Rutland

Hi Lee, Linus,

Thanks for your comments!

2017-05-22 17:43 GMT+09:00 Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>:
> On Mon, May 22, 2017 at 3:29 AM, Masahiro Yamada
> <yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org> wrote:
>
>> 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.
>
> Yeah... just like Lee points out, you are spot on, this is exactly
> the reason why we created "simple-mfd" in the first place
> IIRC.

OK, Linux treats simple-bus and simple-mfd in the same way
as far as I see drivers/of/platform.c

Perhaps, can we document the difference between simple-bus and
simple-mfd clearly?
For example, "Unlike simple-bus, it is legitimate that simple-mfd has
subnodes without reg property"


I think this is typical when "simple-mfd" is used together with "syscon".
The child devices will use regmap of the parent node.
I'd like to be sure this is valid usage.


-- 
Best Regards
Masahiro Yamada
--
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] 17+ messages in thread

* [DT Question] "simple-mfd" DT binding
@ 2017-05-23  1:21     ` Masahiro Yamada
  0 siblings, 0 replies; 17+ messages in thread
From: Masahiro Yamada @ 2017-05-23  1:21 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Lee, Linus,

Thanks for your comments!

2017-05-22 17:43 GMT+09:00 Linus Walleij <linus.walleij@linaro.org>:
> On Mon, May 22, 2017 at 3:29 AM, Masahiro Yamada
> <yamada.masahiro@socionext.com> wrote:
>
>> 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.
>
> Yeah... just like Lee points out, you are spot on, this is exactly
> the reason why we created "simple-mfd" in the first place
> IIRC.

OK, Linux treats simple-bus and simple-mfd in the same way
as far as I see drivers/of/platform.c

Perhaps, can we document the difference between simple-bus and
simple-mfd clearly?
For example, "Unlike simple-bus, it is legitimate that simple-mfd has
subnodes without reg property"


I think this is typical when "simple-mfd" is used together with "syscon".
The child devices will use regmap of the parent node.
I'd like to be sure this is valid usage.


-- 
Best Regards
Masahiro Yamada

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

* Re: [DT Question] "simple-mfd" DT binding
  2017-05-23  1:21     ` Masahiro Yamada
@ 2017-05-23  7:05       ` Lee Jones
  -1 siblings, 0 replies; 17+ messages in thread
From: Lee Jones @ 2017-05-23  7:05 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Linus Walleij, devicetree, Rob Herring, Arnd Bergmann,
	Linux Kernel Mailing List, linux-arm-kernel, Mark Rutland

On Tue, 23 May 2017, Masahiro Yamada wrote:

> Hi Lee, Linus,
> 
> Thanks for your comments!
> 
> 2017-05-22 17:43 GMT+09:00 Linus Walleij <linus.walleij@linaro.org>:
> > On Mon, May 22, 2017 at 3:29 AM, Masahiro Yamada
> > <yamada.masahiro@socionext.com> wrote:
> >
> >> 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.
> >
> > Yeah... just like Lee points out, you are spot on, this is exactly
> > the reason why we created "simple-mfd" in the first place
> > IIRC.
> 
> OK, Linux treats simple-bus and simple-mfd in the same way
> as far as I see drivers/of/platform.c

Correct.  As I said, the functionality of the two are the same.  The
difference is their meaning.  Initially we were using "simple-mfd" to
achieve our aim (see below), but there was push-back due to the
differences in what the two properties were trying to achieve.  Ergo,
we introduced a second property.

> Perhaps, can we document the difference between simple-bus and
> simple-mfd clearly?
> For example, "Unlike simple-bus, it is legitimate that simple-mfd has
> subnodes without reg property"
> 
> 
> I think this is typical when "simple-mfd" is used together with "syscon".
> The child devices will use regmap of the parent node.
> I'd like to be sure this is valid usage.

"simple-mfd" simply means "register all of my child nodes using the
platform API without any further intervention".  It's goal is to
prevent the MFD subsystem from being stuffed full of drivers where
their only purpose is to call of_platform_populate().  All other rules
and policy which must be followed are generic DT ones.  To that end, I
do not believe making further statements is necessary.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* [DT Question] "simple-mfd" DT binding
@ 2017-05-23  7:05       ` Lee Jones
  0 siblings, 0 replies; 17+ messages in thread
From: Lee Jones @ 2017-05-23  7:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, 23 May 2017, Masahiro Yamada wrote:

> Hi Lee, Linus,
> 
> Thanks for your comments!
> 
> 2017-05-22 17:43 GMT+09:00 Linus Walleij <linus.walleij@linaro.org>:
> > On Mon, May 22, 2017 at 3:29 AM, Masahiro Yamada
> > <yamada.masahiro@socionext.com> wrote:
> >
> >> 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.
> >
> > Yeah... just like Lee points out, you are spot on, this is exactly
> > the reason why we created "simple-mfd" in the first place
> > IIRC.
> 
> OK, Linux treats simple-bus and simple-mfd in the same way
> as far as I see drivers/of/platform.c

Correct.  As I said, the functionality of the two are the same.  The
difference is their meaning.  Initially we were using "simple-mfd" to
achieve our aim (see below), but there was push-back due to the
differences in what the two properties were trying to achieve.  Ergo,
we introduced a second property.

> Perhaps, can we document the difference between simple-bus and
> simple-mfd clearly?
> For example, "Unlike simple-bus, it is legitimate that simple-mfd has
> subnodes without reg property"
> 
> 
> I think this is typical when "simple-mfd" is used together with "syscon".
> The child devices will use regmap of the parent node.
> I'd like to be sure this is valid usage.

"simple-mfd" simply means "register all of my child nodes using the
platform API without any further intervention".  It's goal is to
prevent the MFD subsystem from being stuffed full of drivers where
their only purpose is to call of_platform_populate().  All other rules
and policy which must be followed are generic DT ones.  To that end, I
do not believe making further statements is necessary.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [DT Question] "simple-mfd" DT binding
  2017-05-23  7:05       ` Lee Jones
  (?)
@ 2017-05-24  4:48         ` Masahiro Yamada
  -1 siblings, 0 replies; 17+ messages in thread
From: Masahiro Yamada @ 2017-05-24  4:48 UTC (permalink / raw)
  To: Lee Jones
  Cc: Linus Walleij, devicetree, Rob Herring, Arnd Bergmann,
	Linux Kernel Mailing List, linux-arm-kernel, Mark Rutland

Hi Lee,

2017-05-23 16:05 GMT+09:00 Lee Jones <lee.jones@linaro.org>:
> On Tue, 23 May 2017, Masahiro Yamada wrote:
>
>> Hi Lee, Linus,
>>
>> Thanks for your comments!
>>
>> 2017-05-22 17:43 GMT+09:00 Linus Walleij <linus.walleij@linaro.org>:
>> > On Mon, May 22, 2017 at 3:29 AM, Masahiro Yamada
>> > <yamada.masahiro@socionext.com> wrote:
>> >
>> >> 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.
>> >
>> > Yeah... just like Lee points out, you are spot on, this is exactly
>> > the reason why we created "simple-mfd" in the first place
>> > IIRC.
>>
>> OK, Linux treats simple-bus and simple-mfd in the same way
>> as far as I see drivers/of/platform.c
>
> Correct.  As I said, the functionality of the two are the same.  The
> difference is their meaning.  Initially we were using "simple-mfd" to
> achieve our aim (see below), but there was push-back due to the
> differences in what the two properties were trying to achieve.  Ergo,
> we introduced a second property.
>
>> Perhaps, can we document the difference between simple-bus and
>> simple-mfd clearly?
>> For example, "Unlike simple-bus, it is legitimate that simple-mfd has
>> subnodes without reg property"
>>
>>
>> I think this is typical when "simple-mfd" is used together with "syscon".
>> The child devices will use regmap of the parent node.
>> I'd like to be sure this is valid usage.
>
> "simple-mfd" simply means "register all of my child nodes using the
> platform API without any further intervention".  It's goal is to
> prevent the MFD subsystem from being stuffed full of drivers where
> their only purpose is to call of_platform_populate().  All other rules
> and policy which must be followed are generic DT ones.  To that end, I
> do not believe making further statements is necessary.

I see.  Thanks for your kind explanation!


-- 
Best Regards
Masahiro Yamada

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

* Re: [DT Question] "simple-mfd" DT binding
@ 2017-05-24  4:48         ` Masahiro Yamada
  0 siblings, 0 replies; 17+ messages in thread
From: Masahiro Yamada @ 2017-05-24  4:48 UTC (permalink / raw)
  To: Lee Jones
  Cc: Linus Walleij, devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring,
	Arnd Bergmann, Linux Kernel Mailing List, linux-arm-kernel,
	Mark Rutland

Hi Lee,

2017-05-23 16:05 GMT+09:00 Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>:
> On Tue, 23 May 2017, Masahiro Yamada wrote:
>
>> Hi Lee, Linus,
>>
>> Thanks for your comments!
>>
>> 2017-05-22 17:43 GMT+09:00 Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>:
>> > On Mon, May 22, 2017 at 3:29 AM, Masahiro Yamada
>> > <yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org> wrote:
>> >
>> >> 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.
>> >
>> > Yeah... just like Lee points out, you are spot on, this is exactly
>> > the reason why we created "simple-mfd" in the first place
>> > IIRC.
>>
>> OK, Linux treats simple-bus and simple-mfd in the same way
>> as far as I see drivers/of/platform.c
>
> Correct.  As I said, the functionality of the two are the same.  The
> difference is their meaning.  Initially we were using "simple-mfd" to
> achieve our aim (see below), but there was push-back due to the
> differences in what the two properties were trying to achieve.  Ergo,
> we introduced a second property.
>
>> Perhaps, can we document the difference between simple-bus and
>> simple-mfd clearly?
>> For example, "Unlike simple-bus, it is legitimate that simple-mfd has
>> subnodes without reg property"
>>
>>
>> I think this is typical when "simple-mfd" is used together with "syscon".
>> The child devices will use regmap of the parent node.
>> I'd like to be sure this is valid usage.
>
> "simple-mfd" simply means "register all of my child nodes using the
> platform API without any further intervention".  It's goal is to
> prevent the MFD subsystem from being stuffed full of drivers where
> their only purpose is to call of_platform_populate().  All other rules
> and policy which must be followed are generic DT ones.  To that end, I
> do not believe making further statements is necessary.

I see.  Thanks for your kind explanation!


-- 
Best Regards
Masahiro Yamada
--
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] 17+ messages in thread

* [DT Question] "simple-mfd" DT binding
@ 2017-05-24  4:48         ` Masahiro Yamada
  0 siblings, 0 replies; 17+ messages in thread
From: Masahiro Yamada @ 2017-05-24  4:48 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Lee,

2017-05-23 16:05 GMT+09:00 Lee Jones <lee.jones@linaro.org>:
> On Tue, 23 May 2017, Masahiro Yamada wrote:
>
>> Hi Lee, Linus,
>>
>> Thanks for your comments!
>>
>> 2017-05-22 17:43 GMT+09:00 Linus Walleij <linus.walleij@linaro.org>:
>> > On Mon, May 22, 2017 at 3:29 AM, Masahiro Yamada
>> > <yamada.masahiro@socionext.com> wrote:
>> >
>> >> 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.
>> >
>> > Yeah... just like Lee points out, you are spot on, this is exactly
>> > the reason why we created "simple-mfd" in the first place
>> > IIRC.
>>
>> OK, Linux treats simple-bus and simple-mfd in the same way
>> as far as I see drivers/of/platform.c
>
> Correct.  As I said, the functionality of the two are the same.  The
> difference is their meaning.  Initially we were using "simple-mfd" to
> achieve our aim (see below), but there was push-back due to the
> differences in what the two properties were trying to achieve.  Ergo,
> we introduced a second property.
>
>> Perhaps, can we document the difference between simple-bus and
>> simple-mfd clearly?
>> For example, "Unlike simple-bus, it is legitimate that simple-mfd has
>> subnodes without reg property"
>>
>>
>> I think this is typical when "simple-mfd" is used together with "syscon".
>> The child devices will use regmap of the parent node.
>> I'd like to be sure this is valid usage.
>
> "simple-mfd" simply means "register all of my child nodes using the
> platform API without any further intervention".  It's goal is to
> prevent the MFD subsystem from being stuffed full of drivers where
> their only purpose is to call of_platform_populate().  All other rules
> and policy which must be followed are generic DT ones.  To that end, I
> do not believe making further statements is necessary.

I see.  Thanks for your kind explanation!


-- 
Best Regards
Masahiro Yamada

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

* Re: [DT Question] "simple-mfd" DT binding
@ 2017-05-24  7:16           ` Lee Jones
  0 siblings, 0 replies; 17+ messages in thread
From: Lee Jones @ 2017-05-24  7:16 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Linus Walleij, devicetree, Rob Herring, Arnd Bergmann,
	Linux Kernel Mailing List, linux-arm-kernel, Mark Rutland

On Wed, 24 May 2017, Masahiro Yamada wrote:

> Hi Lee,
> 
> 2017-05-23 16:05 GMT+09:00 Lee Jones <lee.jones@linaro.org>:
> > On Tue, 23 May 2017, Masahiro Yamada wrote:
> >
> >> Hi Lee, Linus,
> >>
> >> Thanks for your comments!
> >>
> >> 2017-05-22 17:43 GMT+09:00 Linus Walleij <linus.walleij@linaro.org>:
> >> > On Mon, May 22, 2017 at 3:29 AM, Masahiro Yamada
> >> > <yamada.masahiro@socionext.com> wrote:
> >> >
> >> >> 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.
> >> >
> >> > Yeah... just like Lee points out, you are spot on, this is exactly
> >> > the reason why we created "simple-mfd" in the first place
> >> > IIRC.
> >>
> >> OK, Linux treats simple-bus and simple-mfd in the same way
> >> as far as I see drivers/of/platform.c
> >
> > Correct.  As I said, the functionality of the two are the same.  The
> > difference is their meaning.  Initially we were using "simple-mfd" to

This should have read "simple-bus".

Sorry for any confusion this may have caused.

> > achieve our aim (see below), but there was push-back due to the
> > differences in what the two properties were trying to achieve.  Ergo,
> > we introduced a second property.
> >
> >> Perhaps, can we document the difference between simple-bus and
> >> simple-mfd clearly?
> >> For example, "Unlike simple-bus, it is legitimate that simple-mfd has
> >> subnodes without reg property"
> >>
> >>
> >> I think this is typical when "simple-mfd" is used together with "syscon".
> >> The child devices will use regmap of the parent node.
> >> I'd like to be sure this is valid usage.
> >
> > "simple-mfd" simply means "register all of my child nodes using the
> > platform API without any further intervention".  It's goal is to
> > prevent the MFD subsystem from being stuffed full of drivers where
> > their only purpose is to call of_platform_populate().  All other rules
> > and policy which must be followed are generic DT ones.  To that end, I
> > do not believe making further statements is necessary.
> 
> I see.  Thanks for your kind explanation!

No problem.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [DT Question] "simple-mfd" DT binding
@ 2017-05-24  7:16           ` Lee Jones
  0 siblings, 0 replies; 17+ messages in thread
From: Lee Jones @ 2017-05-24  7:16 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Linus Walleij, devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring,
	Arnd Bergmann, Linux Kernel Mailing List, linux-arm-kernel,
	Mark Rutland

On Wed, 24 May 2017, Masahiro Yamada wrote:

> Hi Lee,
> 
> 2017-05-23 16:05 GMT+09:00 Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>:
> > On Tue, 23 May 2017, Masahiro Yamada wrote:
> >
> >> Hi Lee, Linus,
> >>
> >> Thanks for your comments!
> >>
> >> 2017-05-22 17:43 GMT+09:00 Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>:
> >> > On Mon, May 22, 2017 at 3:29 AM, Masahiro Yamada
> >> > <yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org> wrote:
> >> >
> >> >> 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.
> >> >
> >> > Yeah... just like Lee points out, you are spot on, this is exactly
> >> > the reason why we created "simple-mfd" in the first place
> >> > IIRC.
> >>
> >> OK, Linux treats simple-bus and simple-mfd in the same way
> >> as far as I see drivers/of/platform.c
> >
> > Correct.  As I said, the functionality of the two are the same.  The
> > difference is their meaning.  Initially we were using "simple-mfd" to

This should have read "simple-bus".

Sorry for any confusion this may have caused.

> > achieve our aim (see below), but there was push-back due to the
> > differences in what the two properties were trying to achieve.  Ergo,
> > we introduced a second property.
> >
> >> Perhaps, can we document the difference between simple-bus and
> >> simple-mfd clearly?
> >> For example, "Unlike simple-bus, it is legitimate that simple-mfd has
> >> subnodes without reg property"
> >>
> >>
> >> I think this is typical when "simple-mfd" is used together with "syscon".
> >> The child devices will use regmap of the parent node.
> >> I'd like to be sure this is valid usage.
> >
> > "simple-mfd" simply means "register all of my child nodes using the
> > platform API without any further intervention".  It's goal is to
> > prevent the MFD subsystem from being stuffed full of drivers where
> > their only purpose is to call of_platform_populate().  All other rules
> > and policy which must be followed are generic DT ones.  To that end, I
> > do not believe making further statements is necessary.
> 
> I see.  Thanks for your kind explanation!

No problem.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
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] 17+ messages in thread

* [DT Question] "simple-mfd" DT binding
@ 2017-05-24  7:16           ` Lee Jones
  0 siblings, 0 replies; 17+ messages in thread
From: Lee Jones @ 2017-05-24  7:16 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, 24 May 2017, Masahiro Yamada wrote:

> Hi Lee,
> 
> 2017-05-23 16:05 GMT+09:00 Lee Jones <lee.jones@linaro.org>:
> > On Tue, 23 May 2017, Masahiro Yamada wrote:
> >
> >> Hi Lee, Linus,
> >>
> >> Thanks for your comments!
> >>
> >> 2017-05-22 17:43 GMT+09:00 Linus Walleij <linus.walleij@linaro.org>:
> >> > On Mon, May 22, 2017 at 3:29 AM, Masahiro Yamada
> >> > <yamada.masahiro@socionext.com> wrote:
> >> >
> >> >> 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.
> >> >
> >> > Yeah... just like Lee points out, you are spot on, this is exactly
> >> > the reason why we created "simple-mfd" in the first place
> >> > IIRC.
> >>
> >> OK, Linux treats simple-bus and simple-mfd in the same way
> >> as far as I see drivers/of/platform.c
> >
> > Correct.  As I said, the functionality of the two are the same.  The
> > difference is their meaning.  Initially we were using "simple-mfd" to

This should have read "simple-bus".

Sorry for any confusion this may have caused.

> > achieve our aim (see below), but there was push-back due to the
> > differences in what the two properties were trying to achieve.  Ergo,
> > we introduced a second property.
> >
> >> Perhaps, can we document the difference between simple-bus and
> >> simple-mfd clearly?
> >> For example, "Unlike simple-bus, it is legitimate that simple-mfd has
> >> subnodes without reg property"
> >>
> >>
> >> I think this is typical when "simple-mfd" is used together with "syscon".
> >> The child devices will use regmap of the parent node.
> >> I'd like to be sure this is valid usage.
> >
> > "simple-mfd" simply means "register all of my child nodes using the
> > platform API without any further intervention".  It's goal is to
> > prevent the MFD subsystem from being stuffed full of drivers where
> > their only purpose is to call of_platform_populate().  All other rules
> > and policy which must be followed are generic DT ones.  To that end, I
> > do not believe making further statements is necessary.
> 
> I see.  Thanks for your kind explanation!

No problem.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

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

Thread overview: 17+ 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  1:29 ` Masahiro Yamada
2017-05-22  7:40 ` Lee Jones
2017-05-22  7:40   ` Lee Jones
2017-05-22  8:43 ` Linus Walleij
2017-05-22  8:43   ` Linus Walleij
2017-05-23  1:21   ` Masahiro Yamada
2017-05-23  1:21     ` Masahiro Yamada
2017-05-23  1:21     ` Masahiro Yamada
2017-05-23  7:05     ` Lee Jones
2017-05-23  7:05       ` Lee Jones
2017-05-24  4:48       ` Masahiro Yamada
2017-05-24  4:48         ` Masahiro Yamada
2017-05-24  4:48         ` Masahiro Yamada
2017-05-24  7:16         ` Lee Jones
2017-05-24  7:16           ` Lee Jones
2017-05-24  7:16           ` Lee Jones

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.