blob: 9e7e83d8645b667be1437c3bc705ac8f98144d6e [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
David Brownelld29389d2009-01-06 14:41:41 -08002#ifndef __LINUX_SPI_GPIO_H
3#define __LINUX_SPI_GPIO_H
4
5/*
6 * For each bitbanged SPI bus, set up a platform_device node with:
7 * - name "spi_gpio"
8 * - id the same as the SPI bus number it implements
9 * - dev.platform data pointing to a struct spi_gpio_platform_data
10 *
Linus Walleij9b00bc72018-02-12 13:45:30 +010011 * Use spi_board_info with these busses in the usual way.
Marek Szyprowski3c8e1a82010-06-30 14:27:37 -060012 *
David Brownelld29389d2009-01-06 14:41:41 -080013 * If the bitbanged bus is later switched to a "native" controller,
14 * that platform_device and controller_data should be removed.
15 */
16
David Brownelld29389d2009-01-06 14:41:41 -080017/**
18 * struct spi_gpio_platform_data - parameter for bitbanged SPI master
David Brownelld29389d2009-01-06 14:41:41 -080019 * @num_chipselect: how many slaves to allow
David Brownelld29389d2009-01-06 14:41:41 -080020 */
21struct spi_gpio_platform_data {
David Brownelld29389d2009-01-06 14:41:41 -080022 u16 num_chipselect;
23};
24
25#endif /* __LINUX_SPI_GPIO_H */