linux/drivers/input/touchscreen/cy8ctma140.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Driver for Cypress CY8CTMA140 (TMA140) touchscreen
 * (C) 2020 Linus Walleij <[email protected]>
 * (C) 2007 Cypress
 * (C) 2007 Google, Inc.
 *
 * Inspired by the tma140_skomer.c driver in the Samsung GT-S7710 code
 * drop. The GT-S7710 is codenamed "Skomer", the code also indicates
 * that the same touchscreen was used in a product called "Lucas".
 *
 * The code drop for GT-S7710 also contains a firmware downloader and
 * 15 (!) versions of the firmware drop from Cypress. But here we assume
 * the firmware got downloaded to the touchscreen flash successfully and
 * just use it to read the fingers. The shipped vendor driver does the
 * same.
 */

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

#define CY8CTMA140_NAME

#define CY8CTMA140_MAX_FINGERS

#define CY8CTMA140_GET_FINGERS
#define CY8CTMA140_GET_FW_INFO

/* This message also fits some bytes for touchkeys, if used */
#define CY8CTMA140_PACKET_SIZE

#define CY8CTMA140_INVALID_BUFFER_BIT

struct cy8ctma140 {};

static void cy8ctma140_report(struct cy8ctma140 *ts, u8 *data, int n_fingers)
{}

static irqreturn_t cy8ctma140_irq_thread(int irq, void *d)
{}

static int cy8ctma140_init(struct cy8ctma140 *ts)
{}

static int cy8ctma140_power_up(struct cy8ctma140 *ts)
{}

static void cy8ctma140_power_down(struct cy8ctma140 *ts)
{}

/* Called from the registered devm action */
static void cy8ctma140_power_off_action(void *d)
{}

static int cy8ctma140_probe(struct i2c_client *client)
{}

static int cy8ctma140_suspend(struct device *dev)
{}

static int cy8ctma140_resume(struct device *dev)
{}

static DEFINE_SIMPLE_DEV_PM_OPS(cy8ctma140_pm,
				cy8ctma140_suspend, cy8ctma140_resume);

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

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

static struct i2c_driver cy8ctma140_driver =;
module_i2c_driver();

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