[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220504063402.deowqy5lnmgg2mfy@pengutronix.de>
Date: Wed, 4 May 2022 08:34:02 +0200
From: Marc Kleine-Budde <mkl@...gutronix.de>
To: Pavel Pisa <pisa@....felk.cvut.cz>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>,
linux-can@...r.kernel.org,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>,
Oliver Hartkopp <socketcan@...tkopp.net>,
Wolfgang Grandegger <wg@...ndegger.com>,
David Miller <davem@...emloft.net>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Carsten Emde <c.emde@...dl.org>, armbru@...hat.com,
netdev <netdev@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Marin Jerabek <martin.jerabek01@...il.com>,
Ondrej Ille <ondrej.ille@...il.com>,
Jiri Novak <jnovak@....cvut.cz>,
Jaroslav Beran <jara.beran@...il.com>,
Petr Porazil <porazil@...ron.com>, Pavel Machek <pavel@....cz>,
Drew Fustini <pdp7pdp7@...il.com>
Subject: Re: [PATCH v8 5/7] can: ctucanfd: CTU CAN FD open-source IP core -
platform/SoC support.
On 03.05.2022 17:07:21, Pavel Pisa wrote:
> Hello Geert,
>
> On Tuesday 03 of May 2022 13:37:46 Geert Uytterhoeven wrote:
> > Hi Pavel,
> > > --- /dev/null
> > > +++ b/drivers/net/can/ctucanfd/ctucanfd_platform.c
> > >
> > > +/* Match table for OF platform binding */
> > > +static const struct of_device_id ctucan_of_match[] = {
> > > + { .compatible = "ctu,ctucanfd-2", },
> >
> > Do you need to match on the above compatible value?
> > The driver seems to treat the hardware the same, and the DT
> > bindings state the compatible value below should always be present.
>
> I would keep it because there will be newer revisions and releases
> of the core and I consider "ctu,ctucanfd" as the match to generic
> one with maximal attempt to adjust to the version from provided
> info registers but identification with the fixed version
> "ctu,ctucanfd-2" ensures that some old hardware which is
> in the wild is directly recognized even at /sys level
> and if we need to do some workarounds for autodetection
> etc. it can be recognized.
As Geert said:
- There are 2 bindings in the driver which are (currently) treated the
same.
- The binding documentation says devices must always have the
ctu,ctucanfd compatible.
This means (currently) the ctu,ctucanfd-2 is not needed in the driver.
We can add it back once we need it.
Or are there devices that have a compatible of ctu,ctucanfd-2 without
stating to be compatible with ctu,ctucanfd?
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists