#include <linux/gpio/consumer.h>
#include <linux/input.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/pwm.h>
#include <linux/regulator/consumer.h>
#include <linux/slab.h>
struct pwm_vibrator { … };
static int pwm_vibrator_start(struct pwm_vibrator *vibrator)
{ … }
static void pwm_vibrator_stop(struct pwm_vibrator *vibrator)
{ … }
static void pwm_vibrator_play_work(struct work_struct *work)
{ … }
static int pwm_vibrator_play_effect(struct input_dev *dev, void *data,
struct ff_effect *effect)
{ … }
static void pwm_vibrator_close(struct input_dev *input)
{ … }
static int pwm_vibrator_probe(struct platform_device *pdev)
{ … }
static int pwm_vibrator_suspend(struct device *dev)
{ … }
static int pwm_vibrator_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(pwm_vibrator_pm_ops,
pwm_vibrator_suspend, pwm_vibrator_resume);
#ifdef CONFIG_OF
static const struct of_device_id pwm_vibra_dt_match_table[] = …;
MODULE_DEVICE_TABLE(of, pwm_vibra_dt_match_table);
#endif
static struct platform_driver pwm_vibrator_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;