From: Alexander Shiyan <eagle.alexander923@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: Possible regression 2024.12.0 in parsing "aliases"
Date: Thu, 12 Dec 2024 15:23:03 +0300 [thread overview]
Message-ID: <CAP1tNvQPB3qEJVc+GMOR=dZi3Biyj+zWWU3a8r1Z8gfdwEf6eg@mail.gmail.com> (raw)
In-Reply-To: <Z1rJniSaV7iWgr6F@pengutronix.de>
Changes to:
if (adapter->nr < 0 && adapter->dev.of_node)
adapter->nr = of_alias_get_id(adapter->dev.of_node, "i2c");
fix adding mux-adapter. Is this correct?
чт, 12 дек. 2024 г. в 14:31, Sascha Hauer <s.hauer@pengutronix.de>:
>
> On Thu, Dec 12, 2024 at 12:30:18PM +0300, Alexander Shiyan wrote:
> > Hello.
> >
> > There seems to be a bug in getting the ID in i2c_add_numbered_adapter()
> > It uses dev.parent instead of dev, for example:
> > of_alias_get_id(adapter->dev.of_node, "i2c");
> >
> > And with this everything works as expected.
>
> I don't understand this. In i2c-rockchip.c we have:
>
> i2c->adapter.dev.parent = dev;
> i2c->adapter.dev.of_node = dev->of_node;
> i2c_add_numbered_adapter(&i2c->adapter);
>
> With that it shouldn't make a difference whether we do this:
>
> adapter->nr = of_alias_get_id(adapter->dev.parent->of_node, "i2c");
>
> or that:
>
> adapter->nr = of_alias_get_id(adapter->dev->of_node, "i2c");
>
> Should be the same device node both times.
>
> Sascha
>
>
> --
> Pengutronix e.K. | |
> Steuerwalder Str. 21 | http://www.pengutronix.de/ |
> 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2024-12-12 12:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-11 6:14 Alexander Shiyan
2024-12-12 9:03 ` Sascha Hauer
2024-12-12 9:30 ` Alexander Shiyan
2024-12-12 11:31 ` Sascha Hauer
2024-12-12 12:23 ` Alexander Shiyan [this message]
2024-12-12 12:13 ` Alexander Shiyan
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='CAP1tNvQPB3qEJVc+GMOR=dZi3Biyj+zWWU3a8r1Z8gfdwEf6eg@mail.gmail.com' \
--to=eagle.alexander923@gmail.com \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/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