12 #define KTTI_VERSION "1.0"
14 #include <linux/module.h>
17 #include <linux/kernel.h>
18 #include <linux/types.h>
19 #include <linux/wait.h>
24 #define j44(a,b) (((a>>4)&0x0f)|(b&0xf0))
30 static int cont_map[2] = { 0x10, 0x08 };
36 r = regr + cont_map[
cont];
42 static int ktti_read_regr(
PIA *pi,
int cont,
int regr )
46 r = regr + cont_map[
cont];
54 static void ktti_read_block(
PIA *pi,
char *
buf,
int count )
58 for (k=0;k<count/2;k++) {
63 buf[2*k+1] =
j44(a,b);
67 static void ktti_write_block(
PIA *pi,
char * buf,
int count )
71 for (k=0;k<count/2;k++) {
74 w0(buf[2*k+1]);
w2(6);
79 static void ktti_connect (
PIA *pi )
86 static void ktti_disconnect (
PIA *pi )
95 {
printk(
"%s: ktti %s, KT adapter at 0x%x, delay %d\n",
107 .write_regr = ktti_write_regr,
108 .read_regr = ktti_read_regr,
109 .write_block = ktti_write_block,
110 .read_block = ktti_read_block,
111 .connect = ktti_connect,
112 .disconnect = ktti_disconnect,
113 .log_adapter = ktti_log_adapter,
116 static int __init ktti_init(
void)
121 static void __exit ktti_exit(
void)