Lines Matching +full:mux +full:- +full:int +full:- +full:port
25 unsigned int ctr;
26 unsigned int ecr;
30 unsigned int ctr;
31 unsigned int ecr;
32 unsigned int dcsr;
44 unsigned int dcr;
45 unsigned int ecr;
61 /* IBM PC-style virtual registers. */
86 size_t (*epp_write_data) (struct parport *port, const void *buf,
87 size_t len, int flags);
88 size_t (*epp_read_data) (struct parport *port, void *buf, size_t len,
89 int flags);
90 size_t (*epp_write_addr) (struct parport *port, const void *buf,
91 size_t len, int flags);
92 size_t (*epp_read_addr) (struct parport *port, void *buf, size_t len,
93 int flags);
95 size_t (*ecp_write_data) (struct parport *port, const void *buf,
96 size_t len, int flags);
97 size_t (*ecp_read_data) (struct parport *port, void *buf, size_t len,
98 int flags);
99 size_t (*ecp_write_addr) (struct parport *port, const void *buf,
100 size_t len, int flags);
102 size_t (*compat_write_data) (struct parport *port, const void *buf,
103 size_t len, int flags);
104 size_t (*nibble_read_data) (struct parport *port, void *buf,
105 size_t len, int flags);
106 size_t (*byte_read_data) (struct parport *port, void *buf,
107 size_t len, int flags);
122 * that the driver relinquish control of the port. The driver should
123 * return zero if it agrees to release the port, and nonzero if it
124 * refuses. Do not call parport_release() - the kernel will do this
127 * 2) a wake-up function, called by the resource manager to tell drivers
128 * that the port is available to be claimed. If a driver wants to use
129 * the port, it should call parport_claim() here.
132 /* A parallel port device */
135 struct parport *port; member
136 int daisy;
137 int (*preempt)(void *);
141 unsigned int flags;
148 unsigned long int time;
149 unsigned long int timeslice;
150 volatile long int timeout;
151 unsigned long waiting; /* long req'd for set_bit --RR */
178 int mode;
183 /* A parallel port */
186 unsigned long base_hi; /* base address (hi - ECR) */
187 unsigned int size; /* IO extent */
189 unsigned int modes;
190 int irq; /* interrupt (or -1 for none) */
191 int dma;
192 int muxport; /* which muxport (if any) this is */
193 int portnum; /* which physical parallel port (not mux) */
196 * port has a legacy driver.
200 /* If this is a non-default mux
202 physical port, this is a pointer to that
203 port. The locking is only done in the
204 real port. For a clone port, the
210 It this is a default mux parport, or
211 there is no mux involved, this points to
215 struct pardevice *cad; /* port owner */
216 int daisy; /* currently selected daisy addr */
217 int muxsel; /* currently selected mux port */
224 unsigned int flags;
227 struct parport_device_info probe_info[5]; /* 0-3 + non-IEEE1284.3 */
233 int number; /* port index - the `n' in `parportn' */
238 int spintime;
257 int (*probe)(struct pardevice *);
263 int parport_bus_init(void);
266 /* parport_register_port registers a new parallel port at the given
270 struct parport *parport_register_port(unsigned long base, int irq, int dma,
273 /* Once a registered port is ready for high-level drivers to use, the
274 low-level driver that registered it should announce it. This will
275 call the high-level drivers' attach() functions (after things like
276 determining the IEEE 1284.3 topology of the port and collecting
278 void parport_announce_port (struct parport *port);
280 /* Unregister a port. */
281 extern void parport_remove_port(struct parport *port);
283 /* Register a new high-level driver. */
285 int __must_check __parport_register_driver(struct parport_driver *,
294 * parport_register_driver - register a parallel port device driver
297 * This can be called by a parallel port device driver in order
305 * The driver's attach() function may block. The port that
309 * parport_register_device() on that port will do this for you.
311 * The driver's detach() function may block. The port that
323 /* Unregister a high-level driver. */
327 * module_parport_driver() - Helper macro for registering a modular parport driver
339 extern struct parport *parport_find_number (int);
343 extern irqreturn_t parport_irq_handler(int irq, void *dev_id);
351 int (*preempt)(void *);
355 unsigned int flags;
360 * port, and tells the kernel all it needs to know.
363 parport_register_dev_model(struct parport *port, const char *name,
364 const struct pardev_cb *par_dev_cb, int cnt);
369 /* parport_claim tries to gain ownership of the port for a particular
370 driver. This may fail (return non-zero) if another driver is busy.
373 extern int parport_claim(struct pardevice *dev);
375 /* parport_claim_or_block is the same, but sleeps if the port cannot
376 be claimed. Return value is 1 if it slept, 0 normally and -errno
378 extern int parport_claim_or_block(struct pardevice *dev);
382 if you didn't previously own the port. Once you have released the
383 port you should make sure that neither your code nor the hardware
384 on the port tries to initiate any communication without first
385 re-claiming the port. If you mess with the port state (enabling
386 ECP for example) you should clean up before releasing the port. */
391 * parport_yield - relinquish a parallel port temporarily
392 * @dev: a device on the parallel port
394 * This function relinquishes the port if it would be helpful to other
395 * drivers to do so. Afterwards it tries to reclaim the port using
397 * parport_claim(). If it fails, the port is left unclaimed and it is
398 * the driver's responsibility to reclaim the port.
402 * port and use their devices. Yielding the port is similar to
404 * action is taken if there are no other devices needing the port. In
410 static __inline__ int parport_yield(struct pardevice *dev) in parport_yield()
412 unsigned long int timeslip = (jiffies - dev->time); in parport_yield()
413 if ((dev->port->waithead == NULL) || (timeslip < dev->timeslice)) in parport_yield()
420 * parport_yield_blocking - relinquish a parallel port temporarily
421 * @dev: a device on the parallel port
423 * This function relinquishes the port if it would be helpful to other
424 * drivers to do so. Afterwards it tries to reclaim the port using
428 static __inline__ int parport_yield_blocking(struct pardevice *dev) in parport_yield_blocking()
430 unsigned long int timeslip = (jiffies - dev->time); in parport_yield_blocking()
431 if ((dev->port->waithead == NULL) || (timeslip < dev->timeslice)) in parport_yield_blocking()
446 extern int parport_negotiate (struct parport *, int mode);
453 extern int parport_wait_event (struct parport *, long timeout);
454 extern int parport_wait_peripheral (struct parport *port,
457 extern int parport_poll_peripheral (struct parport *port,
460 int usec);
464 const void *, size_t, int);
466 void *, size_t, int);
468 void *, size_t, int);
470 void *, size_t, int);
472 const void *, size_t, int);
474 const void *, size_t, int);
476 const void *, size_t, int);
478 void *, size_t, int);
480 const void *, size_t, int);
482 void *, size_t, int);
486 extern int parport_daisy_init (struct parport *port);
487 extern void parport_daisy_fini (struct parport *port);
488 extern struct pardevice *parport_open (int devnum, const char *name);
490 extern ssize_t parport_device_id (int devnum, char *buffer, size_t len);
491 extern void parport_daisy_deselect_all (struct parport *port);
492 extern int parport_daisy_select (struct parport *port, int daisy, int mode);
495 static inline void parport_generic_irq(struct parport *port) in parport_generic_irq() argument
497 parport_ieee1284_interrupt (port); in parport_generic_irq()
498 read_lock(&port->cad_lock); in parport_generic_irq()
499 if (port->cad && port->cad->irq_func) in parport_generic_irq()
500 port->cad->irq_func(port->cad->private); in parport_generic_irq()
501 read_unlock(&port->cad_lock); in parport_generic_irq()
505 extern int parport_proc_register(struct parport *pp);
506 extern int parport_proc_unregister(struct parport *pp);
507 extern int parport_device_proc_register(struct pardevice *device);
508 extern int parport_device_proc_unregister(struct pardevice *device);
528 #define parport_write_data(p,x) (p)->ops->write_data(p,x)
529 #define parport_read_data(p) (p)->ops->read_data(p)
530 #define parport_write_control(p,x) (p)->ops->write_control(p,x)
531 #define parport_read_control(p) (p)->ops->read_control(p)
532 #define parport_frob_control(p,m,v) (p)->ops->frob_control(p,m,v)
533 #define parport_read_status(p) (p)->ops->read_status(p)
534 #define parport_enable_irq(p) (p)->ops->enable_irq(p)
535 #define parport_disable_irq(p) (p)->ops->disable_irq(p)
536 #define parport_data_forward(p) (p)->ops->data_forward(p)
537 #define parport_data_reverse(p) (p)->ops->data_reverse(p)
542 extern int parport_default_spintime;