linux/drivers/input/touchscreen/ad7879.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * AD7879/AD7889 based touchscreen and GPIO driver
 *
 * Copyright (C) 2008-2010 Michael Hennerich, Analog Devices Inc.
 *
 * History:
 * Copyright (c) 2005 David Brownell
 * Copyright (c) 2006 Nokia Corporation
 * Various changes: Imre Deak <[email protected]>
 *
 * Using code from:
 *  - corgi_ts.c
 *	Copyright (C) 2004-2005 Richard Purdie
 *  - omap_ts.[hc], ads7846.h, ts_osk.c
 *	Copyright (C) 2002 MontaVista Software
 *	Copyright (C) 2004 Texas Instruments
 *	Copyright (C) 2005 Dirk Behme
 *  - ad7877.c
 *	Copyright (C) 2006-2008 Analog Devices Inc.
 */

#include <linux/device.h>
#include <linux/delay.h>
#include <linux/input.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/property.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <linux/gpio/driver.h>

#include <linux/input/touchscreen.h>
#include <linux/module.h>
#include "ad7879.h"

#define AD7879_REG_ZEROS
#define AD7879_REG_CTRL1
#define AD7879_REG_CTRL2
#define AD7879_REG_CTRL3
#define AD7879_REG_AUX1HIGH
#define AD7879_REG_AUX1LOW
#define AD7879_REG_TEMP1HIGH
#define AD7879_REG_TEMP1LOW
#define AD7879_REG_XPLUS
#define AD7879_REG_YPLUS
#define AD7879_REG_Z1
#define AD7879_REG_Z2
#define AD7879_REG_AUXVBAT
#define AD7879_REG_TEMP
#define AD7879_REG_REVID

/* Control REG 1 */
#define AD7879_TMR(x)
#define AD7879_ACQ(x)
#define AD7879_MODE_NOC
#define AD7879_MODE_SCC
#define AD7879_MODE_SEQ0
#define AD7879_MODE_SEQ1
#define AD7879_MODE_INT

/* Control REG 2 */
#define AD7879_FCD(x)
#define AD7879_RESET
#define AD7879_MFS(x)
#define AD7879_AVG(x)
#define AD7879_SER
#define AD7879_DFR
#define AD7879_GPIOPOL
#define AD7879_GPIODIR
#define AD7879_GPIO_DATA
#define AD7879_GPIO_EN
#define AD7879_PM(x)
#define AD7879_PM_SHUTDOWN
#define AD7879_PM_DYN
#define AD7879_PM_FULLON

/* Control REG 3 */
#define AD7879_TEMPMASK_BIT
#define AD7879_AUXVBATMASK_BIT
#define AD7879_INTMODE_BIT
#define AD7879_GPIOALERTMASK_BIT
#define AD7879_AUXLOW_BIT
#define AD7879_AUXHIGH_BIT
#define AD7879_TEMPLOW_BIT
#define AD7879_TEMPHIGH_BIT
#define AD7879_YPLUS_BIT
#define AD7879_XPLUS_BIT
#define AD7879_Z1_BIT
#define AD7879_Z2_BIT
#define AD7879_AUX_BIT
#define AD7879_VBAT_BIT
#define AD7879_TEMP_BIT

enum {};

#define MAX_12BIT
#define TS_PEN_UP_TIMEOUT

struct ad7879 {};

static int ad7879_read(struct ad7879 *ts, u8 reg)
{}

static int ad7879_write(struct ad7879 *ts, u8 reg, u16 val)
{}

static int ad7879_report(struct ad7879 *ts)
{}

static void ad7879_ts_event_release(struct ad7879 *ts)
{}

static void ad7879_timer(struct timer_list *t)
{}

static irqreturn_t ad7879_irq(int irq, void *handle)
{}

static void __ad7879_enable(struct ad7879 *ts)
{}

static void __ad7879_disable(struct ad7879 *ts)
{}


static int ad7879_open(struct input_dev *input)
{}

static void ad7879_close(struct input_dev *input)
{}

static int __maybe_unused ad7879_suspend(struct device *dev)
{}

static int __maybe_unused ad7879_resume(struct device *dev)
{}

SIMPLE_DEV_PM_OPS(ad7879_pm_ops, ad7879_suspend, ad7879_resume);
EXPORT_SYMBOL();

static void ad7879_toggle(struct ad7879 *ts, bool disable)
{}

static ssize_t ad7879_disable_show(struct device *dev,
				     struct device_attribute *attr, char *buf)
{}

static ssize_t ad7879_disable_store(struct device *dev,
				     struct device_attribute *attr,
				     const char *buf, size_t count)
{}

static DEVICE_ATTR(disable, 0664, ad7879_disable_show, ad7879_disable_store);

static struct attribute *ad7879_attributes[] =;

static const struct attribute_group ad7879_attr_group =;

const struct attribute_group *ad7879_groups[] =;
EXPORT_SYMBOL_GPL();

#ifdef CONFIG_GPIOLIB
static int ad7879_gpio_direction_input(struct gpio_chip *chip,
					unsigned gpio)
{}

static int ad7879_gpio_direction_output(struct gpio_chip *chip,
					unsigned gpio, int level)
{}

static int ad7879_gpio_get_value(struct gpio_chip *chip, unsigned gpio)
{}

static void ad7879_gpio_set_value(struct gpio_chip *chip,
				  unsigned gpio, int value)
{}

static int ad7879_gpio_add(struct ad7879 *ts)
{}
#else
static int ad7879_gpio_add(struct ad7879 *ts)
{
	return 0;
}
#endif

static int ad7879_parse_dt(struct device *dev, struct ad7879 *ts)
{}

int ad7879_probe(struct device *dev, struct regmap *regmap,
		 int irq, u16 bustype, u8 devid)
{}
EXPORT_SYMBOL();

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