Re: [PATCH v4 5/6] can: mcp251xfd: add gpio functionality
From: Marc Kleine-Budde
Date: Thu Sep 18 2025 - 06:59:29 EST
On 18.09.2025 05:46:44, Bartosz Golaszewski wrote:
> > diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c
> > index ea41f04ae1a6..8c253091f498 100644
> > --- a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c
> > +++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c
> > @@ -16,6 +16,7 @@
> > #include <linux/bitfield.h>
> > #include <linux/clk.h>
> > #include <linux/device.h>
> > +#include <linux/gpio/driver.h>
> > #include <linux/mod_devicetable.h>
> > #include <linux/module.h>
> > #include <linux/pm_runtime.h>
> > @@ -1797,6 +1798,178 @@ static int mcp251xfd_register_check_rx_int(struct mcp251xfd_priv *priv)
> > return 0;
> > }
> >
> > +#ifdef CONFIG_GPIOLIB
>
> Any reason why you don't just depend on GPIOLIB in Kconfig? There's no
> reason to make it optional if the device always has the GPIO pins.
I don't mind having the ifdef. But it's up to you.
[...]
> > +static void mcp251xfd_gpio_set(struct gpio_chip *chip, unsigned int offset,
> > + int value)
>
> You must be rebased on pre v6.17 code, this will not compile with current
> mainline.
You mean "post" v6.17? Best rebase to latest net-next/main, which
already contains the new signatures for the GPIO callbacks.
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 |
Attachment:
signature.asc
Description: PGP signature