aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2013-02-05 07:30:13 -0500
committerGrant Likely <grant.likely@secretlab.ca>2013-02-05 07:30:13 -0500
commitf305a0a8d7fcd1a600bd0b727cd8137ed223f721 (patch)
tree982681a7e3c643096b65b9626ae993597155979d /include
parent766ed70447e0a9cfb23d068a4a929e18e54b0022 (diff)
parentd560040f7d6fbe0a2990b8f6edca1815e19e72f5 (diff)
Merge branch 'broonie/spi-next' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git
Minor features and bug fixes for PXA, OMAP and GPIO deivce drivers and a cosmetic change to the bitbang driver. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'include')
-rw-r--r--include/linux/platform_data/spi-omap2-mcspi.h3
-rw-r--r--include/linux/pxa2xx_ssp.h9
-rw-r--r--include/linux/spi/pxa2xx_spi.h21
-rw-r--r--include/linux/spi/spi_gpio.h4
4 files changed, 17 insertions, 20 deletions
diff --git a/include/linux/platform_data/spi-omap2-mcspi.h b/include/linux/platform_data/spi-omap2-mcspi.h
index a65572d53211..c100456eab17 100644
--- a/include/linux/platform_data/spi-omap2-mcspi.h
+++ b/include/linux/platform_data/spi-omap2-mcspi.h
@@ -22,6 +22,9 @@ struct omap2_mcspi_dev_attr {
22 22
23struct omap2_mcspi_device_config { 23struct omap2_mcspi_device_config {
24 unsigned turbo_mode:1; 24 unsigned turbo_mode:1;
25
26 /* toggle chip select after every word */
27 unsigned cs_per_word:1;
25}; 28};
26 29
27#endif 30#endif
diff --git a/include/linux/pxa2xx_ssp.h b/include/linux/pxa2xx_ssp.h
index f36632061c66..065e7f6c3ad7 100644
--- a/include/linux/pxa2xx_ssp.h
+++ b/include/linux/pxa2xx_ssp.h
@@ -206,6 +206,15 @@ static inline u32 pxa_ssp_read_reg(struct ssp_device *dev, u32 reg)
206 return __raw_readl(dev->mmio_base + reg); 206 return __raw_readl(dev->mmio_base + reg);
207} 207}
208 208
209#ifdef CONFIG_ARCH_PXA
209struct ssp_device *pxa_ssp_request(int port, const char *label); 210struct ssp_device *pxa_ssp_request(int port, const char *label);
210void pxa_ssp_free(struct ssp_device *); 211void pxa_ssp_free(struct ssp_device *);
212#else
213static inline struct ssp_device *pxa_ssp_request(int port, const char *label)
214{
215 return NULL;
216}
217static inline void pxa_ssp_free(struct ssp_device *ssp) {}
218#endif
219
211#endif 220#endif
diff --git a/include/linux/spi/pxa2xx_spi.h b/include/linux/spi/pxa2xx_spi.h
index c73d1445c77e..053b5ba51b25 100644
--- a/include/linux/spi/pxa2xx_spi.h
+++ b/include/linux/spi/pxa2xx_spi.h
@@ -28,6 +28,9 @@ struct pxa2xx_spi_master {
28 u32 clock_enable; 28 u32 clock_enable;
29 u16 num_chipselect; 29 u16 num_chipselect;
30 u8 enable_dma; 30 u8 enable_dma;
31
32 /* For non-PXA arches */
33 struct ssp_device ssp;
31}; 34};
32 35
33/* spi_board_info.controller_data for SPI slave devices, 36/* spi_board_info.controller_data for SPI slave devices,
@@ -130,23 +133,5 @@ static inline void pxa_free_dma(int dma_ch)
130{ 133{
131} 134}
132 135
133/*
134 * The CE4100 does not have the clk framework implemented and SPI clock can
135 * not be switched on/off or the divider changed.
136 */
137static inline void clk_disable(struct clk *clk)
138{
139}
140
141static inline int clk_enable(struct clk *clk)
142{
143 return 0;
144}
145
146static inline unsigned long clk_get_rate(struct clk *clk)
147{
148 return 3686400;
149}
150
151#endif 136#endif
152#endif 137#endif
diff --git a/include/linux/spi/spi_gpio.h b/include/linux/spi/spi_gpio.h
index 369b3d7d5b95..1634ce31c06d 100644
--- a/include/linux/spi/spi_gpio.h
+++ b/include/linux/spi/spi_gpio.h
@@ -62,8 +62,8 @@
62 */ 62 */
63struct spi_gpio_platform_data { 63struct spi_gpio_platform_data {
64 unsigned sck; 64 unsigned sck;
65 unsigned mosi; 65 unsigned long mosi;
66 unsigned miso; 66 unsigned long miso;
67 67
68 u16 num_chipselect; 68 u16 num_chipselect;
69}; 69};