Article 6PZT7 How to export a node label in a device tree overlay

How to export a node label in a device tree overlay

by
Cranegsh
from LinuxQuestions.org on (#6PZT7)
Hello,

I am trying to use __exports__ to export a node label from a device tree overlay so that it can be referred outside of this device tree overlay.

Tried this way:
Code: fragment@0 {
target = <&i2c1>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
pcf8575c: pcf8575c@20 {
pcf8575c;
reg = <0x20>;
compatible = "ti,pcf8575c";
gpio-controller;
#gpio-cells = <2>;
ngpios = <16>;
gpio-base = <200>;
label = "pcf8575c";
};
__exports__ {
pcf8575c;
};
};
};Than the dt overlay failed to be applied.

And tried this way:
Code:Code: Select all

fragment@0 {
target = <&i2c1>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
pcf8575c: pcf8575c@20 {
pcf8575c;
reg = <0x20>;
compatible = "ti,pcf8575c";
gpio-controller;
#gpio-cells = <2>;
ngpios = <16>;
gpio-base = <200>;
label = "pcf8575c";
};
};
__exports__ {
pcf8575c;
};
};Then it is applied, but seems not working. The GPIO dt overlay which is based on this I2C expander node is still fails to be applied.

So the question is, how to export a label effectively?
I couldn't find anything from googling it. It seems that __exports__ is rarely used. I am wondering if this kind of node that might be referred by other nodes is usually put in device tree, instead of device tree overlay.

Thanks!
Crane
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments