linux/drivers/input/misc/drv2665.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * DRV2665 haptics driver family
 *
 * Author: Dan Murphy <[email protected]>
 *
 * Copyright: (C) 2015 Texas Instruments, Inc.
 */

#include <linux/i2c.h>
#include <linux/input.h>
#include <linux/module.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/regulator/consumer.h>

/* Contol registers */
#define DRV2665_STATUS
#define DRV2665_CTRL_1
#define DRV2665_CTRL_2
#define DRV2665_FIFO

/* Status Register */
#define DRV2665_FIFO_FULL
#define DRV2665_FIFO_EMPTY

/* Control 1 Register */
#define DRV2665_25_VPP_GAIN
#define DRV2665_50_VPP_GAIN
#define DRV2665_75_VPP_GAIN
#define DRV2665_100_VPP_GAIN
#define DRV2665_DIGITAL_IN
#define DRV2665_ANALOG_IN

/* Control 2 Register */
#define DRV2665_BOOST_EN
#define DRV2665_STANDBY
#define DRV2665_DEV_RST
#define DRV2665_5_MS_IDLE_TOUT
#define DRV2665_10_MS_IDLE_TOUT
#define DRV2665_15_MS_IDLE_TOUT
#define DRV2665_20_MS_IDLE_TOUT

/**
 * struct drv2665_data -
 * @input_dev: Pointer to the input device
 * @client: Pointer to the I2C client
 * @regmap: Register map of the device
 * @work: Work item used to off load the enable/disable of the vibration
 * @regulator: Pointer to the regulator for the IC
 */
struct drv2665_data {};

/* 8kHz Sine wave to stream to the FIFO */
static const u8 drv2665_sine_wave_form[] =;

static const struct reg_default drv2665_reg_defs[] =;

static void drv2665_worker(struct work_struct *work)
{}

static int drv2665_haptics_play(struct input_dev *input, void *data,
				struct ff_effect *effect)
{}

static void drv2665_close(struct input_dev *input)
{}

static const struct reg_sequence drv2665_init_regs[] =;

static int drv2665_init(struct drv2665_data *haptics)
{}

static const struct regmap_config drv2665_regmap_config =;

static int drv2665_probe(struct i2c_client *client)
{}

static int drv2665_suspend(struct device *dev)
{}

static int drv2665_resume(struct device *dev)
{}

static DEFINE_SIMPLE_DEV_PM_OPS(drv2665_pm_ops, drv2665_suspend, drv2665_resume);

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

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

static struct i2c_driver drv2665_driver =;
module_i2c_driver();

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