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

Stijn Tintel stijn at linux-ipv6.be
Tue Mar 3 05:49:46 EST 2020


On 28/02/2020 18:56, Tim Harvey wrote:
> Signed-off-by: Tim Harvey <tharvey at 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


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list