can: Driver for the Microchip MCP251x SPI CAN controllers
Signed-off-by: Christian Pellegrin <chripell@fsfe.org> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
81adee47df
commit
e0000163e3
|
@ -102,6 +102,12 @@ config CAN_TI_HECC
|
||||||
Driver for TI HECC (High End CAN Controller) module found on many
|
Driver for TI HECC (High End CAN Controller) module found on many
|
||||||
TI devices. The device specifications are available from www.ti.com
|
TI devices. The device specifications are available from www.ti.com
|
||||||
|
|
||||||
|
config CAN_MCP251X
|
||||||
|
tristate "Microchip MCP251x SPI CAN controllers"
|
||||||
|
depends on CAN_DEV && SPI
|
||||||
|
---help---
|
||||||
|
Driver for the Microchip MCP251x SPI CAN controllers.
|
||||||
|
|
||||||
config CAN_DEBUG_DEVICES
|
config CAN_DEBUG_DEVICES
|
||||||
bool "CAN devices debugging messages"
|
bool "CAN devices debugging messages"
|
||||||
depends on CAN
|
depends on CAN
|
||||||
|
|
|
@ -12,5 +12,6 @@ obj-y += usb/
|
||||||
obj-$(CONFIG_CAN_SJA1000) += sja1000/
|
obj-$(CONFIG_CAN_SJA1000) += sja1000/
|
||||||
obj-$(CONFIG_CAN_AT91) += at91_can.o
|
obj-$(CONFIG_CAN_AT91) += at91_can.o
|
||||||
obj-$(CONFIG_CAN_TI_HECC) += ti_hecc.o
|
obj-$(CONFIG_CAN_TI_HECC) += ti_hecc.o
|
||||||
|
obj-$(CONFIG_CAN_MCP251X) += mcp251x.o
|
||||||
|
|
||||||
ccflags-$(CONFIG_CAN_DEBUG_DEVICES) := -DDEBUG
|
ccflags-$(CONFIG_CAN_DEBUG_DEVICES) := -DDEBUG
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,36 @@
|
||||||
|
#ifndef __CAN_PLATFORM_MCP251X_H__
|
||||||
|
#define __CAN_PLATFORM_MCP251X_H__
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* CAN bus driver for Microchip 251x CAN Controller with SPI Interface
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <linux/spi/spi.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* struct mcp251x_platform_data - MCP251X SPI CAN controller platform data
|
||||||
|
* @oscillator_frequency: - oscillator frequency in Hz
|
||||||
|
* @model: - actual type of chip
|
||||||
|
* @board_specific_setup: - called before probing the chip (power,reset)
|
||||||
|
* @transceiver_enable: - called to power on/off the transceiver
|
||||||
|
* @power_enable: - called to power on/off the mcp *and* the
|
||||||
|
* transceiver
|
||||||
|
*
|
||||||
|
* Please note that you should define power_enable or transceiver_enable or
|
||||||
|
* none of them. Defining both of them is no use.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
struct mcp251x_platform_data {
|
||||||
|
unsigned long oscillator_frequency;
|
||||||
|
int model;
|
||||||
|
#define CAN_MCP251X_MCP2510 0
|
||||||
|
#define CAN_MCP251X_MCP2515 1
|
||||||
|
int (*board_specific_setup)(struct spi_device *spi);
|
||||||
|
int (*transceiver_enable)(int enable);
|
||||||
|
int (*power_enable) (int enable);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* __CAN_PLATFORM_MCP251X_H__ */
|
Loading…
Reference in New Issue