linux/drivers/hid/hid-alps.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *  Copyright (c) 2016 Masaki Ota <[email protected]>
 */

#include <linux/kernel.h>
#include <linux/hid.h>
#include <linux/input.h>
#include <linux/input/mt.h>
#include <linux/module.h>
#include <asm/unaligned.h>
#include "hid-ids.h"

/* ALPS Device Product ID */
#define HID_PRODUCT_ID_T3_BTNLESS
#define HID_PRODUCT_ID_COSMO
#define HID_PRODUCT_ID_U1_PTP_1
#define HID_PRODUCT_ID_U1
#define HID_PRODUCT_ID_U1_PTP_2
#define HID_PRODUCT_ID_U1_DUAL
#define HID_PRODUCT_ID_T4_BTNLESS

#define DEV_SINGLEPOINT
#define DEV_DUALPOINT

#define U1_MOUSE_REPORT_ID
#define U1_ABSOLUTE_REPORT_ID
#define U1_ABSOLUTE_REPORT_ID_SECD
#define U1_FEATURE_REPORT_ID
#define U1_SP_ABSOLUTE_REPORT_ID

#define U1_FEATURE_REPORT_LEN
#define U1_FEATURE_REPORT_LEN_ALL
#define U1_CMD_REGISTER_READ
#define U1_CMD_REGISTER_WRITE

#define U1_DEVTYPE_SP_SUPPORT
#define U1_DISABLE_DEV
#define U1_TP_ABS_MODE
#define U1_SP_ABS_MODE

#define ADDRESS_U1_DEV_CTRL_1
#define ADDRESS_U1_DEVICE_TYP
#define ADDRESS_U1_NUM_SENS_X
#define ADDRESS_U1_NUM_SENS_Y
#define ADDRESS_U1_PITCH_SENS_X
#define ADDRESS_U1_PITCH_SENS_Y
#define ADDRESS_U1_RESO_DWN_ABS
#define ADDRESS_U1_PAD_BTN
#define ADDRESS_U1_SP_BTN

#define T4_INPUT_REPORT_LEN
#define T4_FEATURE_REPORT_LEN
#define T4_FEATURE_REPORT_ID
#define T4_CMD_REGISTER_READ
#define T4_CMD_REGISTER_WRITE

#define T4_ADDRESS_BASE
#define PRM_SYS_CONFIG_1
#define T4_PRM_FEED_CONFIG_1
#define T4_PRM_FEED_CONFIG_4
#define T4_PRM_ID_CONFIG_3


#define T4_FEEDCFG4_ADVANCED_ABS_ENABLE
#define T4_I2C_ABS

#define T4_COUNT_PER_ELECTRODE
#define MAX_TOUCHES

enum dev_num {};
/**
 * struct alps_dev
 *
 * @input: pointer to the kernel input device
 * @input2: pointer to the kernel input2 device
 * @hdev: pointer to the struct hid_device
 *
 * @dev_type: device type
 * @max_fingers: total number of fingers
 * @has_sp: boolean of sp existense
 * @sp_btn_info: button information
 * @x_active_len_mm: active area length of X (mm)
 * @y_active_len_mm: active area length of Y (mm)
 * @x_max: maximum x coordinate value
 * @y_max: maximum y coordinate value
 * @x_min: minimum x coordinate value
 * @y_min: minimum y coordinate value
 * @btn_cnt: number of buttons
 * @sp_btn_cnt: number of stick buttons
 */
struct alps_dev {};

struct t4_contact_data {};

struct t4_input_report {};

static u16 t4_calc_check_sum(u8 *buffer,
		unsigned long offset, unsigned long length)
{}

static int t4_read_write_register(struct hid_device *hdev, u32 address,
	u8 *read_val, u8 write_val, bool read_flag)
{}

static int u1_read_write_register(struct hid_device *hdev, u32 address,
	u8 *read_val, u8 write_val, bool read_flag)
{}

static int t4_raw_event(struct alps_dev *hdata, u8 *data, int size)
{}

static int u1_raw_event(struct alps_dev *hdata, u8 *data, int size)
{}

static int alps_raw_event(struct hid_device *hdev,
		struct hid_report *report, u8 *data, int size)
{}

static int __maybe_unused alps_post_reset(struct hid_device *hdev)
{}

static int __maybe_unused alps_post_resume(struct hid_device *hdev)
{}

static int u1_init(struct hid_device *hdev, struct alps_dev *pri_data)
{}

static int T4_init(struct hid_device *hdev, struct alps_dev *pri_data)
{}

static int alps_sp_open(struct input_dev *dev)
{}

static void alps_sp_close(struct input_dev *dev)
{}

static int alps_input_configured(struct hid_device *hdev, struct hid_input *hi)
{}

static int alps_input_mapping(struct hid_device *hdev,
		struct hid_input *hi, struct hid_field *field,
		struct hid_usage *usage, unsigned long **bit, int *max)
{}

static int alps_probe(struct hid_device *hdev, const struct hid_device_id *id)
{}

static const struct hid_device_id alps_id[] =;
MODULE_DEVICE_TABLE(hid, alps_id);

static struct hid_driver alps_driver =;

module_hid_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();