16 #include <linux/module.h>
18 #include <linux/parport.h>
23 #include <asm/setup.h>
31 #define DPRINTK printk
33 #define DPRINTK(x...) do { } while (0)
37 static void amiga_write_data(
struct parport *
p,
unsigned char data)
45 static unsigned char amiga_read_data(
struct parport *
p)
51 static unsigned char control_amiga_to_pc(
unsigned char control)
59 static void amiga_write_control(
struct parport *
p,
unsigned char control)
65 static unsigned char amiga_read_control(
struct parport *
p)
68 return control_amiga_to_pc(0);
71 static unsigned char amiga_frob_control(
struct parport *
p,
unsigned char mask,
unsigned char val)
76 old = amiga_read_control(p);
77 amiga_write_control(p, (old & ~mask) ^ val);
81 static unsigned char status_amiga_to_pc(
unsigned char status)
96 static unsigned char amiga_read_status(
struct parport *p)
100 status = status_amiga_to_pc(
ciab.pra & 7);
105 static void amiga_enable_irq(
struct parport *p)
110 static void amiga_disable_irq(
struct parport *p)
115 static void amiga_data_forward(
struct parport *p)
122 static void amiga_data_reverse(
struct parport *p)
158 .write_data = amiga_write_data,
159 .read_data = amiga_read_data,
161 .write_control = amiga_write_control,
162 .read_control = amiga_read_control,
163 .frob_control = amiga_frob_control,
165 .read_status = amiga_read_status,
167 .enable_irq = amiga_enable_irq,
168 .disable_irq = amiga_disable_irq,
170 .data_forward = amiga_data_forward,
171 .data_reverse = amiga_data_reverse,
173 .init_state = amiga_init_state,
174 .save_state = amiga_save_state,
175 .restore_state = amiga_restore_state,
218 platform_set_drvdata(pdev, p);
235 platform_set_drvdata(pdev,
NULL);
240 .remove =
__exit_p(amiga_parallel_remove),
242 .name =
"amiga-parallel",
247 static int __init amiga_parallel_init(
void)
250 amiga_parallel_probe);
255 static void __exit amiga_parallel_exit(
void)