diff options
author | Wolfram Sang <wsa@the-dreams.de> | 2014-07-09 10:27:09 -0400 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2014-07-16 16:59:11 -0400 |
commit | 5fddf5aac8d9caae67a31bb6e33dc933552a9c7f (patch) | |
tree | 9e74174216c7bc5561e1acc0ba18107b50058d60 /drivers/i2c | |
parent | 8fe8bc7773303e3c49be348c3180bc9785104dfc (diff) |
i2c: scx200: drop GPIO based i2c driver
This driver is marked as deprecated since the pre-git era. Any user
left(?) should really have switched to i2c-gpio meanwhile.
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Jim Cromie <jim.cromie@gmail.com>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/Kconfig | 31 | ||||
-rw-r--r-- | drivers/i2c/busses/Makefile | 1 | ||||
-rw-r--r-- | drivers/i2c/busses/scx200_i2c.c | 129 |
3 files changed, 0 insertions, 161 deletions
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index d25dd120c011..0a8a5bba4ef9 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig | |||
@@ -1008,37 +1008,6 @@ config I2C_CROS_EC_TUNNEL | |||
1008 | connected there. This will work whatever the interface used to | 1008 | connected there. This will work whatever the interface used to |
1009 | talk to the EC (SPI, I2C or LPC). | 1009 | talk to the EC (SPI, I2C or LPC). |
1010 | 1010 | ||
1011 | config SCx200_I2C | ||
1012 | tristate "NatSemi SCx200 I2C using GPIO pins (DEPRECATED)" | ||
1013 | depends on SCx200_GPIO | ||
1014 | select I2C_ALGOBIT | ||
1015 | help | ||
1016 | Enable the use of two GPIO pins of a SCx200 processor as an I2C bus. | ||
1017 | |||
1018 | If you don't know what to do here, say N. | ||
1019 | |||
1020 | This support is also available as a module. If so, the module | ||
1021 | will be called scx200_i2c. | ||
1022 | |||
1023 | This driver is deprecated and will be dropped soon. Use i2c-gpio | ||
1024 | (or scx200_acb) instead. | ||
1025 | |||
1026 | config SCx200_I2C_SCL | ||
1027 | int "GPIO pin used for SCL" | ||
1028 | depends on SCx200_I2C | ||
1029 | default "12" | ||
1030 | help | ||
1031 | Enter the GPIO pin number used for the SCL signal. This value can | ||
1032 | also be specified with a module parameter. | ||
1033 | |||
1034 | config SCx200_I2C_SDA | ||
1035 | int "GPIO pin used for SDA" | ||
1036 | depends on SCx200_I2C | ||
1037 | default "13" | ||
1038 | help | ||
1039 | Enter the GPIO pin number used for the SSA signal. This value can | ||
1040 | also be specified with a module parameter. | ||
1041 | |||
1042 | config SCx200_ACB | 1011 | config SCx200_ACB |
1043 | tristate "Geode ACCESS.bus support" | 1012 | tristate "Geode ACCESS.bus support" |
1044 | depends on X86_32 && PCI | 1013 | depends on X86_32 && PCI |
diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile index 1958b490105e..49bf07e5ef4d 100644 --- a/drivers/i2c/busses/Makefile +++ b/drivers/i2c/busses/Makefile | |||
@@ -100,6 +100,5 @@ obj-$(CONFIG_I2C_ELEKTOR) += i2c-elektor.o | |||
100 | obj-$(CONFIG_I2C_PCA_ISA) += i2c-pca-isa.o | 100 | obj-$(CONFIG_I2C_PCA_ISA) += i2c-pca-isa.o |
101 | obj-$(CONFIG_I2C_SIBYTE) += i2c-sibyte.o | 101 | obj-$(CONFIG_I2C_SIBYTE) += i2c-sibyte.o |
102 | obj-$(CONFIG_SCx200_ACB) += scx200_acb.o | 102 | obj-$(CONFIG_SCx200_ACB) += scx200_acb.o |
103 | obj-$(CONFIG_SCx200_I2C) += scx200_i2c.o | ||
104 | 103 | ||
105 | ccflags-$(CONFIG_I2C_DEBUG_BUS) := -DDEBUG | 104 | ccflags-$(CONFIG_I2C_DEBUG_BUS) := -DDEBUG |
diff --git a/drivers/i2c/busses/scx200_i2c.c b/drivers/i2c/busses/scx200_i2c.c deleted file mode 100644 index 8eadf0f47ad7..000000000000 --- a/drivers/i2c/busses/scx200_i2c.c +++ /dev/null | |||
@@ -1,129 +0,0 @@ | |||
1 | /* linux/drivers/i2c/busses/scx200_i2c.c | ||
2 | |||
3 | Copyright (c) 2001,2002 Christer Weinigel <wingel@nano-system.com> | ||
4 | |||
5 | National Semiconductor SCx200 I2C bus on GPIO pins | ||
6 | |||
7 | Based on i2c-velleman.c Copyright (C) 1995-96, 2000 Simon G. Vogl | ||
8 | |||
9 | This program is free software; you can redistribute it and/or modify | ||
10 | it under the terms of the GNU General Public License as published by | ||
11 | the Free Software Foundation; either version 2 of the License, or | ||
12 | (at your option) any later version. | ||
13 | |||
14 | This program is distributed in the hope that it will be useful, | ||
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | GNU General Public License for more details. | ||
18 | |||
19 | You should have received a copy of the GNU General Public License | ||
20 | along with this program; if not, write to the Free Software | ||
21 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
22 | */ | ||
23 | |||
24 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
25 | |||
26 | #include <linux/module.h> | ||
27 | #include <linux/errno.h> | ||
28 | #include <linux/kernel.h> | ||
29 | #include <linux/i2c.h> | ||
30 | #include <linux/i2c-algo-bit.h> | ||
31 | #include <linux/io.h> | ||
32 | |||
33 | #include <linux/scx200_gpio.h> | ||
34 | |||
35 | MODULE_AUTHOR("Christer Weinigel <wingel@nano-system.com>"); | ||
36 | MODULE_DESCRIPTION("NatSemi SCx200 I2C Driver"); | ||
37 | MODULE_LICENSE("GPL"); | ||
38 | |||
39 | static int scl = CONFIG_SCx200_I2C_SCL; | ||
40 | static int sda = CONFIG_SCx200_I2C_SDA; | ||
41 | |||
42 | module_param(scl, int, 0); | ||
43 | MODULE_PARM_DESC(scl, "GPIO line for SCL"); | ||
44 | module_param(sda, int, 0); | ||
45 | MODULE_PARM_DESC(sda, "GPIO line for SDA"); | ||
46 | |||
47 | static void scx200_i2c_setscl(void *data, int state) | ||
48 | { | ||
49 | scx200_gpio_set(scl, state); | ||
50 | } | ||
51 | |||
52 | static void scx200_i2c_setsda(void *data, int state) | ||
53 | { | ||
54 | scx200_gpio_set(sda, state); | ||
55 | } | ||
56 | |||
57 | static int scx200_i2c_getscl(void *data) | ||
58 | { | ||
59 | return scx200_gpio_get(scl); | ||
60 | } | ||
61 | |||
62 | static int scx200_i2c_getsda(void *data) | ||
63 | { | ||
64 | return scx200_gpio_get(sda); | ||
65 | } | ||
66 | |||
67 | /* ------------------------------------------------------------------------ | ||
68 | * Encapsulate the above functions in the correct operations structure. | ||
69 | * This is only done when more than one hardware adapter is supported. | ||
70 | */ | ||
71 | |||
72 | static struct i2c_algo_bit_data scx200_i2c_data = { | ||
73 | .setsda = scx200_i2c_setsda, | ||
74 | .setscl = scx200_i2c_setscl, | ||
75 | .getsda = scx200_i2c_getsda, | ||
76 | .getscl = scx200_i2c_getscl, | ||
77 | .udelay = 10, | ||
78 | .timeout = HZ, | ||
79 | }; | ||
80 | |||
81 | static struct i2c_adapter scx200_i2c_ops = { | ||
82 | .owner = THIS_MODULE, | ||
83 | .class = I2C_CLASS_HWMON | I2C_CLASS_SPD, | ||
84 | .algo_data = &scx200_i2c_data, | ||
85 | .name = "NatSemi SCx200 I2C", | ||
86 | }; | ||
87 | |||
88 | static int scx200_i2c_init(void) | ||
89 | { | ||
90 | pr_debug("NatSemi SCx200 I2C Driver\n"); | ||
91 | |||
92 | if (!scx200_gpio_present()) { | ||
93 | pr_err("no SCx200 gpio pins available\n"); | ||
94 | return -ENODEV; | ||
95 | } | ||
96 | |||
97 | pr_debug("SCL=GPIO%02u, SDA=GPIO%02u\n", scl, sda); | ||
98 | |||
99 | if (scl == -1 || sda == -1 || scl == sda) { | ||
100 | pr_err("scl and sda must be specified\n"); | ||
101 | return -EINVAL; | ||
102 | } | ||
103 | |||
104 | /* Configure GPIOs as open collector outputs */ | ||
105 | scx200_gpio_configure(scl, ~2, 5); | ||
106 | scx200_gpio_configure(sda, ~2, 5); | ||
107 | |||
108 | if (i2c_bit_add_bus(&scx200_i2c_ops) < 0) { | ||
109 | pr_err("adapter %s registration failed\n", scx200_i2c_ops.name); | ||
110 | return -ENODEV; | ||
111 | } | ||
112 | |||
113 | return 0; | ||
114 | } | ||
115 | |||
116 | static void scx200_i2c_cleanup(void) | ||
117 | { | ||
118 | i2c_del_adapter(&scx200_i2c_ops); | ||
119 | } | ||
120 | |||
121 | module_init(scx200_i2c_init); | ||
122 | module_exit(scx200_i2c_cleanup); | ||
123 | |||
124 | /* | ||
125 | Local variables: | ||
126 | compile-command: "make -k -C ../.. SUBDIRS=drivers/i2c modules" | ||
127 | c-basic-offset: 8 | ||
128 | End: | ||
129 | */ | ||