linux/drivers/input/touchscreen/mcs5000_ts.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * mcs5000_ts.c - Touchscreen driver for MELFAS MCS-5000 controller
 *
 * Copyright (C) 2009 Samsung Electronics Co.Ltd
 * Author: Joonyoung Shim <[email protected]>
 *
 * Based on wm97xx-core.c
 */

#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/input.h>
#include <linux/irq.h>
#include <linux/platform_data/mcs.h>
#include <linux/slab.h>

/* Registers */
#define MCS5000_TS_STATUS
#define STATUS_OFFSET
#define STATUS_NO
#define STATUS_INIT
#define STATUS_SENSING
#define STATUS_COORD
#define STATUS_GESTURE
#define ERROR_OFFSET
#define ERROR_NO
#define ERROR_POWER_ON_RESET
#define ERROR_INT_RESET
#define ERROR_EXT_RESET
#define ERROR_INVALID_REG_ADDRESS
#define ERROR_INVALID_REG_VALUE

#define MCS5000_TS_OP_MODE
#define RESET_OFFSET
#define RESET_NO
#define RESET_EXT_SOFT
#define OP_MODE_OFFSET
#define OP_MODE_SLEEP
#define OP_MODE_ACTIVE
#define GESTURE_OFFSET
#define GESTURE_DISABLE
#define GESTURE_ENABLE
#define PROXIMITY_OFFSET
#define PROXIMITY_DISABLE
#define PROXIMITY_ENABLE
#define SCAN_MODE_OFFSET
#define SCAN_MODE_INTERRUPT
#define SCAN_MODE_POLLING
#define REPORT_RATE_OFFSET
#define REPORT_RATE_40
#define REPORT_RATE_80

#define MCS5000_TS_SENS_CTL
#define MCS5000_TS_FILTER_CTL
#define PRI_FILTER_OFFSET
#define SEC_FILTER_OFFSET

#define MCS5000_TS_X_SIZE_UPPER
#define MCS5000_TS_X_SIZE_LOWER
#define MCS5000_TS_Y_SIZE_UPPER
#define MCS5000_TS_Y_SIZE_LOWER

#define MCS5000_TS_INPUT_INFO
#define INPUT_TYPE_OFFSET
#define INPUT_TYPE_NONTOUCH
#define INPUT_TYPE_SINGLE
#define INPUT_TYPE_DUAL
#define INPUT_TYPE_PALM
#define INPUT_TYPE_PROXIMITY
#define GESTURE_CODE_OFFSET
#define GESTURE_CODE_NO

#define MCS5000_TS_X_POS_UPPER
#define MCS5000_TS_X_POS_LOWER
#define MCS5000_TS_Y_POS_UPPER
#define MCS5000_TS_Y_POS_LOWER
#define MCS5000_TS_Z_POS
#define MCS5000_TS_WIDTH
#define MCS5000_TS_GESTURE_VAL
#define MCS5000_TS_MODULE_REV
#define MCS5000_TS_FIRMWARE_VER

/* Touchscreen absolute values */
#define MCS5000_MAX_XC
#define MCS5000_MAX_YC

enum mcs5000_ts_read_offset {};

/* Each client has this additional data */
struct mcs5000_ts_data {};

static irqreturn_t mcs5000_ts_interrupt(int irq, void *dev_id)
{}

static void mcs5000_ts_phys_init(struct mcs5000_ts_data *data,
				 const struct mcs_platform_data *platform_data)
{}

static int mcs5000_ts_probe(struct i2c_client *client)
{}

static int mcs5000_ts_suspend(struct device *dev)
{}

static int mcs5000_ts_resume(struct device *dev)
{}

static DEFINE_SIMPLE_DEV_PM_OPS(mcs5000_ts_pm,
				mcs5000_ts_suspend, mcs5000_ts_resume);

static const struct i2c_device_id mcs5000_ts_id[] =;
MODULE_DEVICE_TABLE(i2c, mcs5000_ts_id);

static struct i2c_driver mcs5000_ts_driver =;

module_i2c_driver();

/* Module information */
MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();