#define pr_fmt(fmt) …
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/dmi.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/wait.h>
#include <linux/poll.h>
#include <linux/freezer.h>
#include <linux/uaccess.h>
#include <linux/leds.h>
#include <linux/atomic.h>
#include <linux/acpi.h>
#include <linux/i8042.h>
#include <linux/serio.h>
#include "../../../misc/lis3lv02d/lis3lv02d.h"
struct delayed_led_classdev { … };
static inline void delayed_set_status_worker(struct work_struct *work)
{ … }
static inline void delayed_sysfs_set(struct led_classdev *led_cdev,
enum led_brightness brightness)
{ … }
#define ACCEL_1 …
#define ACCEL_2 …
#define ACCEL_3 …
#define ACCEL_4 …
static const struct acpi_device_id lis3lv02d_device_ids[] = …;
MODULE_DEVICE_TABLE(acpi, lis3lv02d_device_ids);
static int lis3lv02d_acpi_init(struct lis3lv02d *lis3)
{ … }
static int lis3lv02d_acpi_read(struct lis3lv02d *lis3, int reg, u8 *ret)
{ … }
static int lis3lv02d_acpi_write(struct lis3lv02d *lis3, int reg, u8 val)
{ … }
static int lis3lv02d_dmi_matched(const struct dmi_system_id *dmi)
{ … }
#define DEFINE_CONV(name, x, y, z) …
DEFINE_CONV(normal, 1, 2, 3);
DEFINE_CONV(y_inverted, 1, -2, 3);
DEFINE_CONV(x_inverted, -1, 2, 3);
DEFINE_CONV(x_inverted_usd, -1, 2, -3);
DEFINE_CONV(z_inverted, 1, 2, -3);
DEFINE_CONV(xy_swap, 2, 1, 3);
DEFINE_CONV(xy_rotated_left, -2, 1, 3);
DEFINE_CONV(xy_rotated_left_usd, -2, 1, -3);
DEFINE_CONV(xy_swap_inverted, -2, -1, 3);
DEFINE_CONV(xy_rotated_right, 2, -1, 3);
DEFINE_CONV(xy_swap_yz_inverted, 2, -1, -3);
#define AXIS_DMI_MATCH(_ident, _name, _axis) …
#define AXIS_DMI_MATCH2(_ident, _class1, _name1, \
_class2, _name2, \
_axis) …
static const struct dmi_system_id lis3lv02d_dmi_ids[] = …;
static void hpled_set(struct delayed_led_classdev *led_cdev, enum led_brightness value)
{ … }
static struct delayed_led_classdev hpled_led = …;
static bool hp_accel_i8042_filter(unsigned char data, unsigned char str,
struct serio *port)
{ … }
static int lis3lv02d_probe(struct platform_device *device)
{ … }
static void lis3lv02d_remove(struct platform_device *device)
{ … }
static int __maybe_unused lis3lv02d_suspend(struct device *dev)
{ … }
static int __maybe_unused lis3lv02d_resume(struct device *dev)
{ … }
static SIMPLE_DEV_PM_OPS(hp_accel_pm, lis3lv02d_suspend, lis3lv02d_resume);
static struct platform_driver lis3lv02d_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;