[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMRc=MfhyX+5hTz2BqSuBaZbbtayJWzR75EQeniPv6KCOSaWUA@mail.gmail.com>
Date: Wed, 1 Oct 2025 16:11:55 +0200
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Marc Kleine-Budde <mkl@...gutronix.de>
Cc: Viken Dadhaniya <viken.dadhaniya@....qualcomm.com>, mani@...nel.org,
thomas.kopp@...rochip.com, mailhol.vincent@...adoo.fr, robh@...nel.org,
krzk+dt@...nel.org, conor+dt@...nel.org, linus.walleij@...aro.org,
linux-can@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, mukesh.savaliya@....qualcomm.com,
anup.kulkarni@....qualcomm.com,
Gregor Herburger <gregor.herburger@...tq-group.com>,
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH v6 5/6] can: mcp251xfd: add gpio functionality
On Wed, Oct 1, 2025 at 3:59 PM Marc Kleine-Budde <mkl@...gutronix.de> wrote:
>
> On 01.10.2025 15:52:56, Bartosz Golaszewski wrote:
> > On Wed, Oct 1, 2025 at 11:10 AM Viken Dadhaniya
> > <viken.dadhaniya@....qualcomm.com> wrote:
> > > +
> > > + if (!device_property_present(&priv->spi->dev, "gpio-controller"))
> > > + return 0;
> > > +
> >
> > Hi! I didn't notice this before you're returning 0 here, meaning the
> > device will be attached to the driver even though it doesn't do
> > anything. It would make more sense to return -ENODEV.
>
> I consider the GPIO functionality of the mcp251xfd CAN controllers
> optional. So if the DT doesn't contain gpio-controller, continue without
> GPIO functionality.
>
Ah, sorry, I thought this was the driver's probe() callback. It's
actually just a function. This could probably be registered as an
auxiliary device for less build-time dependencies but whatever.
Nevermind my last comment.
Bart
Powered by blists - more mailing lists