From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
To: Ryan <ryanphilips19-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Status variable
Date: Fri, 29 Jan 2016 10:18:52 +0100 [thread overview]
Message-ID: <1530624.RRYs7rau87@wuerfel> (raw)
In-Reply-To: <CANMsd01PnqUe+NVp-OGE3aMN=k1b4KX_D5YBnQAbPuHcT1+SWQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Friday 29 January 2016 14:40:33 Ryan wrote:
> Hello Bergman,
>
> Thanks for your help and time. Also I have seen that sometimes we use
>
> i2c0: i2c@44e0b000 {
>
>
> }
>
> and Sometimes
>
> i2c@44e0b000
>
> Why is that? What is the purpose of adding a i2c0: infront of the i2c
> entry. that too in the same file.
The "i2c0" is a label that can be used to reference the device as a
shortcut, so you don't have to write the entire path. If you
have a device with the full path "/soc/axi/ahb/i2c@44e0b000",
you can add the status="okay" propert by writing
/soc/axi/ahb/i2c@44e0b000 {
status = "okay";
};
or you can do the shortcut and write
&i2c0 {
status = "okay";
};
after you have defined the label. Some people prefer the latter
for brevity, others prefer an even more elaborate version by
always writing
/ {
soc {
axi {
ahb {
i2c0: i2c@44e0b000 {
status = "okay";
};
};
};
};
};
which is the same thing as the above two again, but even duplicates
the label. I would recommend one of the first two approaches, and do
it consistently.
Arnd
--
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
next prev parent reply other threads:[~2016-01-29 9:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-29 8:43 Status variable Ryan
[not found] ` <CANMsd02jhaouPBuySWXQ2edE+gyMZ3dncobipKa-dg1vLJCE2Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-29 8:49 ` Arnd Bergmann
2016-01-29 9:10 ` Ryan
[not found] ` <CANMsd01PnqUe+NVp-OGE3aMN=k1b4KX_D5YBnQAbPuHcT1+SWQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-29 9:18 ` Arnd Bergmann [this message]
2016-01-29 9:23 ` Ryan
[not found] ` <CANMsd01ty4H3mP0-6kyc0ZxMBAd7p2Y6o7dHy4sFSGhog22R2w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-29 9:30 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1530624.RRYs7rau87@wuerfel \
--to=arnd-r2ngtmty4d4@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=ryanphilips19-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox