linux/drivers/input/mouse/trackpoint.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Stephen Evanchik <[email protected]>
 *
 * Trademarks are the property of their respective owners.
 */

#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/serio.h>
#include <linux/module.h>
#include <linux/input.h>
#include <linux/libps2.h>
#include <linux/proc_fs.h>
#include <linux/uaccess.h>
#include "psmouse.h"
#include "trackpoint.h"

static const char * const trackpoint_variants[] =;

/*
 * Power-on Reset: Resets all trackpoint parameters, including RAM values,
 * to defaults.
 * Returns zero on success, non-zero on failure.
 */
static int trackpoint_power_on_reset(struct ps2dev *ps2dev)
{}

/*
 * Device IO: read, write and toggle bit
 */
static int trackpoint_read(struct ps2dev *ps2dev, u8 loc, u8 *results)
{}

static int trackpoint_write(struct ps2dev *ps2dev, u8 loc, u8 val)
{}

static int trackpoint_toggle_bit(struct ps2dev *ps2dev, u8 loc, u8 mask)
{}

static int trackpoint_update_bit(struct ps2dev *ps2dev,
				 u8 loc, u8 mask, u8 value)
{}

/*
 * Trackpoint-specific attributes
 */
struct trackpoint_attr_data {};

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

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

#define TRACKPOINT_INT_ATTR(_name, _command, _default)

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


#define TRACKPOINT_BIT_ATTR(_name, _command, _mask, _inv, _default)

TRACKPOINT_INT_ATTR();
TRACKPOINT_INT_ATTR();
TRACKPOINT_INT_ATTR();
TRACKPOINT_INT_ATTR();
TRACKPOINT_INT_ATTR();
TRACKPOINT_INT_ATTR();
TRACKPOINT_INT_ATTR();
TRACKPOINT_INT_ATTR();
TRACKPOINT_INT_ATTR();
TRACKPOINT_INT_ATTR();
TRACKPOINT_INT_ATTR();

TRACKPOINT_BIT_ATTR();
TRACKPOINT_BIT_ATTR();
TRACKPOINT_BIT_ATTR();

static bool trackpoint_is_attr_available(struct psmouse *psmouse,
					 struct attribute *attr)
{}

static umode_t trackpoint_is_attr_visible(struct kobject *kobj,
					  struct attribute *attr, int n)
{}

static struct attribute *trackpoint_attrs[] =;

static struct attribute_group trackpoint_attr_group =;

#define TRACKPOINT_UPDATE(_power_on, _psmouse, _tp, _name)

#define TRACKPOINT_SET_POWER_ON_DEFAULT(_tp, _name)

static int trackpoint_start_protocol(struct psmouse *psmouse,
				     u8 *variant_id, u8 *firmware_id)
{}

/*
 * Write parameters to trackpad.
 * in_power_on_state: Set to true if TP is in default / power-on state (ex. if
 *		      power-on reset was run). If so, values will only be
 *		      written to TP if they differ from power-on default.
 */
static int trackpoint_sync(struct psmouse *psmouse, bool in_power_on_state)
{}

static void trackpoint_defaults(struct trackpoint_data *tp)
{}

static void trackpoint_disconnect(struct psmouse *psmouse)
{}

static int trackpoint_reconnect(struct psmouse *psmouse)
{}

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