linux/drivers/input/mouse/logips2pp.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Logitech PS/2++ mouse driver
 *
 * Copyright (c) 1999-2003 Vojtech Pavlik <[email protected]>
 * Copyright (c) 2003 Eric Wong <[email protected]>
 */

#include <linux/bitops.h>
#include <linux/input.h>
#include <linux/serio.h>
#include <linux/libps2.h>
#include <linux/types.h>
#include "psmouse.h"
#include "logips2pp.h"

/* Logitech mouse types */
#define PS2PP_KIND_WHEEL
#define PS2PP_KIND_MX
#define PS2PP_KIND_TP3
#define PS2PP_KIND_TRACKMAN

/* Logitech mouse features */
#define PS2PP_WHEEL
#define PS2PP_HWHEEL
#define PS2PP_SIDE_BTN
#define PS2PP_EXTRA_BTN
#define PS2PP_TASK_BTN
#define PS2PP_NAV_BTN

struct ps2pp_info {};

/*
 * Process a PS2++ or PS2T++ packet.
 */

static psmouse_ret_t ps2pp_process_byte(struct psmouse *psmouse)
{}

/*
 * ps2pp_cmd() sends a PS2++ command, sliced into two bit
 * pieces through the SETRES command. This is needed to send extended
 * commands to mice on notebooks that try to understand the PS/2 protocol
 * Ugly.
 */

static int ps2pp_cmd(struct psmouse *psmouse, u8 *param, u8 command)
{}

/*
 * SmartScroll / CruiseControl for some newer Logitech mice Defaults to
 * enabled if we do nothing to it. Of course I put this in because I want it
 * disabled :P
 * 1 - enabled (if previously disabled, also default)
 * 0 - disabled
 */

static void ps2pp_set_smartscroll(struct psmouse *psmouse, bool smartscroll)
{}

static ssize_t ps2pp_attr_show_smartscroll(struct psmouse *psmouse,
					   void *data, char *buf)
{}

static ssize_t ps2pp_attr_set_smartscroll(struct psmouse *psmouse, void *data,
					  const char *buf, size_t count)
{}

PSMOUSE_DEFINE_ATTR();

/*
 * Support 800 dpi resolution _only_ if the user wants it (there are good
 * reasons to not use it even if the mouse supports it, and of course there are
 * also good reasons to use it, let the user decide).
 */

static void ps2pp_set_resolution(struct psmouse *psmouse,
				 unsigned int resolution)
{}

static void ps2pp_disconnect(struct psmouse *psmouse)
{}

static const struct ps2pp_info *get_model_info(unsigned char model)
{}

/*
 * Set up input device's properties based on the detected mouse model.
 */

static void ps2pp_set_model_properties(struct psmouse *psmouse,
				       const struct ps2pp_info *model_info,
				       bool using_ps2pp)
{}

static int ps2pp_setup_protocol(struct psmouse *psmouse,
				const struct ps2pp_info *model_info)
{}

/*
 * Logitech magic init. Detect whether the mouse is a Logitech one
 * and its exact model and try turning on extended protocol for ones
 * that support it.
 */

int ps2pp_detect(struct psmouse *psmouse, bool set_properties)
{}