lkml.org 
[lkml]   [2024]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next v4 11/12] microchip: lan865x: add driver support for Microchip's LAN865X MAC-PHY
On Sat, Apr 27, 2024 at 10:13:33PM +0200, Ramón Nordin Rodriguez wrote:
> On Sat, Apr 27, 2024 at 08:57:43PM +0100, Conor Dooley wrote:
> > > static const struct of_device_id lan865x_dt_ids[] = {
> > > - { .compatible = "microchip,lan8651", "microchip,lan8650" },
> >
> > Huh, that's very strange. I don't see a single instance in the tree of a
> > of_device_id struct like this with two compatibles like this (at least
> > with a search of `rg "\.compatible.*\", \"" drivers/`.
> >
> > Given the fallbacks in the binding, only "microchip,lan8650" actually
> > needs to be here.
> >
> > > + { .compatible = "microchip,lan865x", "microchip,lan8650" },
> > > { /* Sentinel */ }
> > > };
> > > MODULE_DEVICE_TABLE(of, lan865x_dt_ids);
> > >
> > > Along with compatible = "microchip,lan865x" in the dts
> >
> > Just to be clear, the compatible w/ an x is unacceptable due to the
> > wildcard and the binding should stay as-is. Whatever probing bugs
> > the code has need to be resolved instead :)
> >
>
> All right, so when I change to
>
> @@ -364,7 +364,7 @@ static void lan865x_remove(struct spi_device *spi)
> }
>
> static const struct of_device_id lan865x_dt_ids[] = {
> - { .compatible = "microchip,lan8651", "microchip,lan8650" },
> + { .compatible = "microchip,lan8650" },
> { /* Sentinel */ }
> };
> MODULE_DEVICE_TABLE(of, lan865x_dt_ids);
>
> I still get the output
> [ 0.124266] SPI driver lan865x has no spi_device_id for microchip,lan8650
> But the driver does probe and I get a network interface.
>
> If no one beats me to it I'll single step the probe tomorrow.

I think the error pretty much is what it says it is, the driver doesn't
appear to have a spi_device_id table containing lan8650. The name of
the driver is lan685x which is used in the fallback clause in
__spi_register_driver(), so it complains as it does not find lan8650 in
either. If my understanding is correct, either a spi_device_id table is
required or the driver needs a rename with s/x/0/.

Cheers,
Conor.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2024-05-27 18:06    [W:0.146 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site