From: Ivaylo Dimitrov <ivo.g.dimitrov.75-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Grant Likely <grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] of/base: Replace alias if it already exists
Date: Tue, 03 Jun 2014 12:58:26 +0300 [thread overview]
Message-ID: <538D9C42.9040707@gmail.com> (raw)
In-Reply-To: <20140603085325.490A1C4096E-WNowdnHR2B42iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
On 3.06.2014 11:53, Grant Likely wrote:
> So, if I understand correctly, the .dtsi file sets up aliases like so:
>
> aliases {
> i2c0 = &i2c1;
> i2c1 = &i2c2;
> i2c2 = &i2c3;
> i2c3 = &i2c4;
> i2c4 = &i2c5;
> };
>
> and the board file does this:
>
>
> aliases {
> i2c1 = &i2c1;
> i2c2 = &i2c2;
> i2c3 = &i2c3;
> i2c4 = &i2c4;
> i2c5 = &i2c5;
> };
>
> Which results in a dtb that looks like this:
>
> aliases {
> i2c0 = &i2c1;
> i2c1 = &i2c1;
> i2c2 = &i2c2;
> i2c3 = &i2c3;
> i2c4 = &i2c4;
> i2c5 = &i2c5;
> };
>
> Do I understand correctly?
>
I guess this is the resulting dtb, at least kernel assigns "incorrect"
index(0) only to i2c1 bus.
> The way aliases works, it is completely valid to have multiple aliases
> pointing at the same node. There are also no ordering guarantees about
> which comes first, so though this patch might work for you at the
> moment, there is no guarantee that it will continue to do so. If the
> i2c0 alias is invalid for that platform, then it must be removed.
>
I see.
> Unfortunately, the overlays have no mechanism for removing properties at
> this time. Can you try putting the following into your board dts file
> and see if it works?
>
> aliases {
> i2c0; /* Deactivate the old alias by making it blank */
> i2c1 = &i2c1;
> i2c2 = &i2c2;
> i2c3 = &i2c3;
> i2c4 = &i2c4;
> i2c5 = &i2c5;
> };
>
> g.
>
Will do, as soon as I get back home.
Thanks,
Ivo
--
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
WARNING: multiple messages have this Message-ID (diff)
From: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
To: Grant Likely <grant.likely@linaro.org>
Cc: robh+dt@kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] of/base: Replace alias if it already exists
Date: Tue, 03 Jun 2014 12:58:26 +0300 [thread overview]
Message-ID: <538D9C42.9040707@gmail.com> (raw)
In-Reply-To: <20140603085325.490A1C4096E@trevor.secretlab.ca>
On 3.06.2014 11:53, Grant Likely wrote:
> So, if I understand correctly, the .dtsi file sets up aliases like so:
>
> aliases {
> i2c0 = &i2c1;
> i2c1 = &i2c2;
> i2c2 = &i2c3;
> i2c3 = &i2c4;
> i2c4 = &i2c5;
> };
>
> and the board file does this:
>
>
> aliases {
> i2c1 = &i2c1;
> i2c2 = &i2c2;
> i2c3 = &i2c3;
> i2c4 = &i2c4;
> i2c5 = &i2c5;
> };
>
> Which results in a dtb that looks like this:
>
> aliases {
> i2c0 = &i2c1;
> i2c1 = &i2c1;
> i2c2 = &i2c2;
> i2c3 = &i2c3;
> i2c4 = &i2c4;
> i2c5 = &i2c5;
> };
>
> Do I understand correctly?
>
I guess this is the resulting dtb, at least kernel assigns "incorrect"
index(0) only to i2c1 bus.
> The way aliases works, it is completely valid to have multiple aliases
> pointing at the same node. There are also no ordering guarantees about
> which comes first, so though this patch might work for you at the
> moment, there is no guarantee that it will continue to do so. If the
> i2c0 alias is invalid for that platform, then it must be removed.
>
I see.
> Unfortunately, the overlays have no mechanism for removing properties at
> this time. Can you try putting the following into your board dts file
> and see if it works?
>
> aliases {
> i2c0; /* Deactivate the old alias by making it blank */
> i2c1 = &i2c1;
> i2c2 = &i2c2;
> i2c3 = &i2c3;
> i2c4 = &i2c4;
> i2c5 = &i2c5;
> };
>
> g.
>
Will do, as soon as I get back home.
Thanks,
Ivo
next prev parent reply other threads:[~2014-06-03 9:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-01 12:01 [PATCH] of/base: Replace alias if it already exists Ivaylo Dimitrov
[not found] ` <1401624083-30796-1-git-send-email-ivo.g.dimitrov.75-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-06-02 14:59 ` Grant Likely
2014-06-02 14:59 ` Grant Likely
2014-06-02 16:07 ` Ivaylo Dimitrov
[not found] ` <538CA125.7090906-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-06-03 8:53 ` Grant Likely
2014-06-03 8:53 ` Grant Likely
[not found] ` <20140603085325.490A1C4096E-WNowdnHR2B42iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2014-06-03 9:58 ` Ivaylo Dimitrov [this message]
2014-06-03 9:58 ` Ivaylo Dimitrov
[not found] ` <538D9C42.9040707-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-06-03 17:09 ` Ivaylo Dimitrov
2014-06-03 17:09 ` Ivaylo Dimitrov
[not found] ` <538E0144.1050700-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-06-03 22:54 ` Grant Likely
2014-06-03 22:54 ` Grant Likely
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=538D9C42.9040707@gmail.com \
--to=ivo.g.dimitrov.75-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@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 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.