1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */ 2*4882a593Smuzhiyun #ifndef __LINUX_SPI_GPIO_H 3*4882a593Smuzhiyun #define __LINUX_SPI_GPIO_H 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun /* 6*4882a593Smuzhiyun * For each bitbanged SPI bus, set up a platform_device node with: 7*4882a593Smuzhiyun * - name "spi_gpio" 8*4882a593Smuzhiyun * - id the same as the SPI bus number it implements 9*4882a593Smuzhiyun * - dev.platform data pointing to a struct spi_gpio_platform_data 10*4882a593Smuzhiyun * 11*4882a593Smuzhiyun * Use spi_board_info with these busses in the usual way. 12*4882a593Smuzhiyun * 13*4882a593Smuzhiyun * If the bitbanged bus is later switched to a "native" controller, 14*4882a593Smuzhiyun * that platform_device and controller_data should be removed. 15*4882a593Smuzhiyun */ 16*4882a593Smuzhiyun 17*4882a593Smuzhiyun /** 18*4882a593Smuzhiyun * struct spi_gpio_platform_data - parameter for bitbanged SPI master 19*4882a593Smuzhiyun * @num_chipselect: how many slaves to allow 20*4882a593Smuzhiyun */ 21*4882a593Smuzhiyun struct spi_gpio_platform_data { 22*4882a593Smuzhiyun u16 num_chipselect; 23*4882a593Smuzhiyun }; 24*4882a593Smuzhiyun 25*4882a593Smuzhiyun #endif /* __LINUX_SPI_GPIO_H */ 26