linux/drivers/input/touchscreen/himax_hx83112b.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Driver for Himax hx83112b touchscreens
 *
 * Copyright (C) 2022 Job Noorman <[email protected]>
 *
 * HX83100A support
 * Copyright (C) 2024 Felix Kaechele <[email protected]>
 *
 * This code is based on "Himax Android Driver Sample Code for QCT platform":
 *
 * Copyright (C) 2017 Himax Corporation.
 */

#include <linux/delay.h>
#include <linux/err.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/regmap.h>

#define HIMAX_MAX_POINTS

#define HIMAX_AHB_ADDR_BYTE_0
#define HIMAX_AHB_ADDR_RDATA_BYTE_0
#define HIMAX_AHB_ADDR_ACCESS_DIRECTION
#define HIMAX_AHB_ADDR_INCR4
#define HIMAX_AHB_ADDR_CONTI
#define HIMAX_AHB_ADDR_EVENT_STACK

#define HIMAX_AHB_CMD_ACCESS_DIRECTION_READ
#define HIMAX_AHB_CMD_INCR4
#define HIMAX_AHB_CMD_CONTI

#define HIMAX_REG_ADDR_ICID

#define HX83100A_REG_FW_EVENT_STACK

#define HIMAX_INVALID_COORD

struct himax_event_point {} __packed;

struct himax_event {} __packed;

static_assert();

struct himax_ts_data;
struct himax_chip {};

struct himax_ts_data {};

static const struct regmap_config himax_regmap_config =;

static int himax_bus_enable_burst(struct himax_ts_data *ts)
{}

static int himax_bus_read(struct himax_ts_data *ts, u32 address, void *dst,
			  size_t length)
{}

static void himax_reset(struct himax_ts_data *ts)
{}

static int himax_read_product_id(struct himax_ts_data *ts, u32 *product_id)
{}

static int himax_check_product_id(struct himax_ts_data *ts)
{}

static int himax_input_register(struct himax_ts_data *ts)
{}

static u8 himax_event_get_num_points(const struct himax_event *event)
{}

static bool himax_process_event_point(struct himax_ts_data *ts,
				      const struct himax_event *event,
				      int point_index)
{}

static void himax_process_event(struct himax_ts_data *ts,
				const struct himax_event *event)
{}

static bool himax_verify_checksum(struct himax_ts_data *ts,
				  const struct himax_event *event)
{}

static int himax_read_events(struct himax_ts_data *ts,
			     struct himax_event *event, size_t length)
{}

static int hx83100a_read_events(struct himax_ts_data *ts,
				struct himax_event *event, size_t length)
{
	return himax_bus_read(ts, HX83100A_REG_FW_EVENT_STACK, event, length);
};

static int himax_handle_input(struct himax_ts_data *ts)
{}

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

static int himax_probe(struct i2c_client *client)
{}

static int himax_suspend(struct device *dev)
{}

static int himax_resume(struct device *dev)
{}

static DEFINE_SIMPLE_DEV_PM_OPS(himax_pm_ops, himax_suspend, himax_resume);

static const struct himax_chip hx83100a_chip =;

static const struct himax_chip hx83112b_chip =;

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

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

static struct i2c_driver himax_ts_driver =;
module_i2c_driver();

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