linux/drivers/input/touchscreen/egalax_ts.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Driver for EETI eGalax Multiple Touch Controller
 *
 * Copyright (C) 2011 Freescale Semiconductor, Inc.
 *
 * based on max11801_ts.c
 */

/* EETI eGalax serial touch screen controller is a I2C based multiple
 * touch screen controller, it supports 5 point multiple touch. */

/* TODO:
  - auto idle mode support
*/

#include <linux/err.h>
#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/input.h>
#include <linux/irq.h>
#include <linux/gpio/consumer.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/bitops.h>
#include <linux/input/mt.h>

/*
 * Mouse Mode: some panel may configure the controller to mouse mode,
 * which can only report one point at a given time.
 * This driver will ignore events in this mode.
 */
#define REPORT_MODE_MOUSE
/*
 * Vendor Mode: this mode is used to transfer some vendor specific
 * messages.
 * This driver will ignore events in this mode.
 */
#define REPORT_MODE_VENDOR
/* Multiple Touch Mode */
#define REPORT_MODE_MTTOUCH

#define MAX_SUPPORT_POINTS

#define EVENT_VALID_OFFSET
#define EVENT_VALID_MASK
#define EVENT_ID_OFFSET
#define EVENT_ID_MASK
#define EVENT_IN_RANGE
#define EVENT_DOWN_UP

#define MAX_I2C_DATA_LEN

#define EGALAX_MAX_X
#define EGALAX_MAX_Y
#define EGALAX_MAX_TRIES

struct egalax_ts {};

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

/* wake up controller by an falling edge of interrupt gpio.  */
static int egalax_wake_up_device(struct i2c_client *client)
{}

static int egalax_firmware_version(struct i2c_client *client)
{}

static int egalax_ts_probe(struct i2c_client *client)
{}

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

static int egalax_ts_suspend(struct device *dev)
{}

static int egalax_ts_resume(struct device *dev)
{}

static DEFINE_SIMPLE_DEV_PM_OPS(egalax_ts_pm_ops,
				egalax_ts_suspend, egalax_ts_resume);

static const struct of_device_id egalax_ts_dt_ids[] =;
MODULE_DEVICE_TABLE(of, egalax_ts_dt_ids);

static struct i2c_driver egalax_ts_driver =;

module_i2c_driver();

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