linux/drivers/input/touchscreen/ektf2127.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Driver for ELAN eKTF2127 i2c touchscreen controller
 *
 * For this driver the layout of the Chipone icn8318 i2c
 * touchscreencontroller is used.
 *
 * Author:
 * Michel Verlaan <[email protected]>
 * Siebren Vroegindeweij <[email protected]>
 *
 * Original chipone_icn8318 driver:
 * Hans de Goede <[email protected]>
 */

#include <linux/bits.h>
#include <linux/gpio/consumer.h>
#include <linux/interrupt.h>
#include <linux/i2c.h>
#include <linux/input.h>
#include <linux/input/mt.h>
#include <linux/input/touchscreen.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/delay.h>

/* Packet header defines (first byte of data send / received) */
#define EKTF2127_NOISE
#define EKTF2127_RESPONSE
#define EKTF2127_REQUEST
#define EKTF2127_HELLO
#define EKTF2127_REPORT2
#define EKTF2127_REPORT
#define EKTF2127_CALIB_DONE

/* Register defines (second byte of data send / received) */
#define EKTF2127_ENV_NOISY
#define EKTF2127_HEIGHT
#define EKTF2127_WIDTH

/* 2 bytes header + 5 * 3 bytes coordinates + 3 bytes pressure info + footer */
#define EKTF2127_TOUCH_REPORT_SIZE
#define EKTF2127_MAX_TOUCHES

struct ektf2127_ts {};

struct ektf2127_i2c_chip_data {};

static void ektf2127_parse_coordinates(const u8 *buf, unsigned int touch_count,
				       struct input_mt_pos *touches)
{}

static void ektf2127_report_event(struct ektf2127_ts *ts, const u8 *buf)
{}

static void ektf2127_report2_contact(struct ektf2127_ts *ts, int slot,
				     const u8 *buf, bool active)
{}

static void ektf2127_report2_event(struct ektf2127_ts *ts, const u8 *buf)
{}

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

static int ektf2127_start(struct input_dev *dev)
{}

static void ektf2127_stop(struct input_dev *dev)
{}

static int ektf2127_suspend(struct device *dev)
{}

static int ektf2127_resume(struct device *dev)
{}

static DEFINE_SIMPLE_DEV_PM_OPS(ektf2127_pm_ops, ektf2127_suspend,
				ektf2127_resume);

static int ektf2127_query_dimension(struct i2c_client *client, bool width)
{}

static int ektf2127_probe(struct i2c_client *client)
{}

static const struct ektf2127_i2c_chip_data ektf2127_data =;

static const struct ektf2127_i2c_chip_data ektf2232_data =;

#ifdef CONFIG_OF
static const struct of_device_id ektf2127_of_match[] =;
MODULE_DEVICE_TABLE(of, ektf2127_of_match);
#endif

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

static struct i2c_driver ektf2127_driver =;
module_i2c_driver();

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