summaryrefslogtreecommitdiff
path: root/include/linux/spi
diff options
context:
space:
mode:
authorThomas Chou <thomas@wytron.com.tw>2011-02-14 05:20:39 +0300
committerGrant Likely <grant.likely@secretlab.ca>2011-02-23 00:59:53 +0300
commitce792580ea2ce6f7259b45124e9ccc4574c31606 (patch)
treef2ec419aade609b4e425ed4995c01ba818e363af /include/linux/spi
parent9bde36afcaf0ec2ad9f03974da41875c759a4fe8 (diff)
downloadlinux-ce792580ea2ce6f7259b45124e9ccc4574c31606.tar.xz
spi: add OpenCores tiny SPI driver
This patch adds support of OpenCores tiny SPI driver. http://opencores.org/project,tiny_spi Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'include/linux/spi')
-rw-r--r--include/linux/spi/spi_oc_tiny.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/spi/spi_oc_tiny.h b/include/linux/spi/spi_oc_tiny.h
new file mode 100644
index 000000000000..1ac529cf4f06
--- /dev/null
+++ b/include/linux/spi/spi_oc_tiny.h
@@ -0,0 +1,20 @@
+#ifndef _LINUX_SPI_SPI_OC_TINY_H
+#define _LINUX_SPI_SPI_OC_TINY_H
+
+/**
+ * struct tiny_spi_platform_data - platform data of the OpenCores tiny SPI
+ * @freq: input clock freq to the core.
+ * @baudwidth: baud rate divider width of the core.
+ * @gpio_cs_count: number of gpio pins used for chipselect.
+ * @gpio_cs: array of gpio pins used for chipselect.
+ *
+ * freq and baudwidth are used only if the divider is programmable.
+ */
+struct tiny_spi_platform_data {
+ unsigned int freq;
+ unsigned int baudwidth;
+ unsigned int gpio_cs_count;
+ int *gpio_cs;
+};
+
+#endif /* _LINUX_SPI_SPI_OC_TINY_H */