lkml.org 
[lkml]   [2023]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] gpio: tegra186: Set fwnode of the GPIO chip
On Tue, Oct 10, 2023 at 05:13:42PM +0300, Andy Shevchenko wrote:
> On Tue, Oct 10, 2023 at 04:48:25PM +0300, Andy Shevchenko wrote:
> > On Tue, Oct 10, 2023 at 04:13:19PM +0300, Andy Shevchenko wrote:
> > > On Mon, Oct 09, 2023 at 10:38:58AM -0700, Dipen Patel wrote:

...

> > > > + /*
> > > > + * This is needed for driver using gpio device matching where it
> > > > + * has to use gpio_chip fwnode to match the gpio controller.
> > > > + */
> > > > + gpio->gpio.fwnode = of_node_to_fwnode(pdev->dev.of_node);
> > >
> > > of_node_to_fwnode() is specific to IRQ, in other places we use generic
> > > of_fwnode_handle(). That's why better just to use dev_fwnode().
> >
> > On the second thought is there any parent assigned?
> > At least I see that in tegra186_gpio_probe(). Are you saying
> > it is not working? Or is it (matching) called _before_ we
> > add a GPIO device?
>
> Okay, I think I got it. There is a function called tegra_gpiochip_match()
> in drivers/hte/hte-tegra194.c which fails after my patch. Yeah, if provider
> doesn't set fwnode, it can't match. But, since the driver sets the parent
> properly it means that the matching function should be done against the
> device.
>
> Seems to me that in HTE code the matching function is broken.

I'll send a patch soon. Please, test it.

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2023-10-10 16:26    [W:1.144 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site