linux/drivers/input/touchscreen/msg2638.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Driver for MStar msg2638 touchscreens
 *
 * Copyright (c) 2021 Vincent Knecht <[email protected]>
 *
 * Checksum and IRQ handler based on mstar_drv_common.c and
 * mstar_drv_mutual_fw_control.c
 * Copyright (c) 2006-2012 MStar Semiconductor, Inc.
 *
 * Driver structure based on zinitix.c by Michael Srba <[email protected]>
 */

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

#define MODE_DATA_RAW

#define MSG2138_MAX_FINGERS
#define MSG2638_MAX_FINGERS

#define MAX_BUTTONS

#define CHIP_ON_DELAY_MS
#define FIRMWARE_ON_DELAY_MS
#define RESET_DELAY_MIN_US
#define RESET_DELAY_MAX_US

struct msg_chip_data {};

struct msg2138_packet {};

struct msg2138_touch_event {};

struct msg2638_packet {};

struct msg2638_touch_event {};

struct msg2638_ts_data {};

static u8 msg2638_checksum(u8 *data, u32 length)
{}

static void msg2138_report_keys(struct msg2638_ts_data *msg2638, u8 keys)
{}

static irqreturn_t msg2138_ts_irq_handler(int irq, void *msg2638_handler)
{}

static irqreturn_t msg2638_ts_irq_handler(int irq, void *msg2638_handler)
{}

static void msg2638_reset(struct msg2638_ts_data *msg2638)
{}

static int msg2638_start(struct msg2638_ts_data *msg2638)
{}

static int msg2638_stop(struct msg2638_ts_data *msg2638)
{}

static int msg2638_input_open(struct input_dev *dev)
{}

static void msg2638_input_close(struct input_dev *dev)
{}

static int msg2638_init_input_dev(struct msg2638_ts_data *msg2638)
{}

static int msg2638_ts_probe(struct i2c_client *client)
{}

static int msg2638_suspend(struct device *dev)
{}

static int msg2638_resume(struct device *dev)
{}

static DEFINE_SIMPLE_DEV_PM_OPS(msg2638_pm_ops, msg2638_suspend, msg2638_resume);

static const struct msg_chip_data msg2138_data =;

static const struct msg_chip_data msg2638_data =;

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

static struct i2c_driver msg2638_ts_driver =;
module_i2c_driver();

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