X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=include%2Flinux%2Fparport.h;h=e1f83c5065c5e2ad4e4a92f4fa9908939c6f7e0c;hb=d8312204768861d77ec868265b2c1a36a1bf078f;hp=d42737eeee067783195346a34ae3b973cb828fa6;hpb=62c4f0a2d5a188f73a94f2cb8ea0dba3e7cf0a7f;p=safe%2Fjmp%2Flinux-2.6 diff --git a/include/linux/parport.h b/include/linux/parport.h index d42737e..e1f83c5 100644 --- a/include/linux/parport.h +++ b/include/linux/parport.h @@ -1,5 +1,3 @@ -/* $Id: parport.h,v 1.1 1998/05/17 10:57:52 andrea Exp andrea $ */ - /* * Any part of this program may be used in documents licensed under * the GNU Free Documentation License, Version 1.1 or any later version @@ -100,9 +98,10 @@ typedef enum { #include #include #include +#include +#include #include #include -#include /* Define this later. */ struct parport; @@ -127,6 +126,10 @@ struct amiga_parport_state { unsigned char statusdir;/* ciab.ddrb & 7 */ }; +struct ax88796_parport_state { + unsigned char cpr; +}; + struct ip32_parport_state { unsigned int dcr; unsigned int ecr; @@ -138,6 +141,7 @@ struct parport_state { /* ARC has no state. */ struct ax_parport_state ax; struct amiga_parport_state amiga; + struct ax88796_parport_state ax88796; /* Atari has not state. */ struct ip32_parport_state ip32; void *misc; @@ -224,7 +228,7 @@ struct pardevice { int (*preempt)(void *); void (*wakeup)(void *); void *private; - void (*irq_func)(int, void *, struct pt_regs *); + void (*irq_func)(void *); unsigned int flags; struct pardevice *next; struct pardevice *prev; @@ -274,6 +278,10 @@ struct parport { int dma; int muxport; /* which muxport (if any) this is */ int portnum; /* which physical parallel port (not mux) */ + struct device *dev; /* Physical device associated with IO/DMA. + * This may unfortulately be null if the + * port has a legacy driver. + */ struct parport *physport; /* If this is a non-default mux @@ -284,7 +292,7 @@ struct parport { following structure members are meaningless: devices, cad, muxsel, waithead, waittail, flags, pdir, - ieee1284, *_lock. + dev, ieee1284, *_lock. It this is a default mux parport, or there is no mux involved, this points to @@ -297,7 +305,7 @@ struct parport { struct pardevice *waithead; struct pardevice *waittail; - + struct list_head list; unsigned int flags; @@ -357,6 +365,9 @@ extern void parport_unregister_driver (struct parport_driver *); extern struct parport *parport_find_number (int); extern struct parport *parport_find_base (unsigned long); +/* generic irq handler, if it suits your needs */ +extern irqreturn_t parport_irq_handler(int irq, void *dev_id); + /* Reference counting for ports. */ extern struct parport *parport_get_port (struct parport *); extern void parport_put_port (struct parport *); @@ -370,7 +381,7 @@ extern void parport_put_port (struct parport *); struct pardevice *parport_register_device(struct parport *port, const char *name, int (*pf)(void *), void (*kf)(void *), - void (*irq_func)(int, void *, struct pt_regs *), + void (*irq_func)(void *), int flags, void *handle); /* parport_unregister unlinks a device from the chain. */ @@ -452,7 +463,7 @@ static __inline__ int parport_yield_blocking(struct pardevice *dev) #define PARPORT_FLAG_EXCL (1<<1) /* EXCL driver registered. */ /* IEEE1284 functions */ -extern void parport_ieee1284_interrupt (int, void *, struct pt_regs *); +extern void parport_ieee1284_interrupt (void *); extern int parport_negotiate (struct parport *, int mode); extern ssize_t parport_write (struct parport *, const void *buf, size_t len); extern ssize_t parport_read (struct parport *, void *buf, size_t len); @@ -494,26 +505,19 @@ extern size_t parport_ieee1284_epp_read_addr (struct parport *, /* IEEE1284.3 functions */ extern int parport_daisy_init (struct parport *port); extern void parport_daisy_fini (struct parport *port); -extern struct pardevice *parport_open (int devnum, const char *name, - int (*pf) (void *), - void (*kf) (void *), - void (*irqf) (int, void *, - struct pt_regs *), - int flags, void *handle); +extern struct pardevice *parport_open (int devnum, const char *name); extern void parport_close (struct pardevice *dev); extern ssize_t parport_device_id (int devnum, char *buffer, size_t len); -extern int parport_device_num (int parport, int mux, int daisy); extern void parport_daisy_deselect_all (struct parport *port); extern int parport_daisy_select (struct parport *port, int daisy, int mode); /* Lowlevel drivers _can_ call this support function to handle irqs. */ -static __inline__ void parport_generic_irq(int irq, struct parport *port, - struct pt_regs *regs) +static inline void parport_generic_irq(struct parport *port) { - parport_ieee1284_interrupt (irq, port, regs); + parport_ieee1284_interrupt (port); read_lock(&port->cad_lock); if (port->cad && port->cad->irq_func) - port->cad->irq_func(irq, port->cad->private, regs); + port->cad->irq_func(port->cad->private); read_unlock(&port->cad_lock); } @@ -554,5 +558,8 @@ extern int parport_device_proc_unregister(struct pardevice *device); #endif /* !CONFIG_PARPORT_NOT_PC */ +extern unsigned long parport_default_timeslice; +extern int parport_default_spintime; + #endif /* __KERNEL__ */ #endif /* _PARPORT_H_ */