linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>,
	mani@kernel.org,  thomas.kopp@microchip.com,
	mailhol.vincent@wanadoo.fr, robh@kernel.org,  krzk+dt@kernel.org,
	conor+dt@kernel.org, linus.walleij@linaro.org,
	 linux-can@vger.kernel.org, devicetree@vger.kernel.org,
	 linux-kernel@vger.kernel.org, mukesh.savaliya@oss.qualcomm.com,
	 anup.kulkarni@oss.qualcomm.com,
	 Gregor Herburger <gregor.herburger@ew.tq-group.com>,
	 Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: Re: [PATCH v6 5/6] can: mcp251xfd: add gpio functionality
Date: Wed, 1 Oct 2025 16:11:55 +0200	[thread overview]
Message-ID: <CAMRc=MfhyX+5hTz2BqSuBaZbbtayJWzR75EQeniPv6KCOSaWUA@mail.gmail.com> (raw)
In-Reply-To: <20251001-fascinating-orange-skunk-7545f3-mkl@pengutronix.de>

On Wed, Oct 1, 2025 at 3:59 PM Marc Kleine-Budde <mkl@pengutronix.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@oss.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

  reply	other threads:[~2025-10-01 14:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-01  9:10 [PATCH v6 0/6] can: mcp251xfd: add gpio functionality Viken Dadhaniya
2025-10-01  9:10 ` [PATCH v6 1/6] can: mcp251xfd: move chip sleep mode into runtime pm Viken Dadhaniya
2025-10-01  9:10 ` [PATCH v6 2/6] can: mcp251xfd: utilize gather_write function for all non-CRC writes Viken Dadhaniya
2025-10-01  9:10 ` [PATCH v6 3/6] can: mcp251xfd: add workaround for errata 5 Viken Dadhaniya
2025-10-01  9:10 ` [PATCH v6 4/6] can: mcp251xfd: only configure PIN1 when rx_int is set Viken Dadhaniya
2025-10-01  9:10 ` [PATCH v6 5/6] can: mcp251xfd: add gpio functionality Viken Dadhaniya
2025-10-01 13:52   ` Bartosz Golaszewski
2025-10-01 13:59     ` Marc Kleine-Budde
2025-10-01 14:11       ` Bartosz Golaszewski [this message]
2025-10-01  9:10 ` [PATCH v6 6/6] dt-bindings: can: mcp251xfd: add gpio-controller property Viken Dadhaniya
2025-10-23  5:16 ` [PATCH v6 0/6] can: mcp251xfd: add gpio functionality Manivannan Sadhasivam
2025-11-10 10:08   ` Viken Dadhaniya
2025-11-12  8:49 ` Marc Kleine-Budde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMRc=MfhyX+5hTz2BqSuBaZbbtayJWzR75EQeniPv6KCOSaWUA@mail.gmail.com' \
    --to=brgl@bgdev.pl \
    --cc=anup.kulkarni@oss.qualcomm.com \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregor.herburger@ew.tq-group.com \
    --cc=krzk+dt@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mailhol.vincent@wanadoo.fr \
    --cc=mani@kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=mukesh.savaliya@oss.qualcomm.com \
    --cc=robh@kernel.org \
    --cc=thomas.kopp@microchip.com \
    --cc=viken.dadhaniya@oss.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).