diff mbox series

drm/bridge: ti-tfp410: switch to using fwnode_gpiod_get_index()

Message ID 20191014184320.GA161094@dtor-ws (mailing list archive)
State New, archived
Headers show
Series drm/bridge: ti-tfp410: switch to using fwnode_gpiod_get_index() | expand

Commit Message

Dmitry Torokhov Oct. 14, 2019, 6:43 p.m. UTC
Instead of fwnode_get_named_gpiod() that I plan to hide away, let's use
the new fwnode_gpiod_get_index() that mimics gpiod_get_index(), but
works with arbitrary firmware node.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---

Andrzej, Neil,

This depends on the new code that can be bound in
ib-fwnode-gpiod-get-index immutable branch of Linus' Walleij tree:

        git pull git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git ib-fwnode-gpiod-get-index

I hope that it would be possible to pull in this immutable branch and
not wait until after 5.5 merge window, or, alternatively, merge through
Linus Walleij's tree.

Thanks!

 drivers/gpu/drm/bridge/ti-tfp410.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Dmitry Torokhov Nov. 5, 2019, 12:40 a.m. UTC | #1
On Mon, Oct 14, 2019 at 11:43:20AM -0700, Dmitry Torokhov wrote:
> Instead of fwnode_get_named_gpiod() that I plan to hide away, let's use
> the new fwnode_gpiod_get_index() that mimics gpiod_get_index(), but
> works with arbitrary firmware node.
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
> 
> Andrzej, Neil,
> 
> This depends on the new code that can be bound in
> ib-fwnode-gpiod-get-index immutable branch of Linus' Walleij tree:
> 
>         git pull git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git ib-fwnode-gpiod-get-index
> 
> I hope that it would be possible to pull in this immutable branch and
> not wait until after 5.5 merge window, or, alternatively, merge through
> Linus Walleij's tree.

Any chance this could be merged, please?

> 
> Thanks!
> 
>  drivers/gpu/drm/bridge/ti-tfp410.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/ti-tfp410.c b/drivers/gpu/drm/bridge/ti-tfp410.c
> index aa3198dc9903..6f6d6d1e60ae 100644
> --- a/drivers/gpu/drm/bridge/ti-tfp410.c
> +++ b/drivers/gpu/drm/bridge/ti-tfp410.c
> @@ -285,8 +285,8 @@ static int tfp410_get_connector_properties(struct tfp410 *dvi)
>  	else
>  		dvi->connector_type = DRM_MODE_CONNECTOR_DVID;
>  
> -	dvi->hpd = fwnode_get_named_gpiod(&connector_node->fwnode,
> -					"hpd-gpios", 0, GPIOD_IN, "hpd");
> +	dvi->hpd = fwnode_gpiod_get_index(&connector_node->fwnode,
> +					  "hpd", 0, GPIOD_IN, "hpd");
>  	if (IS_ERR(dvi->hpd)) {
>  		ret = PTR_ERR(dvi->hpd);
>  		dvi->hpd = NULL;
> -- 
> 2.23.0.700.g56cf767bdb-goog
> 
> 
> -- 
> Dmitry
Linus Walleij Nov. 5, 2019, 3:29 p.m. UTC | #2
On Tue, Nov 5, 2019 at 1:40 AM Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> On Mon, Oct 14, 2019 at 11:43:20AM -0700, Dmitry Torokhov wrote:

> > Instead of fwnode_get_named_gpiod() that I plan to hide away, let's use
> > the new fwnode_gpiod_get_index() that mimics gpiod_get_index(), but
> > works with arbitrary firmware node.
> >
> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > ---
> >
> > Andrzej, Neil,
> >
> > This depends on the new code that can be bound in
> > ib-fwnode-gpiod-get-index immutable branch of Linus' Walleij tree:
> >
> >         git pull git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git ib-fwnode-gpiod-get-index
> >
> > I hope that it would be possible to pull in this immutable branch and
> > not wait until after 5.5 merge window, or, alternatively, merge through
> > Linus Walleij's tree.
>
> Any chance this could be merged, please?

I'm happy to merge it into the GPIO tree if some DRM maintainer can
provide an ACK.

Getting ACK from DRM people is problematic and a bit of friction in the
community, DVetter usually advice to seek mutual reviews etc, but IMO
it would be better if some people felt more compelled to review stuff
eventually. (And that has the problem that it doesn't scale.)

Yours,
Linus Walleij
Daniel Vetter Nov. 5, 2019, 3:41 p.m. UTC | #3
On Tue, Nov 5, 2019 at 4:29 PM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> On Tue, Nov 5, 2019 at 1:40 AM Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
> > On Mon, Oct 14, 2019 at 11:43:20AM -0700, Dmitry Torokhov wrote:
>
> > > Instead of fwnode_get_named_gpiod() that I plan to hide away, let's use
> > > the new fwnode_gpiod_get_index() that mimics gpiod_get_index(), but
> > > works with arbitrary firmware node.
> > >
> > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > > ---
> > >
> > > Andrzej, Neil,
> > >
> > > This depends on the new code that can be bound in
> > > ib-fwnode-gpiod-get-index immutable branch of Linus' Walleij tree:
> > >
> > >         git pull git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git ib-fwnode-gpiod-get-index
> > >
> > > I hope that it would be possible to pull in this immutable branch and
> > > not wait until after 5.5 merge window, or, alternatively, merge through
> > > Linus Walleij's tree.
> >
> > Any chance this could be merged, please?
>
> I'm happy to merge it into the GPIO tree if some DRM maintainer can
> provide an ACK.

Ack.

> Getting ACK from DRM people is problematic and a bit of friction in the
> community, DVetter usually advice to seek mutual reviews etc, but IMO
> it would be better if some people felt more compelled to review stuff
> eventually. (And that has the problem that it doesn't scale.)

This has a review already plus if you merge your implied review.
That's more than good enough imo, so not seeing the issue here?
-Daniel
Laurent Pinchart Nov. 5, 2019, 7:53 p.m. UTC | #4
Hi Daniel,

On Tue, Nov 05, 2019 at 04:41:41PM +0100, Daniel Vetter wrote:
> On Tue, Nov 5, 2019 at 4:29 PM Linus Walleij wrote:
> > On Tue, Nov 5, 2019 at 1:40 AM Dmitry Torokhov wrote:
> > > On Mon, Oct 14, 2019 at 11:43:20AM -0700, Dmitry Torokhov wrote:
> >
> > > > Instead of fwnode_get_named_gpiod() that I plan to hide away, let's use
> > > > the new fwnode_gpiod_get_index() that mimics gpiod_get_index(), but
> > > > works with arbitrary firmware node.
> > > >
> > > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > > > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > > > ---
> > > >
> > > > Andrzej, Neil,
> > > >
> > > > This depends on the new code that can be bound in
> > > > ib-fwnode-gpiod-get-index immutable branch of Linus' Walleij tree:
> > > >
> > > >         git pull git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git ib-fwnode-gpiod-get-index
> > > >
> > > > I hope that it would be possible to pull in this immutable branch and
> > > > not wait until after 5.5 merge window, or, alternatively, merge through
> > > > Linus Walleij's tree.
> > >
> > > Any chance this could be merged, please?
> >
> > I'm happy to merge it into the GPIO tree if some DRM maintainer can
> > provide an ACK.
> 
> Ack.
> 
> > Getting ACK from DRM people is problematic and a bit of friction in the
> > community, DVetter usually advice to seek mutual reviews etc, but IMO
> > it would be better if some people felt more compelled to review stuff
> > eventually. (And that has the problem that it doesn't scale.)
> 
> This has a review already plus if you merge your implied review.
> That's more than good enough imo, so not seeing the issue here?

Isn't the issue that the patch should have been picked by someone for
drm-misc ?
Daniel Vetter Nov. 6, 2019, 9:51 a.m. UTC | #5
On Tue, Nov 05, 2019 at 09:53:23PM +0200, Laurent Pinchart wrote:
> Hi Daniel,
> 
> On Tue, Nov 05, 2019 at 04:41:41PM +0100, Daniel Vetter wrote:
> > On Tue, Nov 5, 2019 at 4:29 PM Linus Walleij wrote:
> > > On Tue, Nov 5, 2019 at 1:40 AM Dmitry Torokhov wrote:
> > > > On Mon, Oct 14, 2019 at 11:43:20AM -0700, Dmitry Torokhov wrote:
> > >
> > > > > Instead of fwnode_get_named_gpiod() that I plan to hide away, let's use
> > > > > the new fwnode_gpiod_get_index() that mimics gpiod_get_index(), but
> > > > > works with arbitrary firmware node.
> > > > >
> > > > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > > > > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > > > > ---
> > > > >
> > > > > Andrzej, Neil,
> > > > >
> > > > > This depends on the new code that can be bound in
> > > > > ib-fwnode-gpiod-get-index immutable branch of Linus' Walleij tree:
> > > > >
> > > > >         git pull git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git ib-fwnode-gpiod-get-index
> > > > >
> > > > > I hope that it would be possible to pull in this immutable branch and
> > > > > not wait until after 5.5 merge window, or, alternatively, merge through
> > > > > Linus Walleij's tree.
> > > >
> > > > Any chance this could be merged, please?
> > >
> > > I'm happy to merge it into the GPIO tree if some DRM maintainer can
> > > provide an ACK.
> > 
> > Ack.
> > 
> > > Getting ACK from DRM people is problematic and a bit of friction in the
> > > community, DVetter usually advice to seek mutual reviews etc, but IMO
> > > it would be better if some people felt more compelled to review stuff
> > > eventually. (And that has the problem that it doesn't scale.)
> > 
> > This has a review already plus if you merge your implied review.
> > That's more than good enough imo, so not seeing the issue here?
> 
> Isn't the issue that the patch should have been picked by someone for
> drm-misc ?

It requires prep work that isn't in drm-misc I thought? Anyway, Linus has
commit rights to drm-misc, could also push it there.

Plus you have, except you don't want it.
-Daniel
Linus Walleij Nov. 13, 2019, 1:49 p.m. UTC | #6
On Mon, Oct 14, 2019 at 8:43 PM Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:

> Instead of fwnode_get_named_gpiod() that I plan to hide away, let's use
> the new fwnode_gpiod_get_index() that mimics gpiod_get_index(), but
> works with arbitrary firmware node.
>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

I applied this with some ACKs to the GPIO devel branch for v5.5.

Yours,
Linus Walleij
Linus Walleij Nov. 13, 2019, 1:52 p.m. UTC | #7
On Tue, Nov 5, 2019 at 4:41 PM Daniel Vetter <daniel@ffwll.ch> wrote:
> On Tue, Nov 5, 2019 at 4:29 PM Linus Walleij <linus.walleij@linaro.org> wrote:
> > On Tue, Nov 5, 2019 at 1:40 AM Dmitry Torokhov
> > <dmitry.torokhov@gmail.com> wrote:

> > I'm happy to merge it into the GPIO tree if some DRM maintainer can
> > provide an ACK.
>
> Ack.

Thanks!

> > Getting ACK from DRM people is problematic and a bit of friction in the
> > community, DVetter usually advice to seek mutual reviews etc, but IMO
> > it would be better if some people felt more compelled to review stuff
> > eventually. (And that has the problem that it doesn't scale.)
>
> This has a review already plus if you merge your implied review.

Yeah I missed Laurent's review tag. I needed some kund of consent
to take it into the GPIO tree I suppose.

> That's more than good enough imo, so not seeing the issue here?

No issue.

What freaked me out was the option of having to pull in an
immutable branch from my GPIO tree into drm-misc. That would
have been scary. Keeping it all in my tree works fine.

Yours,
Linus Walleij
Daniel Vetter Nov. 13, 2019, 5:25 p.m. UTC | #8
On Wed, Nov 13, 2019 at 02:52:23PM +0100, Linus Walleij wrote:
> On Tue, Nov 5, 2019 at 4:41 PM Daniel Vetter <daniel@ffwll.ch> wrote:
> > On Tue, Nov 5, 2019 at 4:29 PM Linus Walleij <linus.walleij@linaro.org> wrote:
> > > On Tue, Nov 5, 2019 at 1:40 AM Dmitry Torokhov
> > > <dmitry.torokhov@gmail.com> wrote:
> 
> > > I'm happy to merge it into the GPIO tree if some DRM maintainer can
> > > provide an ACK.
> >
> > Ack.
> 
> Thanks!
> 
> > > Getting ACK from DRM people is problematic and a bit of friction in the
> > > community, DVetter usually advice to seek mutual reviews etc, but IMO
> > > it would be better if some people felt more compelled to review stuff
> > > eventually. (And that has the problem that it doesn't scale.)
> >
> > This has a review already plus if you merge your implied review.
> 
> Yeah I missed Laurent's review tag. I needed some kund of consent
> to take it into the GPIO tree I suppose.
> 
> > That's more than good enough imo, so not seeing the issue here?
> 
> No issue.
> 
> What freaked me out was the option of having to pull in an
> immutable branch from my GPIO tree into drm-misc. That would
> have been scary. Keeping it all in my tree works fine.

For next time around, just ping one of the drm-misc (or drm maintainers)
for an ack to merge it through a different tree. Or ask them what they
want to do. committer model isn't 100% free-wheeling, for cross-tree stuff
you still have maintainers who're supposed to do their jobs :-)

But by default everyone will assume you'll just commit, so you need to
poke them explicitly (like you've done here).
-Daniel
diff mbox series

Patch

diff --git a/drivers/gpu/drm/bridge/ti-tfp410.c b/drivers/gpu/drm/bridge/ti-tfp410.c
index aa3198dc9903..6f6d6d1e60ae 100644
--- a/drivers/gpu/drm/bridge/ti-tfp410.c
+++ b/drivers/gpu/drm/bridge/ti-tfp410.c
@@ -285,8 +285,8 @@  static int tfp410_get_connector_properties(struct tfp410 *dvi)
 	else
 		dvi->connector_type = DRM_MODE_CONNECTOR_DVID;
 
-	dvi->hpd = fwnode_get_named_gpiod(&connector_node->fwnode,
-					"hpd-gpios", 0, GPIOD_IN, "hpd");
+	dvi->hpd = fwnode_gpiod_get_index(&connector_node->fwnode,
+					  "hpd", 0, GPIOD_IN, "hpd");
 	if (IS_ERR(dvi->hpd)) {
 		ret = PTR_ERR(dvi->hpd);
 		dvi->hpd = NULL;