From: Thierry Reding <thierry.reding@gmail.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: Tristan Bastian <tristan-c.bastian@gmx.de>,
Vlado Plaga <rechner@vlado-do.de>,
dri-devel@lists.freedesktop.org, Rob Herring <robh+dt@kernel.org>,
linux-i2c@vger.kernel.org, linux-tegra@vger.kernel.org
Subject: Re: [PATCH v2] i2c: of: Try to find an I2C adapter matching the parent
Date: Wed, 6 Feb 2019 13:07:02 +0100 [thread overview]
Message-ID: <20190206120702.GC21676@ulmo> (raw)
In-Reply-To: <20190206094912.nnfsfzivwbss4yye@ninjato>
[-- Attachment #1.1: Type: text/plain, Size: 1942 bytes --]
On Wed, Feb 06, 2019 at 10:49:12AM +0100, Wolfram Sang wrote:
>
> > And there is a regression! Good that I didn't push out before
> > double-checking. No one noticed that this breaks registering child
> > devices because of_i2c_register_devices() doesn't have a pointer to work
> > with anymore?
>
> Well, sorry, I forgot an important detail. There is no regression
> because most drivers still populate adap->dev.of_data with the node
> pointer of their parent. I experimentally removed this from my driver
> under test motivated by this comment from the commit in the Fixes: tag:
>
> "Linking it to the device node of the parent device is wrong, as it
> leads to 2 devices sharing the same device node, which is bad practice,"
>
> But removing this bad practice from I2C core is more work. I wonder now
> if we are in some inconsistent in-between state if I apply this patch as
> is?
I think this patch would serve as preparatory work to remove the sharing
of device nodes. There shouldn't be any regressions here because we only
fall back to the parent's ->of_node if the I2C adapter's ->of_node does
not match. Since the I2C adapter's ->of_node match is what we currently
do, the only thing that this patch does is add a fallback for the cases
where the I2C adapter's ->of_node is not set.
As far as I can tell, the only code where this should matter is the
drm_dp_aux helpers where the I2C adapter's ->of_node is no longer being
set because of the commit that introduced the regression for Tegra124
Nyan (and Venice2) boards.
So I think this patch is safe to apply and as you suggested this can be
used as the baseline for cleaning up all the cases where we reuse the
parent's ->of_node for the I2C adapter's ->of_node.
So I guess you could say we're in some in-between state, but I don't
think it's inconsistent. It just allows us to do this step by step,
which I think is good.
Thierry
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-02-06 12:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-25 13:11 [PATCH v2] i2c: of: Try to find an I2C adapter matching the parent Thierry Reding
2019-01-26 12:37 ` Tristan Bastian
2019-01-28 8:08 ` Thierry Reding
2019-01-28 8:10 ` Thierry Reding
2019-01-28 9:19 ` Tristan Bastian
2019-01-28 9:26 ` Tristan Bastian
2019-02-05 12:44 ` Wolfram Sang
2019-02-06 9:38 ` Wolfram Sang
2019-02-06 9:49 ` Wolfram Sang
2019-02-06 12:07 ` Thierry Reding [this message]
2019-02-08 18:35 ` Wolfram Sang
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=20190206120702.GC21676@ulmo \
--to=thierry.reding@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=rechner@vlado-do.de \
--cc=robh+dt@kernel.org \
--cc=tristan-c.bastian@gmx.de \
--cc=wsa@the-dreams.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 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.