#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/i2c.h>
#include <linux/input.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/leds.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/pm.h>
#include <linux/regulator/consumer.h>
#define TM2_TOUCHKEY_DEV_NAME …
#define ARIES_TOUCHKEY_CMD_LED_ON …
#define ARIES_TOUCHKEY_CMD_LED_OFF …
#define TM2_TOUCHKEY_CMD_LED_ON …
#define TM2_TOUCHKEY_CMD_LED_OFF …
#define TM2_TOUCHKEY_BIT_PRESS_EV …
#define TM2_TOUCHKEY_BIT_KEYCODE …
#define TM2_TOUCHKEY_LED_VOLTAGE_MIN …
#define TM2_TOUCHKEY_LED_VOLTAGE_MAX …
struct touchkey_variant { … };
struct tm2_touchkey_data { … };
static const struct touchkey_variant tm2_touchkey_variant = …;
static const struct touchkey_variant midas_touchkey_variant = …;
static struct touchkey_variant aries_touchkey_variant = …;
static const struct touchkey_variant tc360_touchkey_variant = …;
static int tm2_touchkey_led_brightness_set(struct led_classdev *led_dev,
enum led_brightness brightness)
{ … }
static int tm2_touchkey_power_enable(struct tm2_touchkey_data *touchkey)
{ … }
static void tm2_touchkey_power_disable(void *data)
{ … }
static irqreturn_t tm2_touchkey_irq_handler(int irq, void *devid)
{ … }
static int tm2_touchkey_probe(struct i2c_client *client)
{ … }
static int tm2_touchkey_suspend(struct device *dev)
{ … }
static int tm2_touchkey_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(tm2_touchkey_pm_ops,
tm2_touchkey_suspend, tm2_touchkey_resume);
static const struct i2c_device_id tm2_touchkey_id_table[] = …;
MODULE_DEVICE_TABLE(i2c, tm2_touchkey_id_table);
static const struct of_device_id tm2_touchkey_of_match[] = …;
MODULE_DEVICE_TABLE(of, tm2_touchkey_of_match);
static struct i2c_driver tm2_touchkey_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;