drv_types_gspi.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2007 - 2017 Realtek Corporation.
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of version 2 of the GNU General Public License as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12. * more details.
  13. *
  14. *****************************************************************************/
  15. #ifndef __DRV_TYPES_GSPI_H__
  16. #define __DRV_TYPES_GSPI_H__
  17. /* SPI Header Files */
  18. #ifdef PLATFORM_LINUX
  19. #include <linux/platform_device.h>
  20. #include <linux/spi/spi.h>
  21. #include <linux/gpio.h>
  22. /* #include <mach/ldo.h> */
  23. #include <asm/mach-types.h>
  24. #include <asm/gpio.h>
  25. #include <asm/io.h>
  26. #include <mach/board.h>
  27. #include <mach/hardware.h>
  28. #include <mach/irqs.h>
  29. #include <custom_gpio.h>
  30. #endif
  31. typedef struct gspi_data {
  32. u8 func_number;
  33. u8 tx_block_mode;
  34. u8 rx_block_mode;
  35. u32 block_transfer_len;
  36. #ifdef PLATFORM_LINUX
  37. struct spi_device *func;
  38. struct workqueue_struct *priv_wq;
  39. struct delayed_work irq_work;
  40. #endif
  41. } GSPI_DATA, *PGSPI_DATA;
  42. #endif /* #ifndef __DRV_TYPES_GSPI_H__ */