Commit e0000163 authored by Christian Pellegrin's avatar Christian Pellegrin Committed by David S. Miller

can: Driver for the Microchip MCP251x SPI CAN controllers

Signed-off-by: default avatarChristian Pellegrin <chripell@fsfe.org>
Signed-off-by: default avatarWolfgang Grandegger <wg@grandegger.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 81adee47
......@@ -102,6 +102,12 @@ config CAN_TI_HECC
Driver for TI HECC (High End CAN Controller) module found on many
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
bool "CAN devices debugging messages"
depends on CAN
......
......@@ -12,5 +12,6 @@ obj-y += usb/
obj-$(CONFIG_CAN_SJA1000) += sja1000/
obj-$(CONFIG_CAN_AT91) += at91_can.o
obj-$(CONFIG_CAN_TI_HECC) += ti_hecc.o
obj-$(CONFIG_CAN_MCP251X) += mcp251x.o
ccflags-$(CONFIG_CAN_DEBUG_DEVICES) := -DDEBUG
This diff is collapsed.
#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__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment