]> git.ipfire.org Git - people/arne_f/kernel.git/blob - include/linux/platform_data/spi-imx.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[people/arne_f/kernel.git] / include / linux / platform_data / spi-imx.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2
3 #ifndef __MACH_SPI_H_
4 #define __MACH_SPI_H_
5
6 /*
7 * struct spi_imx_master - device.platform_data for SPI controller devices.
8 * @chipselect: Array of chipselects for this master. Numbers >= 0 mean gpio
9 * pins, numbers < 0 mean internal CSPI chipselects according
10 * to MXC_SPI_CS(). Normally you want to use gpio based chip
11 * selects as the CSPI module tries to be intelligent about
12 * when to assert the chipselect: The CSPI module deasserts the
13 * chipselect once it runs out of input data. The other problem
14 * is that it is not possible to mix between high active and low
15 * active chipselects on one single bus using the internal
16 * chipselects. Unfortunately Freescale decided to put some
17 * chipselects on dedicated pins which are not usable as gpios,
18 * so we have to support the internal chipselects.
19 * @num_chipselect: ARRAY_SIZE(chipselect)
20 */
21 struct spi_imx_master {
22 int *chipselect;
23 int num_chipselect;
24 };
25
26 #define MXC_SPI_CS(no) ((no) - 32)
27
28 #endif /* __MACH_SPI_H_*/