Diff markup
1 /* 1 /*
2 * i2c-algo-pca.c i2c driver algorithms for P 2 * i2c-algo-pca.c i2c driver algorithms for PCA9564 adapters
3 * Copyright (C) 2004 Arcom Control Systems 3 * Copyright (C) 2004 Arcom Control Systems
4 * 4 *
5 * This program is free software; you can red 5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Publ 6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either versi 7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version. 8 * (at your option) any later version.
9 * 9 *
10 * This program is distributed in the hope th 10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULA 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more detail 13 * GNU General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU 15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to 16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, 17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */ 18 */
19 19
20 #include <linux/kernel.h> 20 #include <linux/kernel.h>
21 #include <linux/module.h> 21 #include <linux/module.h>
22 #include <linux/moduleparam.h> 22 #include <linux/moduleparam.h>
23 #include <linux/delay.h> 23 #include <linux/delay.h>
24 #include <linux/slab.h> 24 #include <linux/slab.h>
25 #include <linux/init.h> 25 #include <linux/init.h>
26 #include <linux/errno.h> 26 #include <linux/errno.h>
27 #include <linux/i2c.h> 27 #include <linux/i2c.h>
28 #include <linux/i2c-algo-pca.h> 28 #include <linux/i2c-algo-pca.h>
29 #include "i2c-algo-pca.h" 29 #include "i2c-algo-pca.h"
30 30
31 #define DRIVER "i2c-algo-pca" 31 #define DRIVER "i2c-algo-pca"
32 32
33 #define DEB1(fmt, args...) do { if (i2c_debug> 33 #define DEB1(fmt, args...) do { if (i2c_debug>=1) printk(fmt, ## args); } while(0)
34 #define DEB2(fmt, args...) do { if (i2c_debug> 34 #define DEB2(fmt, args...) do { if (i2c_debug>=2) printk(fmt, ## args); } while(0)
35 #define DEB3(fmt, args...) do { if (i2c_debug> 35 #define DEB3(fmt, args...) do { if (i2c_debug>=3) printk(fmt, ## args); } while(0)
36 36
37 static int i2c_debug; 37 static int i2c_debug;
38 38
39 #define pca_outw(adap, reg, val) adap->write_b 39 #define pca_outw(adap, reg, val) adap->write_byte(adap, reg, val)
40 #define pca_inw(adap, reg) adap->read_byte(ada 40 #define pca_inw(adap, reg) adap->read_byte(adap, reg)
41 41
42 #define pca_status(adap) pca_inw(adap, I2C_PCA 42 #define pca_status(adap) pca_inw(adap, I2C_PCA_STA)
43 #define pca_clock(adap) adap->get_clock(adap) 43 #define pca_clock(adap) adap->get_clock(adap)
44 #define pca_own(adap) adap->get_own(adap) 44 #define pca_own(adap) adap->get_own(adap)
45 #define pca_set_con(adap, val) pca_outw(adap, 45 #define pca_set_con(adap, val) pca_outw(adap, I2C_PCA_CON, val)
46 #define pca_get_con(adap) pca_inw(adap, I2C_PC 46 #define pca_get_con(adap) pca_inw(adap, I2C_PCA_CON)
47 #define pca_wait(adap) adap->wait_for_interrup 47 #define pca_wait(adap) adap->wait_for_interrupt(adap)
48 48
49 /* 49 /*
50 * Generate a start condition on the i2c bus. 50 * Generate a start condition on the i2c bus.
51 * 51 *
52 * returns after the start condition has occur 52 * returns after the start condition has occurred
53 */ 53 */
54 static void pca_start(struct i2c_algo_pca_data 54 static void pca_start(struct i2c_algo_pca_data *adap)
55 { 55 {
56 int sta = pca_get_con(adap); 56 int sta = pca_get_con(adap);
57 DEB2("=== START\n"); 57 DEB2("=== START\n");
58 sta |= I2C_PCA_CON_STA; 58 sta |= I2C_PCA_CON_STA;
59 sta &= ~(I2C_PCA_CON_STO|I2C_PCA_CON_S 59 sta &= ~(I2C_PCA_CON_STO|I2C_PCA_CON_SI);
60 pca_set_con(adap, sta); 60 pca_set_con(adap, sta);
61 pca_wait(adap); 61 pca_wait(adap);
62 } 62 }
63 63
64 /* 64 /*
65 * Generate a repeated start condition on the 65 * Generate a repeated start condition on the i2c bus
66 * 66 *
67 * return after the repeated start condition h 67 * return after the repeated start condition has occurred
68 */ 68 */
69 static void pca_repeated_start(struct i2c_algo 69 static void pca_repeated_start(struct i2c_algo_pca_data *adap)
70 { 70 {
71 int sta = pca_get_con(adap); 71 int sta = pca_get_con(adap);
72 DEB2("=== REPEATED START\n"); 72 DEB2("=== REPEATED START\n");
73 sta |= I2C_PCA_CON_STA; 73 sta |= I2C_PCA_CON_STA;
74 sta &= ~(I2C_PCA_CON_STO|I2C_PCA_CON_S 74 sta &= ~(I2C_PCA_CON_STO|I2C_PCA_CON_SI);
75 pca_set_con(adap, sta); 75 pca_set_con(adap, sta);
76 pca_wait(adap); 76 pca_wait(adap);
77 } 77 }
78 78
79 /* 79 /*
80 * Generate a stop condition on the i2c bus 80 * Generate a stop condition on the i2c bus
81 * 81 *
82 * returns after the stop condition has been g 82 * returns after the stop condition has been generated
83 * 83 *
84 * STOPs do not generate an interrupt or set t 84 * STOPs do not generate an interrupt or set the SI flag, since the
85 * part returns the idle state (0xf8). Hence w 85 * part returns the idle state (0xf8). Hence we don't need to
86 * pca_wait here. 86 * pca_wait here.
87 */ 87 */
88 static void pca_stop(struct i2c_algo_pca_data 88 static void pca_stop(struct i2c_algo_pca_data *adap)
89 { 89 {
90 int sta = pca_get_con(adap); 90 int sta = pca_get_con(adap);
91 DEB2("=== STOP\n"); 91 DEB2("=== STOP\n");
92 sta |= I2C_PCA_CON_STO; 92 sta |= I2C_PCA_CON_STO;
93 sta &= ~(I2C_PCA_CON_STA|I2C_PCA_CON_S 93 sta &= ~(I2C_PCA_CON_STA|I2C_PCA_CON_SI);
94 pca_set_con(adap, sta); 94 pca_set_con(adap, sta);
95 } 95 }
96 96
97 /* 97 /*
98 * Send the slave address and R/W bit 98 * Send the slave address and R/W bit
99 * 99 *
100 * returns after the address has been sent 100 * returns after the address has been sent
101 */ 101 */
102 static void pca_address(struct i2c_algo_pca_da 102 static void pca_address(struct i2c_algo_pca_data *adap,
103 struct i2c_msg *msg) 103 struct i2c_msg *msg)
104 { 104 {
105 int sta = pca_get_con(adap); 105 int sta = pca_get_con(adap);
106 int addr; 106 int addr;
107 107
108 addr = ( (0x7f & msg->addr) << 1 ); 108 addr = ( (0x7f & msg->addr) << 1 );
109 if (msg->flags & I2C_M_RD ) 109 if (msg->flags & I2C_M_RD )
110 addr |= 1; 110 addr |= 1;
111 DEB2("=== SLAVE ADDRESS %#04x+%c=%#04x 111 DEB2("=== SLAVE ADDRESS %#04x+%c=%#04x\n",
112 msg->addr, msg->flags & I2C_M_RD 112 msg->addr, msg->flags & I2C_M_RD ? 'R' : 'W', addr);
113 113
114 pca_outw(adap, I2C_PCA_DAT, addr); 114 pca_outw(adap, I2C_PCA_DAT, addr);
115 115
116 sta &= ~(I2C_PCA_CON_STO|I2C_PCA_CON_S 116 sta &= ~(I2C_PCA_CON_STO|I2C_PCA_CON_STA|I2C_PCA_CON_SI);
117 pca_set_con(adap, sta); 117 pca_set_con(adap, sta);
118 118
119 pca_wait(adap); 119 pca_wait(adap);
120 } 120 }
121 121
122 /* 122 /*
123 * Transmit a byte. 123 * Transmit a byte.
124 * 124 *
125 * Returns after the byte has been transmitted 125 * Returns after the byte has been transmitted
126 */ 126 */
127 static void pca_tx_byte(struct i2c_algo_pca_da 127 static void pca_tx_byte(struct i2c_algo_pca_data *adap,
128 __u8 b) 128 __u8 b)
129 { 129 {
130 int sta = pca_get_con(adap); 130 int sta = pca_get_con(adap);
131 DEB2("=== WRITE %#04x\n", b); 131 DEB2("=== WRITE %#04x\n", b);
132 pca_outw(adap, I2C_PCA_DAT, b); 132 pca_outw(adap, I2C_PCA_DAT, b);
133 133
134 sta &= ~(I2C_PCA_CON_STO|I2C_PCA_CON_S 134 sta &= ~(I2C_PCA_CON_STO|I2C_PCA_CON_STA|I2C_PCA_CON_SI);
135 pca_set_con(adap, sta); 135 pca_set_con(adap, sta);
136 136
137 pca_wait(adap); 137 pca_wait(adap);
138 } 138 }
139 139
140 /* 140 /*
141 * Receive a byte 141 * Receive a byte
142 * 142 *
143 * returns immediately. 143 * returns immediately.
144 */ 144 */
145 static void pca_rx_byte(struct i2c_algo_pca_da 145 static void pca_rx_byte(struct i2c_algo_pca_data *adap,
146 __u8 *b, int ack) 146 __u8 *b, int ack)
147 { 147 {
148 *b = pca_inw(adap, I2C_PCA_DAT); 148 *b = pca_inw(adap, I2C_PCA_DAT);
149 DEB2("=== READ %#04x %s\n", *b, ack ? 149 DEB2("=== READ %#04x %s\n", *b, ack ? "ACK" : "NACK");
150 } 150 }
151 151
152 /* 152 /*
153 * Setup ACK or NACK for next received byte an 153 * Setup ACK or NACK for next received byte and wait for it to arrive.
154 * 154 *
155 * Returns after next byte has arrived. 155 * Returns after next byte has arrived.
156 */ 156 */
157 static void pca_rx_ack(struct i2c_algo_pca_dat 157 static void pca_rx_ack(struct i2c_algo_pca_data *adap,
158 int ack) 158 int ack)
159 { 159 {
160 int sta = pca_get_con(adap); 160 int sta = pca_get_con(adap);
161 161
162 sta &= ~(I2C_PCA_CON_STO|I2C_PCA_CON_S 162 sta &= ~(I2C_PCA_CON_STO|I2C_PCA_CON_STA|I2C_PCA_CON_SI|I2C_PCA_CON_AA);
163 163
164 if ( ack ) 164 if ( ack )
165 sta |= I2C_PCA_CON_AA; 165 sta |= I2C_PCA_CON_AA;
166 166
167 pca_set_con(adap, sta); 167 pca_set_con(adap, sta);
168 pca_wait(adap); 168 pca_wait(adap);
169 } 169 }
170 170
171 /* 171 /*
172 * Reset the i2c bus / SIO 172 * Reset the i2c bus / SIO
173 */ 173 */
174 static void pca_reset(struct i2c_algo_pca_data 174 static void pca_reset(struct i2c_algo_pca_data *adap)
175 { 175 {
176 /* apparently only an external reset w 176 /* apparently only an external reset will do it. not a lot can be done */
177 printk(KERN_ERR DRIVER ": Haven't figu 177 printk(KERN_ERR DRIVER ": Haven't figured out how to do a reset yet\n");
178 } 178 }
179 179
180 static int pca_xfer(struct i2c_adapter *i2c_ad 180 static int pca_xfer(struct i2c_adapter *i2c_adap,
181 struct i2c_msg *msgs, 181 struct i2c_msg *msgs,
182 int num) 182 int num)
183 { 183 {
184 struct i2c_algo_pca_data *adap = i2c_a 184 struct i2c_algo_pca_data *adap = i2c_adap->algo_data;
185 struct i2c_msg *msg = NULL; 185 struct i2c_msg *msg = NULL;
186 int curmsg; 186 int curmsg;
187 int numbytes = 0; 187 int numbytes = 0;
188 int state; 188 int state;
189 int ret; 189 int ret;
190 int timeout = 100; 190 int timeout = 100;
191 191
192 while ((state = pca_status(adap)) != 0 192 while ((state = pca_status(adap)) != 0xf8 && timeout--) {
193 msleep(10); 193 msleep(10);
194 } 194 }
195 if (state != 0xf8) { 195 if (state != 0xf8) {
196 dev_dbg(&i2c_adap->dev, "bus i 196 dev_dbg(&i2c_adap->dev, "bus is not idle. status is %#04x\n", state);
197 return -EIO; 197 return -EIO;
198 } 198 }
199 199
200 DEB1("{{{ XFER %d messages\n", num); 200 DEB1("{{{ XFER %d messages\n", num);
201 201
202 if (i2c_debug>=2) { 202 if (i2c_debug>=2) {
203 for (curmsg = 0; curmsg < num; 203 for (curmsg = 0; curmsg < num; curmsg++) {
204 int addr, i; 204 int addr, i;
205 msg = &msgs[curmsg]; 205 msg = &msgs[curmsg];
206 206
207 addr = (0x7f & msg->ad 207 addr = (0x7f & msg->addr) ;
208 208
209 if (msg->flags & I2C_M 209 if (msg->flags & I2C_M_RD )
210 printk(KERN_IN 210 printk(KERN_INFO " [%02d] RD %d bytes from %#02x [%#02x, ...]\n",
211 curmsg, 211 curmsg, msg->len, addr, (addr<<1) | 1);
212 else { 212 else {
213 printk(KERN_IN 213 printk(KERN_INFO " [%02d] WR %d bytes to %#02x [%#02x%s",
214 curmsg, 214 curmsg, msg->len, addr, addr<<1,
215 msg->le 215 msg->len == 0 ? "" : ", ");
216 for(i=0; i < m 216 for(i=0; i < msg->len; i++)
217 printk 217 printk("%#04x%s", msg->buf[i], i == msg->len - 1 ? "" : ", ");
218 printk("]\n"); 218 printk("]\n");
219 } 219 }
220 } 220 }
221 } 221 }
222 222
223 curmsg = 0; 223 curmsg = 0;
224 ret = -EREMOTEIO; 224 ret = -EREMOTEIO;
225 while (curmsg < num) { 225 while (curmsg < num) {
226 state = pca_status(adap); 226 state = pca_status(adap);
227 227
228 DEB3("STATE is 0x%02x\n", stat 228 DEB3("STATE is 0x%02x\n", state);
229 msg = &msgs[curmsg]; 229 msg = &msgs[curmsg];
230 230
231 switch (state) { 231 switch (state) {
232 case 0xf8: /* On reset or stop 232 case 0xf8: /* On reset or stop the bus is idle */
233 pca_start(adap); 233 pca_start(adap);
234 break; 234 break;
235 235
236 case 0x08: /* A START conditio 236 case 0x08: /* A START condition has been transmitted */
237 case 0x10: /* A repeated start 237 case 0x10: /* A repeated start condition has been transmitted */
238 pca_address(adap, msg) 238 pca_address(adap, msg);
239 break; 239 break;
240 240
241 case 0x18: /* SLA+W has been t 241 case 0x18: /* SLA+W has been transmitted; ACK has been received */
242 case 0x28: /* Data byte in I2C 242 case 0x28: /* Data byte in I2CDAT has been transmitted; ACK has been received */
243 if (numbytes < msg->le 243 if (numbytes < msg->len) {
244 pca_tx_byte(ad 244 pca_tx_byte(adap, msg->buf[numbytes]);
245 numbytes++; 245 numbytes++;
246 break; 246 break;
247 } 247 }
248 curmsg++; numbytes = 0 248 curmsg++; numbytes = 0;
249 if (curmsg == num) 249 if (curmsg == num)
250 pca_stop(adap) 250 pca_stop(adap);
251 else 251 else
252 pca_repeated_s 252 pca_repeated_start(adap);
253 break; 253 break;
254 254
255 case 0x20: /* SLA+W has been t 255 case 0x20: /* SLA+W has been transmitted; NOT ACK has been received */
256 DEB2("NOT ACK received 256 DEB2("NOT ACK received after SLA+W\n");
257 pca_stop(adap); 257 pca_stop(adap);
258 goto out; 258 goto out;
259 259
260 case 0x40: /* SLA+R has been t 260 case 0x40: /* SLA+R has been transmitted; ACK has been received */
261 pca_rx_ack(adap, msg-> 261 pca_rx_ack(adap, msg->len > 1);
262 break; 262 break;
263 263
264 case 0x50: /* Data bytes has b 264 case 0x50: /* Data bytes has been received; ACK has been returned */
265 if (numbytes < msg->le 265 if (numbytes < msg->len) {
266 pca_rx_byte(ad 266 pca_rx_byte(adap, &msg->buf[numbytes], 1);
267 numbytes++; 267 numbytes++;
268 pca_rx_ack(ada 268 pca_rx_ack(adap, numbytes < msg->len - 1);
269 break; 269 break;
270 } 270 }
271 curmsg++; numbytes = 0 271 curmsg++; numbytes = 0;
272 if (curmsg == num) 272 if (curmsg == num)
273 pca_stop(adap) 273 pca_stop(adap);
274 else 274 else
275 pca_repeated_s 275 pca_repeated_start(adap);
276 break; 276 break;
277 277
278 case 0x48: /* SLA+R has been t 278 case 0x48: /* SLA+R has been transmitted; NOT ACK has been received */
279 DEB2("NOT ACK received 279 DEB2("NOT ACK received after SLA+R\n");
280 pca_stop(adap); 280 pca_stop(adap);
281 goto out; 281 goto out;
282 282
283 case 0x30: /* Data byte in I2C 283 case 0x30: /* Data byte in I2CDAT has been transmitted; NOT ACK has been received */
284 DEB2("NOT ACK received 284 DEB2("NOT ACK received after data byte\n");
285 goto out; 285 goto out;
286 286
287 case 0x38: /* Arbitration lost 287 case 0x38: /* Arbitration lost during SLA+W, SLA+R or data bytes */
288 DEB2("Arbitration lost 288 DEB2("Arbitration lost\n");
289 goto out; 289 goto out;
290 290
291 case 0x58: /* Data byte has be 291 case 0x58: /* Data byte has been received; NOT ACK has been returned */
292 if ( numbytes == msg-> 292 if ( numbytes == msg->len - 1 ) {
293 pca_rx_byte(ad 293 pca_rx_byte(adap, &msg->buf[numbytes], 0);
294 curmsg++; numb 294 curmsg++; numbytes = 0;
295 if (curmsg == 295 if (curmsg == num)
296 pca_st 296 pca_stop(adap);
297 else 297 else
298 pca_re 298 pca_repeated_start(adap);
299 } else { 299 } else {
300 DEB2("NOT ACK 300 DEB2("NOT ACK sent after data byte received. "
301 "Not fina 301 "Not final byte. numbytes %d. len %d\n",
302 numbytes, 302 numbytes, msg->len);
303 pca_stop(adap) 303 pca_stop(adap);
304 goto out; 304 goto out;
305 } 305 }
306 break; 306 break;
307 case 0x70: /* Bus error - SDA 307 case 0x70: /* Bus error - SDA stuck low */
308 DEB2("BUS ERROR - SDA 308 DEB2("BUS ERROR - SDA Stuck low\n");
309 pca_reset(adap); 309 pca_reset(adap);
310 goto out; 310 goto out;
311 case 0x90: /* Bus error - SCL 311 case 0x90: /* Bus error - SCL stuck low */
312 DEB2("BUS ERROR - SCL 312 DEB2("BUS ERROR - SCL Stuck low\n");
313 pca_reset(adap); 313 pca_reset(adap);
314 goto out; 314 goto out;
315 case 0x00: /* Bus error during 315 case 0x00: /* Bus error during master or slave mode due to illegal START or STOP condition */
316 DEB2("BUS ERROR - Ille 316 DEB2("BUS ERROR - Illegal START or STOP\n");
317 pca_reset(adap); 317 pca_reset(adap);
318 goto out; 318 goto out;
319 default: 319 default:
320 printk(KERN_ERR DRIVER 320 printk(KERN_ERR DRIVER ": unhandled SIO state 0x%02x\n", state);
321 break; 321 break;
322 } 322 }
323 323
324 } 324 }
325 325
326 ret = curmsg; 326 ret = curmsg;
327 out: 327 out:
328 DEB1(KERN_CRIT "}}} transfered %d/%d m 328 DEB1(KERN_CRIT "}}} transfered %d/%d messages. "
329 "status is %#04x. control is %#04 329 "status is %#04x. control is %#04x\n",
330 curmsg, num, pca_status(adap), 330 curmsg, num, pca_status(adap),
331 pca_get_con(adap)); 331 pca_get_con(adap));
332 return ret; 332 return ret;
333 } 333 }
334 334
335 static u32 pca_func(struct i2c_adapter *adap) 335 static u32 pca_func(struct i2c_adapter *adap)
336 { 336 {
337 return I2C_FUNC_I2C | I2C_FUNC_SMBUS_E 337 return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
338 } 338 }
339 339
340 static int pca_init(struct i2c_algo_pca_data * 340 static int pca_init(struct i2c_algo_pca_data *adap)
341 { 341 {
342 static int freqs[] = {330,288,217,146, 342 static int freqs[] = {330,288,217,146,88,59,44,36};
343 int own, clock; 343 int own, clock;
344 344
345 own = pca_own(adap); 345 own = pca_own(adap);
346 clock = pca_clock(adap); 346 clock = pca_clock(adap);
347 DEB1(KERN_INFO DRIVER ": own address i 347 DEB1(KERN_INFO DRIVER ": own address is %#04x\n", own);
348 DEB1(KERN_INFO DRIVER ": clock freqeun 348 DEB1(KERN_INFO DRIVER ": clock freqeuncy is %dkHz\n", freqs[clock]);
349 349
350 pca_outw(adap, I2C_PCA_ADR, own << 1); 350 pca_outw(adap, I2C_PCA_ADR, own << 1);
351 351
352 pca_set_con(adap, I2C_PCA_CON_ENSIO | 352 pca_set_con(adap, I2C_PCA_CON_ENSIO | clock);
353 udelay(500); /* 500 µs for oscilator 353 udelay(500); /* 500 µs for oscilator to stabilise */
354 354
355 return 0; 355 return 0;
356 } 356 }
357 357
358 static const struct i2c_algorithm pca_algo = { 358 static const struct i2c_algorithm pca_algo = {
359 .master_xfer = pca_xfer, 359 .master_xfer = pca_xfer,
360 .functionality = pca_func, 360 .functionality = pca_func,
361 }; 361 };
362 362
363 /* 363 /*
364 * registering functions to load algorithms at 364 * registering functions to load algorithms at runtime
365 */ 365 */
366 int i2c_pca_add_bus(struct i2c_adapter *adap) 366 int i2c_pca_add_bus(struct i2c_adapter *adap)
367 { 367 {
368 struct i2c_algo_pca_data *pca_adap = a 368 struct i2c_algo_pca_data *pca_adap = adap->algo_data;
369 int rval; 369 int rval;
370 370
371 /* register new adapter to i2c module. 371 /* register new adapter to i2c module... */
372 adap->algo = &pca_algo; 372 adap->algo = &pca_algo;
373 373
374 adap->timeout = 100; /* def 374 adap->timeout = 100; /* default values, should */
375 adap->retries = 3; /* be 375 adap->retries = 3; /* be replaced by defines */
376 376
377 if ((rval = pca_init(pca_adap))) 377 if ((rval = pca_init(pca_adap)))
378 return rval; 378 return rval;
379 379
380 rval = i2c_add_adapter(adap); 380 rval = i2c_add_adapter(adap);
381 381
382 return rval; 382 return rval;
383 } 383 }
384 EXPORT_SYMBOL(i2c_pca_add_bus); 384 EXPORT_SYMBOL(i2c_pca_add_bus);
385 385
386 MODULE_AUTHOR("Ian Campbell <icampbell@arcom.c 386 MODULE_AUTHOR("Ian Campbell <icampbell@arcom.com>");
387 MODULE_DESCRIPTION("I2C-Bus PCA9564 algorithm" 387 MODULE_DESCRIPTION("I2C-Bus PCA9564 algorithm");
388 MODULE_LICENSE("GPL"); 388 MODULE_LICENSE("GPL");
389 389
390 module_param(i2c_debug, int, 0); 390 module_param(i2c_debug, int, 0);
391 391
|
This page was automatically generated by the
LXR engine.
|