mcp251x.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef __CAN_PLATFORM_MCP251X_H__
  2. #define __CAN_PLATFORM_MCP251X_H__
  3. /*
  4. *
  5. * CAN bus driver for Microchip 251x CAN Controller with SPI Interface
  6. *
  7. */
  8. #include <linux/spi/spi.h>
  9. /**
  10. * struct mcp251x_platform_data - MCP251X SPI CAN controller platform data
  11. * @oscillator_frequency: - oscillator frequency in Hz
  12. * @irq_flags: - IRQF configuration flags
  13. * @board_specific_setup: - called before probing the chip (power,reset)
  14. * @transceiver_enable: - called to power on/off the transceiver
  15. * @power_enable: - called to power on/off the mcp *and* the
  16. * transceiver
  17. *
  18. * Please note that you should define power_enable or transceiver_enable or
  19. * none of them. Defining both of them is no use.
  20. *
  21. */
  22. struct mcp251x_platform_data {
  23. unsigned long oscillator_frequency;
  24. unsigned long irq_flags;
  25. int (*board_specific_setup)(struct spi_device *spi);
  26. int (*transceiver_enable)(int enable);
  27. int (*power_enable) (int enable);
  28. };
  29. #endif /* __CAN_PLATFORM_MCP251X_H__ */