Commit 45fae7def636a2b400595d56c67cfed60051b773
Committed by
Grant Likely
1 parent
947b35d52d
Exists in
master
and in
38 other branches
spi: remove obsolete spi-s3c24xx-gpio driver
It was equivalent to spi-gpio, and there's no longer any in-tree users of it, so get rid of it. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Acked-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Showing 3 changed files with 0 additions and 211 deletions Side-by-side Diff
drivers/spi/Kconfig
... | ... | @@ -313,16 +313,6 @@ |
313 | 313 | no free DMA channels, or when doing transfers that required both |
314 | 314 | TX and RX data paths. |
315 | 315 | |
316 | -config SPI_S3C24XX_GPIO | |
317 | - tristate "Samsung S3C24XX series SPI by GPIO" | |
318 | - depends on ARCH_S3C2410 && EXPERIMENTAL | |
319 | - select SPI_BITBANG | |
320 | - help | |
321 | - SPI driver for Samsung S3C24XX series ARM SoCs using | |
322 | - GPIO lines to provide the SPI bus. This can be used where | |
323 | - the inbuilt hardware cannot provide the transfer mode, or | |
324 | - where the board is using non hardware connected pins. | |
325 | - | |
326 | 316 | config SPI_S3C64XX |
327 | 317 | tristate "Samsung S3C64XX series type SPI" |
328 | 318 | depends on (ARCH_S3C64XX || ARCH_S5P64X0) |
drivers/spi/Makefile
... | ... | @@ -44,7 +44,6 @@ |
44 | 44 | obj-$(CONFIG_SPI_PPC4xx) += spi-ppc4xx.o |
45 | 45 | obj-$(CONFIG_SPI_PXA2XX) += spi-pxa2xx.o |
46 | 46 | obj-$(CONFIG_SPI_PXA2XX_PCI) += spi-pxa2xx-pci.o |
47 | -obj-$(CONFIG_SPI_S3C24XX_GPIO) += spi-s3c24xx-gpio.o | |
48 | 47 | obj-$(CONFIG_SPI_S3C24XX) += spi-s3c24xx-hw.o |
49 | 48 | spi-s3c24xx-hw-y := spi-s3c24xx.o |
50 | 49 | spi-s3c24xx-hw-$(CONFIG_SPI_S3C24XX_FIQ) += spi-s3c24xx-fiq.o |
drivers/spi/spi-s3c24xx-gpio.c
1 | -/* | |
2 | - * Copyright (c) 2006 Ben Dooks | |
3 | - * Copyright (c) 2006 Simtec Electronics | |
4 | - * | |
5 | - * S3C24XX GPIO based SPI driver | |
6 | - * | |
7 | - * This program is free software; you can redistribute it and/or modify | |
8 | - * it under the terms of the GNU General Public License version 2 as | |
9 | - * published by the Free Software Foundation. | |
10 | - * | |
11 | -*/ | |
12 | - | |
13 | -#include <linux/kernel.h> | |
14 | -#include <linux/init.h> | |
15 | -#include <linux/delay.h> | |
16 | -#include <linux/spinlock.h> | |
17 | -#include <linux/workqueue.h> | |
18 | -#include <linux/platform_device.h> | |
19 | -#include <linux/gpio.h> | |
20 | - | |
21 | -#include <linux/spi/spi.h> | |
22 | -#include <linux/spi/spi_bitbang.h> | |
23 | - | |
24 | -#include <mach/regs-gpio.h> | |
25 | -#include <mach/spi-gpio.h> | |
26 | -#include <mach/hardware.h> | |
27 | - | |
28 | -struct s3c2410_spigpio { | |
29 | - struct spi_bitbang bitbang; | |
30 | - | |
31 | - struct s3c2410_spigpio_info *info; | |
32 | - struct platform_device *dev; | |
33 | -}; | |
34 | - | |
35 | -static inline struct s3c2410_spigpio *spidev_to_sg(struct spi_device *spi) | |
36 | -{ | |
37 | - return spi_master_get_devdata(spi->master); | |
38 | -} | |
39 | - | |
40 | -static inline void setsck(struct spi_device *dev, int on) | |
41 | -{ | |
42 | - struct s3c2410_spigpio *sg = spidev_to_sg(dev); | |
43 | - s3c2410_gpio_setpin(sg->info->pin_clk, on ? 1 : 0); | |
44 | -} | |
45 | - | |
46 | -static inline void setmosi(struct spi_device *dev, int on) | |
47 | -{ | |
48 | - struct s3c2410_spigpio *sg = spidev_to_sg(dev); | |
49 | - s3c2410_gpio_setpin(sg->info->pin_mosi, on ? 1 : 0); | |
50 | -} | |
51 | - | |
52 | -static inline u32 getmiso(struct spi_device *dev) | |
53 | -{ | |
54 | - struct s3c2410_spigpio *sg = spidev_to_sg(dev); | |
55 | - return s3c2410_gpio_getpin(sg->info->pin_miso) ? 1 : 0; | |
56 | -} | |
57 | - | |
58 | -#define spidelay(x) ndelay(x) | |
59 | - | |
60 | -#include "spi-bitbang-txrx.h" | |
61 | - | |
62 | - | |
63 | -static u32 s3c2410_spigpio_txrx_mode0(struct spi_device *spi, | |
64 | - unsigned nsecs, u32 word, u8 bits) | |
65 | -{ | |
66 | - return bitbang_txrx_be_cpha0(spi, nsecs, 0, 0, word, bits); | |
67 | -} | |
68 | - | |
69 | -static u32 s3c2410_spigpio_txrx_mode1(struct spi_device *spi, | |
70 | - unsigned nsecs, u32 word, u8 bits) | |
71 | -{ | |
72 | - return bitbang_txrx_be_cpha1(spi, nsecs, 0, 0, word, bits); | |
73 | -} | |
74 | - | |
75 | -static u32 s3c2410_spigpio_txrx_mode2(struct spi_device *spi, | |
76 | - unsigned nsecs, u32 word, u8 bits) | |
77 | -{ | |
78 | - return bitbang_txrx_be_cpha0(spi, nsecs, 1, 0, word, bits); | |
79 | -} | |
80 | - | |
81 | -static u32 s3c2410_spigpio_txrx_mode3(struct spi_device *spi, | |
82 | - unsigned nsecs, u32 word, u8 bits) | |
83 | -{ | |
84 | - return bitbang_txrx_be_cpha1(spi, nsecs, 1, 0, word, bits); | |
85 | -} | |
86 | - | |
87 | - | |
88 | -static void s3c2410_spigpio_chipselect(struct spi_device *dev, int value) | |
89 | -{ | |
90 | - struct s3c2410_spigpio *sg = spidev_to_sg(dev); | |
91 | - | |
92 | - if (sg->info && sg->info->chip_select) | |
93 | - (sg->info->chip_select)(sg->info, value); | |
94 | -} | |
95 | - | |
96 | -static int s3c2410_spigpio_probe(struct platform_device *dev) | |
97 | -{ | |
98 | - struct s3c2410_spigpio_info *info; | |
99 | - struct spi_master *master; | |
100 | - struct s3c2410_spigpio *sp; | |
101 | - int ret; | |
102 | - | |
103 | - master = spi_alloc_master(&dev->dev, sizeof(struct s3c2410_spigpio)); | |
104 | - if (master == NULL) { | |
105 | - dev_err(&dev->dev, "failed to allocate spi master\n"); | |
106 | - ret = -ENOMEM; | |
107 | - goto err; | |
108 | - } | |
109 | - | |
110 | - sp = spi_master_get_devdata(master); | |
111 | - | |
112 | - platform_set_drvdata(dev, sp); | |
113 | - | |
114 | - /* copy in the plkatform data */ | |
115 | - info = sp->info = dev->dev.platform_data; | |
116 | - | |
117 | - /* setup spi bitbang adaptor */ | |
118 | - sp->bitbang.master = spi_master_get(master); | |
119 | - sp->bitbang.master->bus_num = info->bus_num; | |
120 | - sp->bitbang.master->num_chipselect = info->num_chipselect; | |
121 | - sp->bitbang.chipselect = s3c2410_spigpio_chipselect; | |
122 | - | |
123 | - sp->bitbang.txrx_word[SPI_MODE_0] = s3c2410_spigpio_txrx_mode0; | |
124 | - sp->bitbang.txrx_word[SPI_MODE_1] = s3c2410_spigpio_txrx_mode1; | |
125 | - sp->bitbang.txrx_word[SPI_MODE_2] = s3c2410_spigpio_txrx_mode2; | |
126 | - sp->bitbang.txrx_word[SPI_MODE_3] = s3c2410_spigpio_txrx_mode3; | |
127 | - | |
128 | - /* set state of spi pins, always assume that the clock is | |
129 | - * available, but do check the MOSI and MISO. */ | |
130 | - s3c2410_gpio_setpin(info->pin_clk, 0); | |
131 | - s3c2410_gpio_cfgpin(info->pin_clk, S3C2410_GPIO_OUTPUT); | |
132 | - | |
133 | - if (info->pin_mosi < S3C2410_GPH10) { | |
134 | - s3c2410_gpio_setpin(info->pin_mosi, 0); | |
135 | - s3c2410_gpio_cfgpin(info->pin_mosi, S3C2410_GPIO_OUTPUT); | |
136 | - } | |
137 | - | |
138 | - if (info->pin_miso != S3C2410_GPA0 && info->pin_miso < S3C2410_GPH10) | |
139 | - s3c2410_gpio_cfgpin(info->pin_miso, S3C2410_GPIO_INPUT); | |
140 | - | |
141 | - ret = spi_bitbang_start(&sp->bitbang); | |
142 | - if (ret) | |
143 | - goto err_no_bitbang; | |
144 | - | |
145 | - return 0; | |
146 | - | |
147 | - err_no_bitbang: | |
148 | - spi_master_put(sp->bitbang.master); | |
149 | - err: | |
150 | - return ret; | |
151 | - | |
152 | -} | |
153 | - | |
154 | -static int s3c2410_spigpio_remove(struct platform_device *dev) | |
155 | -{ | |
156 | - struct s3c2410_spigpio *sp = platform_get_drvdata(dev); | |
157 | - | |
158 | - spi_bitbang_stop(&sp->bitbang); | |
159 | - spi_master_put(sp->bitbang.master); | |
160 | - | |
161 | - return 0; | |
162 | -} | |
163 | - | |
164 | -/* all gpio should be held over suspend/resume, so we should | |
165 | - * not need to deal with this | |
166 | -*/ | |
167 | - | |
168 | -#define s3c2410_spigpio_suspend NULL | |
169 | -#define s3c2410_spigpio_resume NULL | |
170 | - | |
171 | -/* work with hotplug and coldplug */ | |
172 | -MODULE_ALIAS("platform:spi_s3c24xx_gpio"); | |
173 | - | |
174 | -static struct platform_driver s3c2410_spigpio_drv = { | |
175 | - .probe = s3c2410_spigpio_probe, | |
176 | - .remove = s3c2410_spigpio_remove, | |
177 | - .suspend = s3c2410_spigpio_suspend, | |
178 | - .resume = s3c2410_spigpio_resume, | |
179 | - .driver = { | |
180 | - .name = "spi_s3c24xx_gpio", | |
181 | - .owner = THIS_MODULE, | |
182 | - }, | |
183 | -}; | |
184 | - | |
185 | -static int __init s3c2410_spigpio_init(void) | |
186 | -{ | |
187 | - return platform_driver_register(&s3c2410_spigpio_drv); | |
188 | -} | |
189 | - | |
190 | -static void __exit s3c2410_spigpio_exit(void) | |
191 | -{ | |
192 | - platform_driver_unregister(&s3c2410_spigpio_drv); | |
193 | -} | |
194 | - | |
195 | -module_init(s3c2410_spigpio_init); | |
196 | -module_exit(s3c2410_spigpio_exit); | |
197 | - | |
198 | -MODULE_DESCRIPTION("S3C24XX SPI Driver"); | |
199 | -MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>"); | |
200 | -MODULE_LICENSE("GPL"); |