summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-pxa2xx.h
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2016-09-26 12:19:50 (GMT)
committerMark Brown <broonie@kernel.org>2016-09-26 16:11:14 (GMT)
commit99f499cd650405bbe6a9b5386d4b11ee81514fb7 (patch)
tree48882d1cafee7da91e34946f6666104d21b0ff4a /drivers/spi/spi-pxa2xx.h
parent7c7289a40425d48bbfcaacc454a8caf5b47f63b0 (diff)
downloadlinux-99f499cd650405bbe6a9b5386d4b11ee81514fb7.tar.xz
spi: pxa2xx: Add support for GPIO descriptor chip selects
The driver uses custom chip_info coming from platform data for chip selects implemented as GPIOs. If the system lacks board files setting up the platform data, it is not possible to use GPIOs as chip selects. This adds support for GPIO descriptors so that regardless of the underlying firmware interface (DT, ACPI or platform data) the driver can request GPIOs used as chip selects and configure them accordingly. The custom chip_info GPIO support is still left there to make sure the existing systems keep working as expected. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-pxa2xx.h')
-rw-r--r--drivers/spi/spi-pxa2xx.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/spi/spi-pxa2xx.h b/drivers/spi/spi-pxa2xx.h
index ae3b15f..ce31b81 100644
--- a/drivers/spi/spi-pxa2xx.h
+++ b/drivers/spi/spi-pxa2xx.h
@@ -66,6 +66,9 @@ struct driver_data {
void (*cs_control)(u32 command);
void __iomem *lpss_base;
+
+ /* GPIOs for chip selects */
+ struct gpio_desc **cs_gpiods;
};
struct chip_data {