2007-10-22 12:56:52 +08:00
|
|
|
#ifndef _LINUX_I8042_H
|
|
|
|
#define _LINUX_I8042_H
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License version 2 as published by
|
|
|
|
* the Free Software Foundation.
|
|
|
|
*/
|
|
|
|
|
2009-09-16 16:06:43 +08:00
|
|
|
#include <linux/types.h>
|
2007-10-22 12:56:52 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Standard commands.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define I8042_CMD_CTL_RCTR 0x0120
|
|
|
|
#define I8042_CMD_CTL_WCTR 0x1060
|
|
|
|
#define I8042_CMD_CTL_TEST 0x01aa
|
|
|
|
|
|
|
|
#define I8042_CMD_KBD_DISABLE 0x00ad
|
|
|
|
#define I8042_CMD_KBD_ENABLE 0x00ae
|
|
|
|
#define I8042_CMD_KBD_TEST 0x01ab
|
|
|
|
#define I8042_CMD_KBD_LOOP 0x11d2
|
|
|
|
|
|
|
|
#define I8042_CMD_AUX_DISABLE 0x00a7
|
|
|
|
#define I8042_CMD_AUX_ENABLE 0x00a8
|
|
|
|
#define I8042_CMD_AUX_TEST 0x01a9
|
|
|
|
#define I8042_CMD_AUX_SEND 0x10d4
|
|
|
|
#define I8042_CMD_AUX_LOOP 0x11d3
|
|
|
|
|
|
|
|
#define I8042_CMD_MUX_PFX 0x0090
|
|
|
|
#define I8042_CMD_MUX_SEND 0x1090
|
|
|
|
|
2009-09-16 16:06:43 +08:00
|
|
|
struct serio;
|
|
|
|
|
|
|
|
#if defined(CONFIG_SERIO_I8042) || defined(CONFIG_SERIO_I8042_MODULE)
|
|
|
|
|
|
|
|
void i8042_lock_chip(void);
|
|
|
|
void i8042_unlock_chip(void);
|
2007-10-22 12:56:52 +08:00
|
|
|
int i8042_command(unsigned char *param, int command);
|
2009-09-16 16:06:43 +08:00
|
|
|
bool i8042_check_port_owner(const struct serio *);
|
2009-12-12 14:00:57 +08:00
|
|
|
int i8042_install_filter(bool (*filter)(unsigned char data, unsigned char str,
|
|
|
|
struct serio *serio));
|
|
|
|
int i8042_remove_filter(bool (*filter)(unsigned char data, unsigned char str,
|
|
|
|
struct serio *serio));
|
2009-09-16 16:06:43 +08:00
|
|
|
|
|
|
|
#else
|
|
|
|
|
2010-06-30 15:53:53 +08:00
|
|
|
static inline void i8042_lock_chip(void)
|
2009-09-16 16:06:43 +08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2010-06-30 15:53:53 +08:00
|
|
|
static inline void i8042_unlock_chip(void)
|
2009-09-16 16:06:43 +08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2010-06-30 15:53:53 +08:00
|
|
|
static inline int i8042_command(unsigned char *param, int command)
|
2009-09-16 16:06:43 +08:00
|
|
|
{
|
2009-12-12 14:00:57 +08:00
|
|
|
return -ENODEV;
|
2009-09-16 16:06:43 +08:00
|
|
|
}
|
|
|
|
|
2010-06-30 15:53:53 +08:00
|
|
|
static inline bool i8042_check_port_owner(const struct serio *serio)
|
2009-09-16 16:06:43 +08:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2010-06-30 15:53:53 +08:00
|
|
|
static inline int i8042_install_filter(bool (*filter)(unsigned char data, unsigned char str,
|
2009-12-12 14:00:57 +08:00
|
|
|
struct serio *serio))
|
|
|
|
{
|
|
|
|
return -ENODEV;
|
|
|
|
}
|
|
|
|
|
2010-06-30 15:53:53 +08:00
|
|
|
static inline int i8042_remove_filter(bool (*filter)(unsigned char data, unsigned char str,
|
2009-12-12 14:00:57 +08:00
|
|
|
struct serio *serio))
|
|
|
|
{
|
|
|
|
return -ENODEV;
|
|
|
|
}
|
|
|
|
|
2009-09-16 16:06:43 +08:00
|
|
|
#endif
|
2007-10-22 12:56:52 +08:00
|
|
|
|
|
|
|
#endif
|