linux/drivers/input/touchscreen/bu21013_ts.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) ST-Ericsson SA 2010
 * Author: Naveen Kumar G <[email protected]> for ST-Ericsson
 */

#include <linux/bitops.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/kernel.h>
#include <linux/module.h>
#include <linux/property.h>
#include <linux/regulator/consumer.h>
#include <linux/slab.h>
#include <linux/types.h>

#define MAX_FINGERS
#define RESET_DELAY
#define PENUP_TIMEOUT
#define DELTA_MIN
#define MASK_BITS
#define SHIFT_8
#define SHIFT_2
#define LENGTH_OF_BUFFER
#define I2C_RETRY_COUNT

#define BU21013_SENSORS_BTN_0_7_REG
#define BU21013_SENSORS_BTN_8_15_REG
#define BU21013_SENSORS_BTN_16_23_REG
#define BU21013_X1_POS_MSB_REG
#define BU21013_X1_POS_LSB_REG
#define BU21013_Y1_POS_MSB_REG
#define BU21013_Y1_POS_LSB_REG
#define BU21013_X2_POS_MSB_REG
#define BU21013_X2_POS_LSB_REG
#define BU21013_Y2_POS_MSB_REG
#define BU21013_Y2_POS_LSB_REG
#define BU21013_INT_CLR_REG
#define BU21013_INT_MODE_REG
#define BU21013_GAIN_REG
#define BU21013_OFFSET_MODE_REG
#define BU21013_XY_EDGE_REG
#define BU21013_RESET_REG
#define BU21013_CALIB_REG
#define BU21013_DONE_REG
#define BU21013_SENSOR_0_7_REG
#define BU21013_SENSOR_8_15_REG
#define BU21013_SENSOR_16_23_REG
#define BU21013_POS_MODE1_REG
#define BU21013_POS_MODE2_REG
#define BU21013_CLK_MODE_REG
#define BU21013_IDLE_REG
#define BU21013_FILTER_REG
#define BU21013_TH_ON_REG
#define BU21013_TH_OFF_REG


#define BU21013_RESET_ENABLE

#define BU21013_SENSORS_EN_0_7
#define BU21013_SENSORS_EN_8_15
#define BU21013_SENSORS_EN_16_23

#define BU21013_POS_MODE1_0
#define BU21013_POS_MODE1_1
#define BU21013_POS_MODE1_2

#define BU21013_POS_MODE2_ZERO
#define BU21013_POS_MODE2_AVG1
#define BU21013_POS_MODE2_AVG2
#define BU21013_POS_MODE2_EN_XY
#define BU21013_POS_MODE2_EN_RAW
#define BU21013_POS_MODE2_MULTI

#define BU21013_CLK_MODE_DIV
#define BU21013_CLK_MODE_EXT
#define BU21013_CLK_MODE_CALIB

#define BU21013_IDLET_0
#define BU21013_IDLET_1
#define BU21013_IDLET_2
#define BU21013_IDLET_3
#define BU21013_IDLE_INTERMIT_EN

#define BU21013_DELTA_0_6
#define BU21013_FILTER_EN

#define BU21013_INT_MODE_LEVEL
#define BU21013_INT_MODE_EDGE

#define BU21013_GAIN_0
#define BU21013_GAIN_1
#define BU21013_GAIN_2

#define BU21013_OFFSET_MODE_DEFAULT
#define BU21013_OFFSET_MODE_MOVE
#define BU21013_OFFSET_MODE_DISABLE

#define BU21013_TH_ON_0
#define BU21013_TH_ON_1
#define BU21013_TH_ON_2
#define BU21013_TH_ON_3
#define BU21013_TH_ON_4
#define BU21013_TH_ON_5
#define BU21013_TH_ON_6
#define BU21013_TH_ON_7
#define BU21013_TH_ON_MAX

#define BU21013_TH_OFF_0
#define BU21013_TH_OFF_1
#define BU21013_TH_OFF_2
#define BU21013_TH_OFF_3
#define BU21013_TH_OFF_4
#define BU21013_TH_OFF_5
#define BU21013_TH_OFF_6
#define BU21013_TH_OFF_7
#define BU21013_TH_OFF_MAX

#define BU21013_X_EDGE_0
#define BU21013_X_EDGE_1
#define BU21013_X_EDGE_2
#define BU21013_X_EDGE_3
#define BU21013_Y_EDGE_0
#define BU21013_Y_EDGE_1
#define BU21013_Y_EDGE_2
#define BU21013_Y_EDGE_3

#define BU21013_DONE
#define BU21013_NUMBER_OF_X_SENSORS
#define BU21013_NUMBER_OF_Y_SENSORS

#define DRIVER_TP

/**
 * struct bu21013_ts - touch panel data structure
 * @client: pointer to the i2c client
 * @in_dev: pointer to the input device structure
 * @props: the device coordinate transformation properties
 * @regulator: pointer to the Regulator used for touch screen
 * @cs_gpiod: chip select GPIO line
 * @int_gpiod: touch interrupt GPIO line
 * @touch_x_max: maximum X coordinate reported by the device
 * @touch_y_max: maximum Y coordinate reported by the device
 * @x_flip: indicates that the driver should invert X coordinate before
 *	reporting
 * @y_flip: indicates that the driver should invert Y coordinate before
 *	reporting
 * @touch_stopped: touch stop flag
 *
 * Touch panel device data structure
 */
struct bu21013_ts {};

static int bu21013_read_block_data(struct bu21013_ts *ts, u8 *buf)
{}

static int bu21013_do_touch_report(struct bu21013_ts *ts)
{}

static irqreturn_t bu21013_gpio_irq(int irq, void *device_data)
{}

static int bu21013_init_chip(struct bu21013_ts *ts)
{}

static void bu21013_power_off(void *_ts)
{}

static void bu21013_disable_chip(void *_ts)
{}

static int bu21013_probe(struct i2c_client *client)
{}

static void bu21013_remove(struct i2c_client *client)
{}

static int bu21013_suspend(struct device *dev)
{}

static int bu21013_resume(struct device *dev)
{}

static DEFINE_SIMPLE_DEV_PM_OPS(bu21013_dev_pm_ops, bu21013_suspend, bu21013_resume);

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

static struct i2c_driver bu21013_driver =;

module_i2c_driver();

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