kernel: can: add MCP251x CAN controller module support
authorTim Harvey <tharvey@gateworks.com>
Fri, 28 Feb 2020 16:56:44 +0000 (08:56 -0800)
committerPetr Štetiar <ynezz@true.cz>
Sun, 1 Mar 2020 20:36:00 +0000 (21:36 +0100)
Adds kernel module for Microchip MCP251x SPI CAN controller.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
[added missing commit description]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
package/kernel/linux/modules/can.mk

index c2c7411c6e88bcd0c7c4b442a320bca9e5bec28f..3bf0359c113260e8096ac0c828ff95abf8d21fa6 100644 (file)
@@ -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