linux/drivers/input/touchscreen/novatek-nvt-ts.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Driver for Novatek NT11205 i2c touchscreen controller as found
 * on the Acer Iconia One 7 B1-750 tablet.
 *
 * Copyright (c) 2023 Hans de Goede <[email protected]>
 */

#include <linux/delay.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/unaligned.h>

#define NVT_TS_TOUCH_START
#define NVT_TS_TOUCH_SIZE

#define NVT_TS_PARAMETERS_START
/* These are offsets from NVT_TS_PARAMETERS_START */
#define NVT_TS_PARAMS_WIDTH
#define NVT_TS_PARAMS_HEIGHT
#define NVT_TS_PARAMS_MAX_TOUCH
#define NVT_TS_PARAMS_MAX_BUTTONS
#define NVT_TS_PARAMS_IRQ_TYPE
#define NVT_TS_PARAMS_WAKE_TYPE
#define NVT_TS_PARAMS_CHIP_ID
#define NVT_TS_PARAMS_SIZE

#define NVT_TS_SUPPORTED_WAKE_TYPE
#define NVT_TS_SUPPORTED_CHIP_ID

#define NVT_TS_MAX_TOUCHES
#define NVT_TS_MAX_SIZE

#define NVT_TS_TOUCH_INVALID
#define NVT_TS_TOUCH_SLOT_SHIFT
#define NVT_TS_TOUCH_TYPE_MASK
#define NVT_TS_TOUCH_NEW
#define NVT_TS_TOUCH_UPDATE
#define NVT_TS_TOUCH_RELEASE

static const int nvt_ts_irq_type[4] =;

struct nvt_ts_data {};

static int nvt_ts_read_data(struct i2c_client *client, u8 reg, u8 *data, int count)
{}

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

static int nvt_ts_start(struct input_dev *dev)
{}

static void nvt_ts_stop(struct input_dev *dev)
{}

static int nvt_ts_suspend(struct device *dev)
{}

static int nvt_ts_resume(struct device *dev)
{}

static DEFINE_SIMPLE_DEV_PM_OPS(nvt_ts_pm_ops, nvt_ts_suspend, nvt_ts_resume);

static int nvt_ts_probe(struct i2c_client *client)
{}

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

static struct i2c_driver nvt_ts_driver =;

module_i2c_driver();

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