]> rtime.felk.cvut.cz Git - socketcan-devel.git/blob - kernel/2.6/include/socketcan/can/platform/mcp251x.h
merged branches/netlink in rev. 1037 back to trunk.
[socketcan-devel.git] / kernel / 2.6 / include / socketcan / can / platform / mcp251x.h
1 #ifndef __CAN_PLATFORM_MCP251X_H__
2 #define __CAN_PLATFORM_MCP251X_H__
3
4 /*
5  *
6  * CAN bus driver for Microchip 251x CAN Controller with SPI Interface
7  *
8  */
9
10 /**
11  * struct mcp251x_platform_data - MCP251X SPI CAN controller platform data
12  * @oscillator_frequency:       - oscillator frequency in Hz
13  * @model:                      - actual type of chip
14  * @board_specific_setup:       - called before probing the chip (power,reset)
15  * @transceiver_enable:         - called to power on/off the transceiver
16  * @power_enable:               - called to power on/off the mcp *and* the
17  *                                transceiver
18  *
19  * Please note that you should define power_enable or transceiver_enable or
20  * none of them. Defining both of them is no use.
21  *
22  */
23
24 struct mcp251x_platform_data {
25         unsigned long oscillator_frequency;
26         int model;
27 #define CAN_MCP251X_MCP2510 0
28 #define CAN_MCP251X_MCP2515 1
29         int (*board_specific_setup)(struct spi_device *spi);
30         int (*transceiver_enable)(int enable);
31         int (*power_enable) (int enable);
32 };
33
34 #endif /* __CAN_PLATFORM_MCP251X_H__ */