linux/drivers/input/mouse/sentelic.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*-
 * Finger Sensing Pad PS/2 mouse driver.
 *
 * Copyright (C) 2005-2007 Asia Vital Components Co., Ltd.
 * Copyright (C) 2005-2012 Tai-hwa Liang, Sentelic Corporation.
 */

#ifndef	__SENTELIC_H
#define __SENTELIC_H

/* Finger-sensing Pad information registers */
#define FSP_REG_DEVICE_ID
#define FSP_REG_VERSION
#define FSP_REG_REVISION
#define FSP_REG_TMOD_STATUS1
#define FSP_BIT_NO_ROTATION
#define FSP_REG_PAGE_CTRL

/* Finger-sensing Pad control registers */
#define FSP_REG_SYSCTL1
#define FSP_BIT_EN_REG_CLK
#define FSP_REG_TMOD_STATUS
#define FSP_REG_OPC_QDOWN
#define FSP_BIT_EN_OPC_TAG
#define FSP_REG_OPTZ_XLO
#define FSP_REG_OPTZ_XHI
#define FSP_REG_OPTZ_YLO
#define FSP_REG_OPTZ_YHI
#define FSP_REG_SYSCTL5
#define FSP_BIT_90_DEGREE
#define FSP_BIT_EN_MSID6
#define FSP_BIT_EN_MSID7
#define FSP_BIT_EN_MSID8
#define FSP_BIT_EN_AUTO_MSID8
#define FSP_BIT_EN_PKT_G0

#define FSP_REG_ONPAD_CTL
#define FSP_BIT_ONPAD_ENABLE
#define FSP_BIT_ONPAD_FBBB
#define FSP_BIT_FIX_VSCR
#define FSP_BIT_FIX_HSCR
#define FSP_BIT_DRAG_LOCK

#define FSP_REG_SWC1
#define FSP_BIT_SWC1_EN_ABS_1F
#define FSP_BIT_SWC1_EN_GID
#define FSP_BIT_SWC1_EN_ABS_2F
#define FSP_BIT_SWC1_EN_FUP_OUT
#define FSP_BIT_SWC1_EN_ABS_CON
#define FSP_BIT_SWC1_GST_GRP0
#define FSP_BIT_SWC1_GST_GRP1
#define FSP_BIT_SWC1_BX_COMPAT

#define FSP_PAGE_0B
#define FSP_PAGE_82
#define FSP_PAGE_DEFAULT

#define FSP_REG_SN0
#define FSP_REG_SN1
#define FSP_REG_SN2

/* Finger-sensing Pad packet formating related definitions */

/* absolute packet type */
#define FSP_PKT_TYPE_NORMAL
#define FSP_PKT_TYPE_ABS
#define FSP_PKT_TYPE_NOTIFY
#define FSP_PKT_TYPE_NORMAL_OPC
#define FSP_PKT_TYPE_SHIFT

/* bit definitions for the first byte of report packet */
#define FSP_PB0_LBTN
#define FSP_PB0_RBTN
#define FSP_PB0_MBTN
#define FSP_PB0_MFMC_FGR2
#define FSP_PB0_MUST_SET
#define FSP_PB0_PHY_BTN
#define FSP_PB0_MFMC

/* hardware revisions */
#define FSP_VER_STL3888_A4
#define FSP_VER_STL3888_B0
#define FSP_VER_STL3888_B1
#define FSP_VER_STL3888_B2
#define FSP_VER_STL3888_C0
#define FSP_VER_STL3888_C1
#define FSP_VER_STL3888_D0
#define FSP_VER_STL3888_D1
#define FSP_VER_STL3888_E0

#ifdef __KERNEL__

struct fsp_data {};

extern int fsp_detect(struct psmouse *psmouse, bool set_properties);
extern int fsp_init(struct psmouse *psmouse);

#endif	/* __KERNEL__ */

#endif	/* !__SENTELIC_H */