linux/drivers/input/serio/i8042-acpipnpio.h

/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef _I8042_ACPIPNPIO_H
#define _I8042_ACPIPNPIO_H

#include <linux/acpi.h>

#ifdef CONFIG_X86
#include <asm/x86_init.h>
#endif

/*
 * Names.
 */

#define I8042_KBD_PHYS_DESC
#define I8042_AUX_PHYS_DESC
#define I8042_MUX_PHYS_DESC

/*
 * IRQs.
 */

#if defined(__ia64__)
#define I8042_MAP_IRQ
#else
#define I8042_MAP_IRQ(x)
#endif

#define I8042_KBD_IRQ
#define I8042_AUX_IRQ

static int i8042_kbd_irq;
static int i8042_aux_irq;

/*
 * Register numbers.
 */

#define I8042_COMMAND_REG
#define I8042_STATUS_REG
#define I8042_DATA_REG

static int i8042_command_reg =;
static int i8042_data_reg =;


static inline int i8042_read_data(void)
{}

static inline int i8042_read_status(void)
{}

static inline void i8042_write_data(int val)
{}

static inline void i8042_write_command(int val)
{}

#ifdef CONFIG_X86

#include <linux/dmi.h>

#define SERIO_QUIRK_NOKBD
#define SERIO_QUIRK_NOAUX
#define SERIO_QUIRK_NOMUX
#define SERIO_QUIRK_FORCEMUX
#define SERIO_QUIRK_UNLOCK
#define SERIO_QUIRK_PROBE_DEFER
#define SERIO_QUIRK_RESET_ALWAYS
#define SERIO_QUIRK_RESET_NEVER
#define SERIO_QUIRK_DIRECT
#define SERIO_QUIRK_DUMBKBD
#define SERIO_QUIRK_NOLOOP
#define SERIO_QUIRK_NOTIMEOUT
#define SERIO_QUIRK_KBDRESET
#define SERIO_QUIRK_DRITEK
#define SERIO_QUIRK_NOPNP
#define SERIO_QUIRK_FORCENORESTORE

/* Quirk table for different mainboards. Options similar or identical to i8042
 * module parameters.
 * ORDERING IS IMPORTANT! The first match will be apllied and the rest ignored.
 * This allows entries to overwrite vendor wide quirks on a per device basis.
 * Where this is irrelevant, entries are sorted case sensitive by DMI_SYS_VENDOR
 * and/or DMI_BOARD_VENDOR to make it easier to avoid dublicate entries.
 */
static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst =;

#ifdef CONFIG_PNP
static const struct dmi_system_id i8042_dmi_laptop_table[] __initconst =;
#endif

#endif /* CONFIG_X86 */

#ifdef CONFIG_PNP
#include <linux/pnp.h>

static bool i8042_pnp_kbd_registered;
static unsigned int i8042_pnp_kbd_devices;
static bool i8042_pnp_aux_registered;
static unsigned int i8042_pnp_aux_devices;

static int i8042_pnp_command_reg;
static int i8042_pnp_data_reg;
static int i8042_pnp_kbd_irq;
static int i8042_pnp_aux_irq;

static char i8042_pnp_kbd_name[32];
static char i8042_pnp_aux_name[32];

static void i8042_pnp_id_to_string(struct pnp_id *id, char *dst, int dst_size)
{}

static int i8042_pnp_kbd_probe(struct pnp_dev *dev, const struct pnp_device_id *did)
{}

static int i8042_pnp_aux_probe(struct pnp_dev *dev, const struct pnp_device_id *did)
{}

static const struct pnp_device_id pnp_kbd_devids[] =;
MODULE_DEVICE_TABLE(pnp, pnp_kbd_devids);

static struct pnp_driver i8042_pnp_kbd_driver =;

static const struct pnp_device_id pnp_aux_devids[] =;
MODULE_DEVICE_TABLE(pnp, pnp_aux_devids);

static struct pnp_driver i8042_pnp_aux_driver =;

static void i8042_pnp_exit(void)
{}

static int __init i8042_pnp_init(void)
{}

#else  /* !CONFIG_PNP */
static inline int i8042_pnp_init(void) { return 0; }
static inline void i8042_pnp_exit(void) { }
#endif /* CONFIG_PNP */


#ifdef CONFIG_X86
static void __init i8042_check_quirks(void)
{}
#else
static inline void i8042_check_quirks(void) {}
#endif

static int __init i8042_platform_init(void)
{}

static inline void i8042_platform_exit(void)
{}

#endif /* _I8042_ACPIPNPIO_H */