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 18 /* SPI Header Files */ 19 #ifdef PLATFORM_LINUX 20 #include <linux/platform_device.h> 21 #include <linux/spi/spi.h> 22 #include <linux/gpio.h> 23 /* #include <mach/ldo.h> */ 24 #include <asm/mach-types.h> 25 #include <asm/gpio.h> 26 #include <asm/io.h> 27 #include <mach/board.h> 28 #include <mach/hardware.h> 29 #include <mach/irqs.h> 30 #include <custom_gpio.h> 31 #endif 32 33 34 typedef struct gspi_data { 35 u8 func_number; 36 37 u8 tx_block_mode; 38 u8 rx_block_mode; 39 u32 block_transfer_len; 40 41 #ifdef PLATFORM_LINUX 42 struct spi_device *func; 43 44 struct workqueue_struct *priv_wq; 45 struct delayed_work irq_work; 46 #endif 47 } GSPI_DATA, *PGSPI_DATA; 48 49 #endif /* #ifndef __DRV_TYPES_GSPI_H__ */ 50