linux/drivers/input/touchscreen/pixcir_i2c_ts.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Driver for Pixcir I2C touchscreen controllers.
 *
 * Copyright (C) 2010-2011 Pixcir, Inc.
 */

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

#define PIXCIR_MAX_SLOTS

/*
 * Register map
 */
#define PIXCIR_REG_POWER_MODE
#define PIXCIR_REG_INT_MODE

/*
 * Power modes:
 * active: max scan speed
 * idle: lower scan speed with automatic transition to active on touch
 * halt: datasheet says sleep but this is more like halt as the chip
 *       clocks are cut and it can only be brought out of this mode
 *	 using the RESET pin.
 */
enum pixcir_power_mode {};

#define PIXCIR_POWER_MODE_MASK
#define PIXCIR_POWER_ALLOW_IDLE

/*
 * Interrupt modes:
 * periodical: interrupt is asserted periodicaly
 * diff coordinates: interrupt is asserted when coordinates change
 * level on touch: interrupt level asserted during touch
 * pulse on touch: interrupt pulse asserted during touch
 *
 */
enum pixcir_int_mode {};

#define PIXCIR_INT_MODE_MASK
#define PIXCIR_INT_ENABLE
#define PIXCIR_INT_POL_HIGH

/**
 * struct pixcir_i2c_chip_data - chip related data
 * @max_fingers:	Max number of fingers reported simultaneously by h/w
 * @has_hw_ids:		Hardware supports finger tracking IDs
 *
 */
struct pixcir_i2c_chip_data {};

struct pixcir_i2c_ts_data {};

struct pixcir_report_data {};

static void pixcir_ts_parse(struct pixcir_i2c_ts_data *tsdata,
			    struct pixcir_report_data *report)
{}

static void pixcir_ts_report(struct pixcir_i2c_ts_data *ts,
			     struct pixcir_report_data *report)
{}

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

static void pixcir_reset(struct pixcir_i2c_ts_data *tsdata)
{}

static int pixcir_set_power_mode(struct pixcir_i2c_ts_data *ts,
				 enum pixcir_power_mode mode)
{}

/*
 * Set the interrupt mode for the device i.e. ATTB line behaviour
 *
 * @polarity : 1 for active high, 0 for active low.
 */
static int pixcir_set_int_mode(struct pixcir_i2c_ts_data *ts,
			       enum pixcir_int_mode mode, bool polarity)
{}

/*
 * Enable/disable interrupt generation
 */
static int pixcir_int_enable(struct pixcir_i2c_ts_data *ts, bool enable)
{}

static int pixcir_start(struct pixcir_i2c_ts_data *ts)
{}

static int pixcir_stop(struct pixcir_i2c_ts_data *ts)
{}

static int pixcir_input_open(struct input_dev *dev)
{}

static void pixcir_input_close(struct input_dev *dev)
{}

static int pixcir_i2c_ts_suspend(struct device *dev)
{}

static int pixcir_i2c_ts_resume(struct device *dev)
{}

static DEFINE_SIMPLE_DEV_PM_OPS(pixcir_dev_pm_ops,
				pixcir_i2c_ts_suspend, pixcir_i2c_ts_resume);

static int pixcir_i2c_ts_probe(struct i2c_client *client)
{}

static const struct pixcir_i2c_chip_data pixcir_ts_data =;

static const struct pixcir_i2c_chip_data pixcir_tangoc_data =;

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

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

static struct i2c_driver pixcir_i2c_ts_driver =;

module_i2c_driver();

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