linux/include/linux/lp.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * usr/include/linux/lp.h c.1991-1992 James Wiegand
 * many modifications copyright (C) 1992 Michael K. Johnson
 * Interrupt support added 1993 Nigel Gamble
 * Removed 8255 status defines from inside __KERNEL__ Marcelo Tosatti 
 */
#ifndef _LINUX_LP_H
#define _LINUX_LP_H


#include <linux/wait.h>
#include <linux/mutex.h>
#include <uapi/linux/lp.h>

/* Magic numbers for defining port-device mappings */
#define LP_PARPORT_UNSPEC
#define LP_PARPORT_AUTO
#define LP_PARPORT_OFF
#define LP_PARPORT_NONE

#define LP_F(minor)
#define LP_CHAR(minor)
#define LP_TIME(minor)
#define LP_WAIT(minor)
#define LP_IRQ(minor)
					/* PARPORT_IRQ_NONE means polled */
#ifdef LP_STATS
#define LP_STAT
#endif
#define LP_BUFFER_SIZE

#define LP_BASE(x)

#ifdef LP_STATS
struct lp_stats {
	unsigned long chars;
	unsigned long sleeps;
	unsigned int maxrun;
	unsigned int maxwait;
	unsigned int meanwait;
	unsigned int mdev;
};
#endif

struct lp_struct {};

/*
 * The following constants describe the various signals of the printer port
 * hardware.  Note that the hardware inverts some signals and that some
 * signals are active low.  An example is LP_STROBE, which must be programmed
 * with 1 for being active and 0 for being inactive, because the strobe signal
 * gets inverted, but it is also active low.
 */


/* 
 * defines for 8255 control port
 * base + 2 
 * accessed with LP_C(minor)
 */
#define LP_PINTEN
#define LP_PSELECP
#define LP_PINITP
#define LP_PAUTOLF
#define LP_PSTROBE

/* 
 * the value written to ports to test existence. PC-style ports will 
 * return the value written. AT-style ports will return 0. so why not
 * make them the same ? 
 */
#define LP_DUMMY

/*
 * This is the port delay time, in microseconds.
 * It is used only in the lp_init() and lp_reset() routine.
 */
#define LP_DELAY

#endif