cxd2880_spi.h 713 B

1234567891011121314151617181920212223242526272829303132333435
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * cxd2880_spi.h
  4. * Sony CXD2880 DVB-T2/T tuner + demodulator driver
  5. * SPI access definitions
  6. *
  7. * Copyright (C) 2016, 2017, 2018 Sony Semiconductor Solutions Corporation
  8. */
  9. #ifndef CXD2880_SPI_H
  10. #define CXD2880_SPI_H
  11. #include "cxd2880_common.h"
  12. enum cxd2880_spi_mode {
  13. CXD2880_SPI_MODE_0,
  14. CXD2880_SPI_MODE_1,
  15. CXD2880_SPI_MODE_2,
  16. CXD2880_SPI_MODE_3
  17. };
  18. struct cxd2880_spi {
  19. int (*read)(struct cxd2880_spi *spi, u8 *data,
  20. u32 size);
  21. int (*write)(struct cxd2880_spi *spi, const u8 *data,
  22. u32 size);
  23. int (*write_read)(struct cxd2880_spi *spi,
  24. const u8 *tx_data, u32 tx_size,
  25. u8 *rx_data, u32 rx_size);
  26. u32 flags;
  27. void *user;
  28. };
  29. #endif