1 /* ------------------------------------------------------------------------ *
2 * i2c-parport.h I2C bus over parallel port *
3 * ------------------------------------------------------------------------ *
4 Copyright (C) 2003-2004 Jean Delvare <khali@linux-fr.org>
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 * ------------------------------------------------------------------------ */
43 static struct adapter_parm adapter_parm
[] = {
44 /* type 0: Philips adapter */
46 .setsda
= { 0x80, DATA
, 1 },
47 .setscl
= { 0x08, CTRL
, 0 },
48 .getsda
= { 0x80, STAT
, 0 },
49 .getscl
= { 0x08, STAT
, 0 },
51 /* type 1: home brew teletext adapter */
53 .setsda
= { 0x02, DATA
, 0 },
54 .setscl
= { 0x01, DATA
, 0 },
55 .getsda
= { 0x80, STAT
, 1 },
57 /* type 2: Velleman K8000 adapter */
59 .setsda
= { 0x02, CTRL
, 1 },
60 .setscl
= { 0x08, CTRL
, 1 },
61 .getsda
= { 0x10, STAT
, 0 },
63 /* type 3: ELV adapter */
65 .setsda
= { 0x02, DATA
, 1 },
66 .setscl
= { 0x01, DATA
, 1 },
67 .getsda
= { 0x40, STAT
, 1 },
68 .getscl
= { 0x08, STAT
, 1 },
70 /* type 4: ADM1032 evaluation board */
72 .setsda
= { 0x02, DATA
, 1 },
73 .setscl
= { 0x01, DATA
, 1 },
74 .getsda
= { 0x10, STAT
, 1 },
75 .init
= { 0xf0, DATA
, 0 },
77 /* type 5: ADM1025, ADM1030 and ADM1031 evaluation boards */
79 .setsda
= { 0x02, DATA
, 1 },
80 .setscl
= { 0x01, DATA
, 1 },
81 .getsda
= { 0x10, STAT
, 1 },
86 module_param(type
, int, 0);
87 MODULE_PARM_DESC(type
,
89 " 0 = Philips adapter\n"
90 " 1 = home brew teletext adapter\n"
91 " 2 = Velleman K8000 adapter\n"
93 " 4 = ADM1032 evaluation board\n"
94 " 5 = ADM1025, ADM1030 and ADM1031 evaluation boards\n");