1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /* ------------------------------------------------------------------------ *
3 * i2c-parport.h I2C bus over parallel port *
4 * ------------------------------------------------------------------------ *
5 Copyright (C) 2003-2010 Jean Delvare <jdelvare@suse.de>
7 * ------------------------------------------------------------------------ */
25 unsigned int smbus_alert
:1;
28 static const struct adapter_parm adapter_parm
[] = {
29 /* type 0: Philips adapter */
31 .setsda
= { 0x80, PORT_DATA
, 1 },
32 .setscl
= { 0x08, PORT_CTRL
, 0 },
33 .getsda
= { 0x80, PORT_STAT
, 0 },
34 .getscl
= { 0x08, PORT_STAT
, 0 },
36 /* type 1: home brew teletext adapter */
38 .setsda
= { 0x02, PORT_DATA
, 0 },
39 .setscl
= { 0x01, PORT_DATA
, 0 },
40 .getsda
= { 0x80, PORT_STAT
, 1 },
42 /* type 2: Velleman K8000 adapter */
44 .setsda
= { 0x02, PORT_CTRL
, 1 },
45 .setscl
= { 0x08, PORT_CTRL
, 1 },
46 .getsda
= { 0x10, PORT_STAT
, 0 },
48 /* type 3: ELV adapter */
50 .setsda
= { 0x02, PORT_DATA
, 1 },
51 .setscl
= { 0x01, PORT_DATA
, 1 },
52 .getsda
= { 0x40, PORT_STAT
, 1 },
53 .getscl
= { 0x08, PORT_STAT
, 1 },
55 /* type 4: ADM1032 evaluation board */
57 .setsda
= { 0x02, PORT_DATA
, 1 },
58 .setscl
= { 0x01, PORT_DATA
, 1 },
59 .getsda
= { 0x10, PORT_STAT
, 1 },
60 .init
= { 0xf0, PORT_DATA
, 0 },
63 /* type 5: ADM1025, ADM1030 and ADM1031 evaluation boards */
65 .setsda
= { 0x02, PORT_DATA
, 1 },
66 .setscl
= { 0x01, PORT_DATA
, 1 },
67 .getsda
= { 0x10, PORT_STAT
, 1 },
69 /* type 6: Barco LPT->DVI (K5800236) adapter */
71 .setsda
= { 0x02, PORT_DATA
, 1 },
72 .setscl
= { 0x01, PORT_DATA
, 1 },
73 .getsda
= { 0x20, PORT_STAT
, 0 },
74 .getscl
= { 0x40, PORT_STAT
, 0 },
75 .init
= { 0xfc, PORT_DATA
, 0 },
77 /* type 7: One For All JP1 parallel port adapter */
79 .setsda
= { 0x01, PORT_DATA
, 0 },
80 .setscl
= { 0x02, PORT_DATA
, 0 },
81 .getsda
= { 0x80, PORT_STAT
, 1 },
82 .init
= { 0x04, PORT_DATA
, 1 },
86 .setsda
= { 0x04, PORT_DATA
, 1 },
87 .setscl
= { 0x01, PORT_DATA
, 1 },
88 .getsda
= { 0x40, PORT_STAT
, 0 },
89 .getscl
= { 0x80, PORT_STAT
, 1 },
94 module_param(type
, int, 0);
95 MODULE_PARM_DESC(type
,
97 " 0 = Philips adapter\n"
98 " 1 = home brew teletext adapter\n"
99 " 2 = Velleman K8000 adapter\n"
101 " 4 = ADM1032 evaluation board\n"
102 " 5 = ADM1025, ADM1030 and ADM1031 evaluation boards\n"
103 " 6 = Barco LPT->DVI (K5800236) adapter\n"
104 " 7 = One For All JP1 parallel port adapter\n"