linux/drivers/input/keyboard/qt1050.c

// SPDX-License-Identifier: GPL-2.0
/*
 *  Microchip AT42QT1050 QTouch Sensor Controller
 *
 *  Copyright (C) 2019 Pengutronix, Marco Felsch <[email protected]>
 *
 *  Base on AT42QT1070 driver by:
 *  Bo Shen <[email protected]>
 *  Copyright (C) 2011 Atmel
 */

#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/input.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/log2.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/regmap.h>

/* Chip ID */
#define QT1050_CHIP_ID
#define QT1050_CHIP_ID_VER

/* Firmware version */
#define QT1050_FW_VERSION

/* Detection status */
#define QT1050_DET_STATUS

/* Key status */
#define QT1050_KEY_STATUS

/* Key Signals */
#define QT1050_KEY_SIGNAL_0_MSB
#define QT1050_KEY_SIGNAL_0_LSB
#define QT1050_KEY_SIGNAL_1_MSB
#define QT1050_KEY_SIGNAL_1_LSB
#define QT1050_KEY_SIGNAL_2_MSB
#define QT1050_KEY_SIGNAL_2_LSB
#define QT1050_KEY_SIGNAL_3_MSB
#define QT1050_KEY_SIGNAL_3_LSB
#define QT1050_KEY_SIGNAL_4_MSB
#define QT1050_KEY_SIGNAL_4_LSB

/* Reference data */
#define QT1050_REF_DATA_0_MSB
#define QT1050_REF_DATA_0_LSB
#define QT1050_REF_DATA_1_MSB
#define QT1050_REF_DATA_1_LSB
#define QT1050_REF_DATA_2_MSB
#define QT1050_REF_DATA_2_LSB
#define QT1050_REF_DATA_3_MSB
#define QT1050_REF_DATA_3_LSB
#define QT1050_REF_DATA_4_MSB
#define QT1050_REF_DATA_4_LSB

/* Negative threshold level */
#define QT1050_NTHR_0
#define QT1050_NTHR_1
#define QT1050_NTHR_2
#define QT1050_NTHR_3
#define QT1050_NTHR_4

/* Pulse / Scale  */
#define QT1050_PULSE_SCALE_0
#define QT1050_PULSE_SCALE_1
#define QT1050_PULSE_SCALE_2
#define QT1050_PULSE_SCALE_3
#define QT1050_PULSE_SCALE_4

/* Detection integrator counter / AKS */
#define QT1050_DI_AKS_0
#define QT1050_DI_AKS_1
#define QT1050_DI_AKS_2
#define QT1050_DI_AKS_3
#define QT1050_DI_AKS_4

/* Charge Share Delay */
#define QT1050_CSD_0
#define QT1050_CSD_1
#define QT1050_CSD_2
#define QT1050_CSD_3
#define QT1050_CSD_4

/* Low Power Mode */
#define QT1050_LPMODE

/* Calibration and Reset */
#define QT1050_RES_CAL
#define QT1050_RES_CAL_RESET
#define QT1050_RES_CAL_CALIBRATE

#define QT1050_MAX_KEYS
#define QT1050_RESET_TIME

struct qt1050_key_regs {};

struct qt1050_key {};

struct qt1050_priv {};

static const struct qt1050_key_regs qt1050_key_regs_data[] =;

static bool qt1050_volatile_reg(struct device *dev, unsigned int reg)
{}

static const struct regmap_range qt1050_readable_ranges[] =;

static const struct regmap_access_table qt1050_readable_table =;

static const struct regmap_range qt1050_writeable_ranges[] =;

static const struct regmap_access_table qt1050_writeable_table =;

static const struct regmap_config qt1050_regmap_config =;

static bool qt1050_identify(struct qt1050_priv *ts)
{}

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

static const struct qt1050_key_regs *qt1050_get_key_regs(int key_num)
{}

static int qt1050_set_key(struct regmap *map, int number, int on)
{}

static int qt1050_apply_fw_data(struct qt1050_priv *ts)
{}

static int qt1050_parse_fw(struct qt1050_priv *ts)
{}

static int qt1050_probe(struct i2c_client *client)
{}

static int qt1050_suspend(struct device *dev)
{}

static int qt1050_resume(struct device *dev)
{}

static DEFINE_SIMPLE_DEV_PM_OPS(qt1050_pm_ops, qt1050_suspend, qt1050_resume);

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

static struct i2c_driver qt1050_driver =;

module_i2c_driver();

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