linux/drivers/input/touchscreen/mms114.c

// SPDX-License-Identifier: GPL-2.0
// Melfas MMS114/MMS136/MMS152 touchscreen device driver
//
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
// Author: Joonyoung Shim <[email protected]>

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

/* Write only registers */
#define MMS114_MODE_CONTROL
#define MMS114_OPERATION_MODE_MASK
#define MMS114_ACTIVE

#define MMS114_XY_RESOLUTION_H
#define MMS114_X_RESOLUTION
#define MMS114_Y_RESOLUTION
#define MMS114_CONTACT_THRESHOLD
#define MMS114_MOVING_THRESHOLD

/* Read only registers */
#define MMS114_PACKET_SIZE
#define MMS114_INFORMATION
#define MMS114_TSP_REV

#define MMS152_FW_REV
#define MMS152_COMPAT_GROUP

/* Minimum delay time is 50us between stop and start signal of i2c */
#define MMS114_I2C_DELAY

/* 200ms needs after power on */
#define MMS114_POWERON_DELAY

/* Touchscreen absolute values */
#define MMS114_MAX_AREA

#define MMS114_MAX_TOUCHKEYS
#define MMS114_MAX_TOUCH
#define MMS114_EVENT_SIZE
#define MMS136_EVENT_SIZE

/* Touch type */
#define MMS114_TYPE_NONE
#define MMS114_TYPE_TOUCHSCREEN
#define MMS114_TYPE_TOUCHKEY

enum mms_type {};

struct mms114_data {};

struct mms114_touch {} __packed;

static int __mms114_read_reg(struct mms114_data *data, unsigned int reg,
			     unsigned int len, u8 *val)
{}

static int mms114_read_reg(struct mms114_data *data, unsigned int reg)
{}

static int mms114_write_reg(struct mms114_data *data, unsigned int reg,
			    unsigned int val)
{}

static void mms114_process_mt(struct mms114_data *data, struct mms114_touch *touch)
{}

static void mms114_process_touchkey(struct mms114_data *data,
				    struct mms114_touch *touch)
{}

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

static int mms114_set_active(struct mms114_data *data, bool active)
{}

static int mms114_get_version(struct mms114_data *data)
{}

static int mms114_setup_regs(struct mms114_data *data)
{}

static int mms114_start(struct mms114_data *data)
{}

static void mms114_stop(struct mms114_data *data)
{}

static int mms114_input_open(struct input_dev *dev)
{}

static void mms114_input_close(struct input_dev *dev)
{}

static int mms114_parse_legacy_bindings(struct mms114_data *data)
{}

static int mms114_probe(struct i2c_client *client)
{}

static int mms114_suspend(struct device *dev)
{}

static int mms114_resume(struct device *dev)
{}

static DEFINE_SIMPLE_DEV_PM_OPS(mms114_pm_ops, mms114_suspend, mms114_resume);

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

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

static struct i2c_driver mms114_driver =;

module_i2c_driver();

/* Module information */
MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();