All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Anderson <dianders@chromium.org>
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Andrzej Hajda <a.hajda@samsung.com>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Jonas Karlman <jonas@kwiboo.se>, Sam Ravnborg <sam@ravnborg.org>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	Linus W <linus.walleij@linaro.org>, Lyude Paul <lyude@redhat.com>,
	Steev Klimaszewski <steev@kali.org>,
	Rob Clark <robdclark@chromium.org>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Thierry Reding <treding@nvidia.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>,
	Stephen Boyd <swboyd@chromium.org>,
	Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@linux.ie>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Robert Foss <robert.foss@linaro.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v8 08/11] drm/bridge: ti-sn65dsi86: Promote the AUX channel to its own sub-dev
Date: Mon, 7 Jun 2021 10:07:13 -0700	[thread overview]
Message-ID: <CAD=FV=UZkzKG6EJFAU9jCjb-twChzCH+JtcL5a9VyO5dxSdOwA@mail.gmail.com> (raw)
In-Reply-To: <YLxRyC9eNlg+Uex3@builder.lan>

Hi,

On Sat, Jun 5, 2021 at 9:40 PM Bjorn Andersson
<bjorn.andersson@linaro.org> wrote:
>
> > +     /*
> > +      * We couldn't do this pre-probe because it would confuse pinctrl.
> > +      * It would have tried to grab the same pins that the main device had.
> > +      * Set it now so that we can put the proper (sub) device in the aux
> > +      * structure and it will have the right node.
> > +      */
> > +     adev->dev.of_node = pdata->dev->of_node;
>
> I suspect the refcount of the of_node will be wrong here and upon
> removing the aux device things will be off...
>
> Instead, I think you're looking for device_set_of_node_from_dev(), which
> also sets of_node_reused, which in turn causes pinctrl_bind_pins() to be
> skipped - i.e. it seems to deal with the problem your comment describes.

You rock! This is exactly what I wanted. I wish I had thought to look
for it--I somehow just assumed that this wasn't already a solved
problem.

-Doug

WARNING: multiple messages have this Message-ID (diff)
From: Doug Anderson <dianders@chromium.org>
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Rob Clark <robdclark@chromium.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Jonas Karlman <jonas@kwiboo.se>, David Airlie <airlied@linux.ie>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	Neil Armstrong <narmstrong@baylibre.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Steev Klimaszewski <steev@kali.org>,
	Stephen Boyd <swboyd@chromium.org>,
	Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>,
	Andrzej Hajda <a.hajda@samsung.com>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Thierry Reding <treding@nvidia.com>,
	Sam Ravnborg <sam@ravnborg.org>,
	Robert Foss <robert.foss@linaro.org>
Subject: Re: [PATCH v8 08/11] drm/bridge: ti-sn65dsi86: Promote the AUX channel to its own sub-dev
Date: Mon, 7 Jun 2021 10:07:13 -0700	[thread overview]
Message-ID: <CAD=FV=UZkzKG6EJFAU9jCjb-twChzCH+JtcL5a9VyO5dxSdOwA@mail.gmail.com> (raw)
In-Reply-To: <YLxRyC9eNlg+Uex3@builder.lan>

Hi,

On Sat, Jun 5, 2021 at 9:40 PM Bjorn Andersson
<bjorn.andersson@linaro.org> wrote:
>
> > +     /*
> > +      * We couldn't do this pre-probe because it would confuse pinctrl.
> > +      * It would have tried to grab the same pins that the main device had.
> > +      * Set it now so that we can put the proper (sub) device in the aux
> > +      * structure and it will have the right node.
> > +      */
> > +     adev->dev.of_node = pdata->dev->of_node;
>
> I suspect the refcount of the of_node will be wrong here and upon
> removing the aux device things will be off...
>
> Instead, I think you're looking for device_set_of_node_from_dev(), which
> also sets of_node_reused, which in turn causes pinctrl_bind_pins() to be
> skipped - i.e. it seems to deal with the problem your comment describes.

You rock! This is exactly what I wanted. I wish I had thought to look
for it--I somehow just assumed that this wasn't already a solved
problem.

-Doug

  reply	other threads:[~2021-06-07 17:08 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-25  0:01 [PATCH v8 00/11] drm: Fix EDID reading on ti-sn65dsi86 by introducing the DP AUX bus Douglas Anderson
2021-05-25  0:01 ` Douglas Anderson
2021-05-25  0:01 ` [PATCH v8 01/11] dt-bindings: display: simple: List hpd properties in panel-simple Douglas Anderson
2021-05-25  0:01   ` Douglas Anderson
2021-06-02 18:00   ` Rob Herring
2021-06-02 18:00     ` Rob Herring
2021-05-25  0:01 ` [PATCH v8 02/11] dt-bindings: drm: Introduce the DP AUX bus Douglas Anderson
2021-05-25  0:01   ` Douglas Anderson
2021-06-02 18:08   ` Rob Herring
2021-06-02 18:08     ` Rob Herring
2021-05-25  0:01 ` [PATCH v8 03/11] dt-bindings: drm/bridge: ti-sn65dsi86: Add aux-bus child Douglas Anderson
2021-05-25  0:01   ` Douglas Anderson
2021-05-28  0:29   ` Linus Walleij
2021-05-28  0:29     ` Linus Walleij
2021-06-02 18:06     ` Rob Herring
2021-06-02 18:06       ` Rob Herring
2021-06-02 18:09       ` Rob Herring
2021-06-02 18:09         ` Rob Herring
2021-06-02 18:10   ` Rob Herring
2021-06-02 18:10     ` Rob Herring
2021-05-25  0:01 ` [PATCH v8 04/11] dt-bindings: drm/aux-bus: Add an example Douglas Anderson
2021-05-25  0:01   ` Douglas Anderson
2021-05-28  0:31   ` Linus Walleij
2021-05-28  0:31     ` Linus Walleij
2021-06-02 18:16   ` Rob Herring
2021-06-02 18:16     ` Rob Herring
2021-06-02 19:55     ` Doug Anderson
2021-06-02 19:55       ` Doug Anderson
2021-05-25  0:01 ` [PATCH v8 05/11] drm: Introduce the DP AUX bus Douglas Anderson
2021-05-25  0:01   ` Douglas Anderson
2021-05-25  0:01 ` [PATCH v8 06/11] drm/panel: panel-simple: Allow panel-simple be a DP AUX endpoint device Douglas Anderson
2021-05-25  0:01   ` Douglas Anderson
2021-05-25  0:01 ` [PATCH v8 07/11] drm/panel: panel-simple: Stash DP AUX bus; allow using it for DDC Douglas Anderson
2021-05-25  0:01   ` Douglas Anderson
2021-06-04 16:10   ` rajeevny
2021-06-04 16:10     ` rajeevny
2021-06-07 17:07     ` Doug Anderson
2021-06-07 17:07       ` Doug Anderson
2021-05-25  0:01 ` [PATCH v8 08/11] drm/bridge: ti-sn65dsi86: Promote the AUX channel to its own sub-dev Douglas Anderson
2021-05-25  0:01   ` Douglas Anderson
2021-06-06  4:40   ` Bjorn Andersson
2021-06-06  4:40     ` Bjorn Andersson
2021-06-07 17:07     ` Doug Anderson [this message]
2021-06-07 17:07       ` Doug Anderson
2021-05-25  0:01 ` [PATCH v8 09/11] drm/bridge: ti-sn65dsi86: Add support for the DP AUX bus Douglas Anderson
2021-05-25  0:01   ` Douglas Anderson
2021-05-25  0:01 ` [PATCH v8 10/11] drm/bridge: ti-sn65dsi86: Don't read EDID blob over DDC Douglas Anderson
2021-05-25  0:01   ` Douglas Anderson
2021-05-25  0:01 ` [PATCH v8 11/11] arm64: dts: qcom: sc7180-trogdor: Move panel under the bridge chip Douglas Anderson
2021-05-25  0:01   ` Douglas Anderson

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='CAD=FV=UZkzKG6EJFAU9jCjb-twChzCH+JtcL5a9VyO5dxSdOwA@mail.gmail.com' \
    --to=dianders@chromium.org \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=bjorn.andersson@linaro.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lyude@redhat.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=narmstrong@baylibre.com \
    --cc=robdclark@chromium.org \
    --cc=robert.foss@linaro.org \
    --cc=sam@ravnborg.org \
    --cc=stanislav.lisovskiy@intel.com \
    --cc=steev@kali.org \
    --cc=swboyd@chromium.org \
    --cc=treding@nvidia.com \
    /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.