@ -2,7 +2,7 @@
* i2c - parport . h I2C bus over parallel port *
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
Copyright ( C ) 2003 - 2010 Jean Delvare < khali @ linux - fr . org >
This program is free software ; you can redistribute it and / or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
@ -18,13 +18,9 @@
Foundation , Inc . , 675 Mass Ave , Cambridge , MA 0213 9 , USA .
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
# ifdef DATA
# undef DATA
# endif
# define DATA 0
# define STAT 1
# define CTRL 2
# define PORT_DATA 0
# define PORT_STAT 1
# define PORT_CTRL 2
struct lineop {
u8 val ;
@ -41,61 +37,61 @@ struct adapter_parm {
unsigned int smbus_alert : 1 ;
} ;
static struct adapter_parm adapter_parm [ ] = {
static const struct adapter_parm adapter_parm [ ] = {
/* type 0: Philips adapter */
{
. setsda = { 0x80 , DATA , 1 } ,
. setscl = { 0x08 , CTRL , 0 } ,
. getsda = { 0x80 , STAT , 0 } ,
. getscl = { 0x08 , STAT , 0 } ,
. setsda = { 0x80 , PORT_ DATA, 1 } ,
. setscl = { 0x08 , PORT_ CTRL, 0 } ,
. getsda = { 0x80 , PORT_ STAT, 0 } ,
. getscl = { 0x08 , PORT_ STAT, 0 } ,
} ,
/* type 1: home brew teletext adapter */
{
. setsda = { 0x02 , DATA , 0 } ,
. setscl = { 0x01 , DATA , 0 } ,
. getsda = { 0x80 , STAT , 1 } ,
. setsda = { 0x02 , PORT_ DATA, 0 } ,
. setscl = { 0x01 , PORT_ DATA, 0 } ,
. getsda = { 0x80 , PORT_ STAT, 1 } ,
} ,
/* type 2: Velleman K8000 adapter */
{
. setsda = { 0x02 , CTRL , 1 } ,
. setscl = { 0x08 , CTRL , 1 } ,
. getsda = { 0x10 , STAT , 0 } ,
. setsda = { 0x02 , PORT_ CTRL, 1 } ,
. setscl = { 0x08 , PORT_ CTRL, 1 } ,
. getsda = { 0x10 , PORT_ STAT, 0 } ,
} ,
/* type 3: ELV adapter */
{
. setsda = { 0x02 , DATA , 1 } ,
. setscl = { 0x01 , DATA , 1 } ,
. getsda = { 0x40 , STAT , 1 } ,
. getscl = { 0x08 , STAT , 1 } ,
. setsda = { 0x02 , PORT_ DATA, 1 } ,
. setscl = { 0x01 , PORT_ DATA, 1 } ,
. getsda = { 0x40 , PORT_ STAT, 1 } ,
. getscl = { 0x08 , PORT_ STAT, 1 } ,
} ,
/* type 4: ADM1032 evaluation board */
{
. setsda = { 0x02 , DATA , 1 } ,
. setscl = { 0x01 , DATA , 1 } ,
. getsda = { 0x10 , STAT , 1 } ,
. init = { 0xf0 , DATA , 0 } ,
. setsda = { 0x02 , PORT_ DATA, 1 } ,
. setscl = { 0x01 , PORT_ DATA, 1 } ,
. getsda = { 0x10 , PORT_ STAT, 1 } ,
. init = { 0xf0 , PORT_ DATA, 0 } ,
. smbus_alert = 1 ,
} ,
/* type 5: ADM1025, ADM1030 and ADM1031 evaluation boards */
{
. setsda = { 0x02 , DATA , 1 } ,
. setscl = { 0x01 , DATA , 1 } ,
. getsda = { 0x10 , STAT , 1 } ,
. setsda = { 0x02 , PORT_ DATA, 1 } ,
. setscl = { 0x01 , PORT_ DATA, 1 } ,
. getsda = { 0x10 , PORT_ STAT, 1 } ,
} ,
/* type 6: Barco LPT->DVI (K5800236) adapter */
{
. setsda = { 0x02 , DATA , 1 } ,
. setscl = { 0x01 , DATA , 1 } ,
. getsda = { 0x20 , STAT , 0 } ,
. getscl = { 0x40 , STAT , 0 } ,
. init = { 0xfc , DATA , 0 } ,
. setsda = { 0x02 , PORT_ DATA, 1 } ,
. setscl = { 0x01 , PORT_ DATA, 1 } ,
. getsda = { 0x20 , PORT_ STAT, 0 } ,
. getscl = { 0x40 , PORT_ STAT, 0 } ,
. init = { 0xfc , PORT_ DATA, 0 } ,
} ,
/* type 7: One For All JP1 parallel port adapter */
{
. setsda = { 0x01 , DATA , 0 } ,
. setscl = { 0x02 , DATA , 0 } ,
. getsda = { 0x80 , STAT , 1 } ,
. init = { 0x04 , DATA , 1 } ,
. setsda = { 0x01 , PORT_ DATA, 0 } ,
. setscl = { 0x02 , PORT_ DATA, 0 } ,
. getsda = { 0x80 , PORT_ STAT, 1 } ,
. init = { 0x04 , PORT_ DATA, 1 } ,
} ,
} ;