linux/drivers/input/touchscreen/hideep.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2012-2017 Hideep, Inc.
 */

#include <linux/module.h>
#include <linux/of.h>
#include <linux/firmware.h>
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/acpi.h>
#include <linux/interrupt.h>
#include <linux/regmap.h>
#include <linux/sysfs.h>
#include <linux/input.h>
#include <linux/input/mt.h>
#include <linux/input/touchscreen.h>
#include <linux/regulator/consumer.h>
#include <linux/unaligned.h>

#define HIDEEP_TS_NAME
#define HIDEEP_I2C_NAME

#define HIDEEP_MT_MAX
#define HIDEEP_KEY_MAX

/* count(2) + touch data(100) + key data(6) */
#define HIDEEP_MAX_EVENT

#define HIDEEP_TOUCH_EVENT_INDEX
#define HIDEEP_KEY_EVENT_INDEX

/* Touch & key event */
#define HIDEEP_EVENT_ADDR

/* command list */
#define HIDEEP_WORK_MODE
#define HIDEEP_RESET_CMD

/* event bit */
#define HIDEEP_MT_RELEASED
#define HIDEEP_KEY_PRESSED
#define HIDEEP_KEY_FIRST_PRESSED
#define HIDEEP_KEY_PRESSED_MASK

#define HIDEEP_KEY_IDX_MASK

/* For NVM */
#define HIDEEP_YRAM_BASE
#define HIDEEP_PERIPHERAL_BASE
#define HIDEEP_ESI_BASE
#define HIDEEP_FLASH_BASE
#define HIDEEP_SYSCON_BASE

#define HIDEEP_SYSCON_MOD_CON
#define HIDEEP_SYSCON_SPC_CON
#define HIDEEP_SYSCON_CLK_CON
#define HIDEEP_SYSCON_CLK_ENA
#define HIDEEP_SYSCON_RST_CON
#define HIDEEP_SYSCON_WDT_CON
#define HIDEEP_SYSCON_WDT_CNT
#define HIDEEP_SYSCON_PWR_CON
#define HIDEEP_SYSCON_PGM_ID

#define HIDEEP_FLASH_CON
#define HIDEEP_FLASH_STA
#define HIDEEP_FLASH_CFG
#define HIDEEP_FLASH_TIM
#define HIDEEP_FLASH_CACHE_CFG
#define HIDEEP_FLASH_PIO_SIG

#define HIDEEP_ESI_TX_INVALID

#define HIDEEP_PERASE
#define HIDEEP_WRONLY

#define HIDEEP_NVM_MASK_OFS
#define HIDEEP_NVM_DEFAULT_PAGE
#define HIDEEP_NVM_SFR_WPAGE
#define HIDEEP_NVM_SFR_RPAGE

#define HIDEEP_PIO_SIG
#define HIDEEP_PROT_MODE

#define HIDEEP_NVM_PAGE_SIZE

#define HIDEEP_DWZ_INFO

struct hideep_event {};

struct dwz_info {};

struct pgm_packet {};

#define HIDEEP_XFER_BUF_SIZE

struct hideep_ts {};

static int hideep_pgm_w_mem(struct hideep_ts *ts, u32 addr,
			    const __be32 *data, size_t count)
{}

static int hideep_pgm_r_mem(struct hideep_ts *ts, u32 addr,
			    __be32 *data, size_t count)
{}

static int hideep_pgm_r_reg(struct hideep_ts *ts, u32 addr, u32 *val)
{}

static int hideep_pgm_w_reg(struct hideep_ts *ts, u32 addr, u32 val)
{}

#define SW_RESET_IN_PGM(clk)

#define SET_FLASH_PIO(ce)

#define SET_PIO_SIG(x, y)

#define SET_FLASH_HWCONTROL()

#define NVM_W_SFR(x, y)

static void hideep_pgm_set(struct hideep_ts *ts)
{}

static int hideep_pgm_get_pattern(struct hideep_ts *ts, u32 *pattern)
{}

static int hideep_enter_pgm(struct hideep_ts *ts)
{}

static int hideep_nvm_unlock(struct hideep_ts *ts)
{}

static int hideep_check_status(struct hideep_ts *ts)
{}

static int hideep_program_page(struct hideep_ts *ts, u32 addr,
			       const __be32 *ucode, size_t xfer_count)
{}

static int hideep_program_nvm(struct hideep_ts *ts,
			      const __be32 *ucode, size_t ucode_len)
{}

static int hideep_verify_nvm(struct hideep_ts *ts,
			     const __be32 *ucode, size_t ucode_len)
{}

static int hideep_load_dwz(struct hideep_ts *ts)
{}

static int hideep_flash_firmware(struct hideep_ts *ts,
				 const __be32 *ucode, size_t ucode_len)
{}

static int hideep_update_firmware(struct hideep_ts *ts,
				  const __be32 *ucode, size_t ucode_len)
{}

static int hideep_power_on(struct hideep_ts *ts)
{}

static void hideep_power_off(void *data)
{}

#define __GET_MT_TOOL_TYPE(type)

static void hideep_report_slot(struct input_dev *input,
			       const struct hideep_event *event)
{}

static void hideep_parse_and_report(struct hideep_ts *ts)
{}

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

static int hideep_get_axis_info(struct hideep_ts *ts)
{}

static int hideep_init_input(struct hideep_ts *ts)
{}

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

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

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

static DEVICE_ATTR(version, 0664, hideep_fw_version_show, NULL);
static DEVICE_ATTR(product_id, 0664, hideep_product_id_show, NULL);
static DEVICE_ATTR(update_fw, 0664, NULL, hideep_update_fw);

static struct attribute *hideep_ts_attrs[] =;
ATTRIBUTE_GROUPS();

static void hideep_set_work_mode(struct hideep_ts *ts)
{}

static int hideep_suspend(struct device *dev)
{}

static int hideep_resume(struct device *dev)
{}

static DEFINE_SIMPLE_DEV_PM_OPS(hideep_pm_ops, hideep_suspend, hideep_resume);

static const struct regmap_config hideep_regmap_config =;

static int hideep_probe(struct i2c_client *client)
{}

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

#ifdef CONFIG_ACPI
static const struct acpi_device_id hideep_acpi_id[] =;
MODULE_DEVICE_TABLE(acpi, hideep_acpi_id);
#endif

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

static struct i2c_driver hideep_driver =;

module_i2c_driver();

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