#include <linux/input.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_data/regulator-haptic.h>
#include <linux/platform_device.h>
#include <linux/regulator/consumer.h>
#include <linux/slab.h>
#define MAX_MAGNITUDE_SHIFT …
struct regulator_haptic { … };
static int regulator_haptic_toggle(struct regulator_haptic *haptic, bool on)
{ … }
static int regulator_haptic_set_voltage(struct regulator_haptic *haptic,
unsigned int magnitude)
{ … }
static void regulator_haptic_work(struct work_struct *work)
{ … }
static int regulator_haptic_play_effect(struct input_dev *input, void *data,
struct ff_effect *effect)
{ … }
static void regulator_haptic_close(struct input_dev *input)
{ … }
static int __maybe_unused
regulator_haptic_parse_dt(struct device *dev, struct regulator_haptic *haptic)
{ … }
static int regulator_haptic_probe(struct platform_device *pdev)
{ … }
static int regulator_haptic_suspend(struct device *dev)
{ … }
static int regulator_haptic_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(regulator_haptic_pm_ops,
regulator_haptic_suspend, regulator_haptic_resume);
static const struct of_device_id regulator_haptic_dt_match[] = …;
MODULE_DEVICE_TABLE(of, regulator_haptic_dt_match);
static struct platform_driver regulator_haptic_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;