linux/drivers/input/touchscreen/max11801_ts.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Driver for MAXI MAX11801 - A Resistive touch screen controller with
 * i2c interface
 *
 * Copyright (C) 2011 Freescale Semiconductor, Inc.
 * Author: Zhang Jiejing <[email protected]>
 *
 * Based on mcs5000_ts.c
 */

/*
 * This driver aims to support the series of MAXI touch chips max11801
 * through max11803. The main difference between these 4 chips can be
 * found in the table below:
 * -----------------------------------------------------
 * | CHIP     |  AUTO MODE SUPPORT(FIFO) | INTERFACE    |
 * |----------------------------------------------------|
 * | max11800 |  YES                     |   SPI        |
 * | max11801 |  YES                     |   I2C        |
 * | max11802 |  NO                      |   SPI        |
 * | max11803 |  NO                      |   I2C        |
 * ------------------------------------------------------
 *
 * Currently, this driver only supports max11801.
 *
 * Data Sheet:
 * http://www.maxim-ic.com/datasheet/index.mvp/id/5943
 */

#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/input.h>
#include <linux/slab.h>
#include <linux/bitops.h>

/* Register Address define */
#define GENERNAL_STATUS_REG
#define GENERNAL_CONF_REG
#define MESURE_RES_CONF_REG
#define MESURE_AVER_CONF_REG
#define ADC_SAMPLE_TIME_CONF_REG
#define PANEL_SETUPTIME_CONF_REG
#define DELAY_CONVERSION_CONF_REG
#define TOUCH_DETECT_PULLUP_CONF_REG
#define AUTO_MODE_TIME_CONF_REG
#define APERTURE_CONF_REG
#define AUX_MESURE_CONF_REG
#define OP_MODE_CONF_REG

/* FIFO is found only in max11800 and max11801 */
#define FIFO_RD_CMD
#define MAX11801_FIFO_INT
#define MAX11801_FIFO_OVERFLOW

#define XY_BUFSIZE
#define XY_BUF_OFFSET

#define MAX11801_MAX_X
#define MAX11801_MAX_Y

#define MEASURE_TAG_OFFSET
#define MEASURE_TAG_MASK
#define EVENT_TAG_OFFSET
#define EVENT_TAG_MASK
#define MEASURE_X_TAG
#define MEASURE_Y_TAG

/* These are the state of touch event state machine */
enum {};

struct max11801_data {};

static u8 read_register(struct i2c_client *client, int addr)
{}

static int max11801_write_reg(struct i2c_client *client, int addr, int data)
{}

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

static void max11801_ts_phy_init(struct max11801_data *data)
{}

static int max11801_ts_probe(struct i2c_client *client)
{}

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

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

static struct i2c_driver max11801_ts_driver =;

module_i2c_driver();

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