[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251001-fascinating-orange-skunk-7545f3-mkl@pengutronix.de>
Date: Wed, 1 Oct 2025 15:59:40 +0200
From: Marc Kleine-Budde <mkl@...gutronix.de>
To: Bartosz Golaszewski <brgl@...ev.pl>
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 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.
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists