#define pr_fmt(fmt) …
#define psmouse_fmt(fmt) …
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/input.h>
#include <linux/serio.h>
#include <linux/init.h>
#include <linux/libps2.h>
#include <linux/mutex.h>
#include <linux/types.h>
#include "psmouse.h"
#include "synaptics.h"
#include "logips2pp.h"
#include "alps.h"
#include "hgpk.h"
#include "lifebook.h"
#include "trackpoint.h"
#include "touchkit_ps2.h"
#include "elantech.h"
#include "sentelic.h"
#include "cypress_ps2.h"
#include "focaltech.h"
#include "vmmouse.h"
#include "byd.h"
#define DRIVER_DESC …
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…);
MODULE_LICENSE(…) …;
static unsigned int psmouse_max_proto = …;
static int psmouse_set_maxproto(const char *val, const struct kernel_param *);
static int psmouse_get_maxproto(char *buffer, const struct kernel_param *kp);
static const struct kernel_param_ops param_ops_proto_abbrev = …;
#define param_check_proto_abbrev(name, p) …
module_param_named(proto, psmouse_max_proto, proto_abbrev, 0644);
MODULE_PARM_DESC(…) …;
static unsigned int psmouse_resolution = …;
module_param_named(resolution, psmouse_resolution, uint, 0644);
MODULE_PARM_DESC(…) …;
static unsigned int psmouse_rate = …;
module_param_named(rate, psmouse_rate, uint, 0644);
MODULE_PARM_DESC(…) …;
static bool psmouse_smartscroll = …;
module_param_named(smartscroll, psmouse_smartscroll, bool, 0644);
MODULE_PARM_DESC(…) …;
static bool psmouse_a4tech_2wheels;
module_param_named(a4tech_workaround, psmouse_a4tech_2wheels, bool, 0644);
MODULE_PARM_DESC(…) …;
static unsigned int psmouse_resetafter = …;
module_param_named(resetafter, psmouse_resetafter, uint, 0644);
MODULE_PARM_DESC(…) …;
static unsigned int psmouse_resync_time;
module_param_named(resync_time, psmouse_resync_time, uint, 0644);
MODULE_PARM_DESC(…) …;
PSMOUSE_DEFINE_ATTR(…);
PSMOUSE_DEFINE_ATTR(…);
PSMOUSE_DEFINE_ATTR(…);
PSMOUSE_DEFINE_ATTR(…);
PSMOUSE_DEFINE_ATTR(…);
static struct attribute *psmouse_dev_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static DEFINE_MUTEX(psmouse_mutex);
static struct workqueue_struct *kpsmoused_wq;
struct psmouse *psmouse_from_serio(struct serio *serio)
{ … }
void psmouse_report_standard_buttons(struct input_dev *dev, u8 buttons)
{ … }
void psmouse_report_standard_motion(struct input_dev *dev, u8 *packet)
{ … }
void psmouse_report_standard_packet(struct input_dev *dev, u8 *packet)
{ … }
psmouse_ret_t psmouse_process_byte(struct psmouse *psmouse)
{ … }
void psmouse_queue_work(struct psmouse *psmouse, struct delayed_work *work,
unsigned long delay)
{ … }
static inline void __psmouse_set_state(struct psmouse *psmouse, enum psmouse_state new_state)
{ … }
void psmouse_set_state(struct psmouse *psmouse, enum psmouse_state new_state)
{ … }
static int psmouse_handle_byte(struct psmouse *psmouse)
{ … }
static void psmouse_handle_oob_data(struct psmouse *psmouse, u8 data)
{ … }
static enum ps2_disposition psmouse_pre_receive_byte(struct ps2dev *ps2dev,
u8 data,
unsigned int flags)
{ … }
static void psmouse_receive_byte(struct ps2dev *ps2dev, u8 data)
{ … }
int psmouse_reset(struct psmouse *psmouse)
{ … }
void psmouse_set_resolution(struct psmouse *psmouse, unsigned int resolution)
{ … }
static void psmouse_set_rate(struct psmouse *psmouse, unsigned int rate)
{ … }
static void psmouse_set_scale(struct psmouse *psmouse, enum psmouse_scale scale)
{ … }
static int psmouse_poll(struct psmouse *psmouse)
{ … }
static bool psmouse_check_pnp_id(const char *id, const char * const ids[])
{ … }
bool psmouse_matches_pnp_id(struct psmouse *psmouse, const char * const ids[])
{ … }
static int genius_detect(struct psmouse *psmouse, bool set_properties)
{ … }
static int intellimouse_detect(struct psmouse *psmouse, bool set_properties)
{ … }
static int im_explorer_detect(struct psmouse *psmouse, bool set_properties)
{ … }
static int thinking_detect(struct psmouse *psmouse, bool set_properties)
{ … }
static int ps2bare_detect(struct psmouse *psmouse, bool set_properties)
{ … }
static int cortron_detect(struct psmouse *psmouse, bool set_properties)
{ … }
static const struct psmouse_protocol psmouse_protocols[] = …;
static const struct psmouse_protocol *__psmouse_protocol_by_type(enum psmouse_type type)
{ … }
static const struct psmouse_protocol *psmouse_protocol_by_type(enum psmouse_type type)
{ … }
static const struct psmouse_protocol *psmouse_protocol_by_name(const char *name, size_t len)
{ … }
static void psmouse_apply_defaults(struct psmouse *psmouse)
{ … }
static bool psmouse_do_detect(int (*detect)(struct psmouse *, bool),
struct psmouse *psmouse, bool allow_passthrough,
bool set_properties)
{ … }
static bool psmouse_try_protocol(struct psmouse *psmouse,
enum psmouse_type type,
unsigned int *max_proto,
bool set_properties, bool init_allowed)
{ … }
static int psmouse_extensions(struct psmouse *psmouse,
unsigned int max_proto, bool set_properties)
{ … }
static int psmouse_probe(struct psmouse *psmouse)
{ … }
static void psmouse_initialize(struct psmouse *psmouse)
{ … }
int psmouse_activate(struct psmouse *psmouse)
{ … }
int psmouse_deactivate(struct psmouse *psmouse)
{ … }
static void psmouse_resync(struct work_struct *work)
{ … }
static void psmouse_cleanup(struct serio *serio)
{ … }
static void psmouse_disconnect(struct serio *serio)
{ … }
static int psmouse_switch_protocol(struct psmouse *psmouse,
const struct psmouse_protocol *proto)
{ … }
static int psmouse_connect(struct serio *serio, struct serio_driver *drv)
{ … }
static int __psmouse_reconnect(struct serio *serio, bool fast_reconnect)
{ … }
static int psmouse_reconnect(struct serio *serio)
{ … }
static int psmouse_fast_reconnect(struct serio *serio)
{ … }
static struct serio_device_id psmouse_serio_ids[] = …;
MODULE_DEVICE_TABLE(serio, psmouse_serio_ids);
static struct serio_driver psmouse_drv = …;
ssize_t psmouse_attr_show_helper(struct device *dev, struct device_attribute *devattr,
char *buf)
{ … }
ssize_t psmouse_attr_set_helper(struct device *dev, struct device_attribute *devattr,
const char *buf, size_t count)
{ … }
static ssize_t psmouse_show_int_attr(struct psmouse *psmouse, void *offset, char *buf)
{ … }
static ssize_t psmouse_set_int_attr(struct psmouse *psmouse, void *offset, const char *buf, size_t count)
{ … }
static ssize_t psmouse_attr_show_protocol(struct psmouse *psmouse, void *data, char *buf)
{ … }
static ssize_t psmouse_attr_set_protocol(struct psmouse *psmouse, void *data, const char *buf, size_t count)
{ … }
static ssize_t psmouse_attr_set_rate(struct psmouse *psmouse, void *data, const char *buf, size_t count)
{ … }
static ssize_t psmouse_attr_set_resolution(struct psmouse *psmouse, void *data, const char *buf, size_t count)
{ … }
static int psmouse_set_maxproto(const char *val, const struct kernel_param *kp)
{ … }
static int psmouse_get_maxproto(char *buffer, const struct kernel_param *kp)
{ … }
static int __init psmouse_init(void)
{ … }
static void __exit psmouse_exit(void)
{ … }
module_init(…) …;
module_exit(psmouse_exit);