diff mbox series

[OpenWrt-Devel] kernel: can: add MCP251x CAN controller module support

Message ID 1582909004-2383-1-git-send-email-tharvey@gateworks.com
State Accepted
Delegated to: Petr Štetiar
Headers show
Series [OpenWrt-Devel] kernel: can: add MCP251x CAN controller module support | expand

Commit Message

Tim Harvey Feb. 28, 2020, 4:56 p.m. UTC
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
 package/kernel/linux/modules/can.mk | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

Comments

Stijn Tintel March 3, 2020, 10:49 a.m. UTC | #1
On 28/02/2020 18:56, Tim Harvey wrote:
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> ---
>  package/kernel/linux/modules/can.mk | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>
> diff --git a/package/kernel/linux/modules/can.mk b/package/kernel/linux/modules/can.mk
> index c2c7411..3bf0359 100644
> --- a/package/kernel/linux/modules/can.mk
> +++ b/package/kernel/linux/modules/can.mk
> @@ -146,6 +146,23 @@ endef
>  $(eval $(call KernelPackage,can-gw))
>  
>  
> +define KernelPackage/can-mcp251x
> +  TITLE:=MCP251x SPI CAN controller
> +  KCONFIG:=\
> +	CONFIG_SPI=y \
> +	CONFIG_CAN_MCP251X
> +  FILES:=$(LINUX_DIR)/drivers/net/can/spi/mcp251x.ko
> +  AUTOLOAD:=$(call AutoProbe,can-mcp251x)
> +  $(call AddDepends/can)
> +endef
> +
> +define KernelPackage/can-mcp251x/description
> + Microchip MCP251x SPI CAN controller
> +endef
> +
> +$(eval $(call KernelPackage,can-mcp251x))
> +
> +
>  define KernelPackage/can-raw
>    TITLE:=Raw CAN Protcol
>    KCONFIG:=CONFIG_CAN_RAW

I would have preferred if the name of this new kmod package included the
bus type, as with the kmod-can-usb-* packages. I actually had this one
queued in my staging tree as kmod-can-spi-mcp251x. Also, does AutoProbe
work for devices attached to the SPI bus?

Stijn
Tim Harvey March 10, 2020, 7:18 p.m. UTC | #2
On Tue, Mar 3, 2020 at 2:49 AM Stijn Tintel <stijn@linux-ipv6.be> wrote:
>
> On 28/02/2020 18:56, Tim Harvey wrote:
> > Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> > ---
> >  package/kernel/linux/modules/can.mk | 17 +++++++++++++++++
> >  1 file changed, 17 insertions(+)
> >
> > diff --git a/package/kernel/linux/modules/can.mk b/package/kernel/linux/modules/can.mk
> > index c2c7411..3bf0359 100644
> > --- a/package/kernel/linux/modules/can.mk
> > +++ b/package/kernel/linux/modules/can.mk
> > @@ -146,6 +146,23 @@ endef
> >  $(eval $(call KernelPackage,can-gw))
> >
> >
> > +define KernelPackage/can-mcp251x
> > +  TITLE:=MCP251x SPI CAN controller
> > +  KCONFIG:=\
> > +     CONFIG_SPI=y \
> > +     CONFIG_CAN_MCP251X
> > +  FILES:=$(LINUX_DIR)/drivers/net/can/spi/mcp251x.ko
> > +  AUTOLOAD:=$(call AutoProbe,can-mcp251x)
> > +  $(call AddDepends/can)
> > +endef
> > +
> > +define KernelPackage/can-mcp251x/description
> > + Microchip MCP251x SPI CAN controller
> > +endef
> > +
> > +$(eval $(call KernelPackage,can-mcp251x))
> > +
> > +
> >  define KernelPackage/can-raw
> >    TITLE:=Raw CAN Protcol
> >    KCONFIG:=CONFIG_CAN_RAW
>
> I would have preferred if the name of this new kmod package included the
> bus type, as with the kmod-can-usb-* packages. I actually had this one
> queued in my staging tree as kmod-can-spi-mcp251x. Also, does AutoProbe
> work for devices attached to the SPI bus?
>

Stijn,

AutoProbe does not work for SPI bus so the module isn't auto-loaded.

Regards,

Tim
diff mbox series

Patch

diff --git a/package/kernel/linux/modules/can.mk b/package/kernel/linux/modules/can.mk
index c2c7411..3bf0359 100644
--- a/package/kernel/linux/modules/can.mk
+++ b/package/kernel/linux/modules/can.mk
@@ -146,6 +146,23 @@  endef
 $(eval $(call KernelPackage,can-gw))
 
 
+define KernelPackage/can-mcp251x
+  TITLE:=MCP251x SPI CAN controller
+  KCONFIG:=\
+	CONFIG_SPI=y \
+	CONFIG_CAN_MCP251X
+  FILES:=$(LINUX_DIR)/drivers/net/can/spi/mcp251x.ko
+  AUTOLOAD:=$(call AutoProbe,can-mcp251x)
+  $(call AddDepends/can)
+endef
+
+define KernelPackage/can-mcp251x/description
+ Microchip MCP251x SPI CAN controller
+endef
+
+$(eval $(call KernelPackage,can-mcp251x))
+
+
 define KernelPackage/can-raw
   TITLE:=Raw CAN Protcol
   KCONFIG:=CONFIG_CAN_RAW