Linux Kernel
3.7.1
|
#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/input-polldev.h>
#include <linux/delay.h>
#include <linux/wait.h>
#include <linux/poll.h>
#include <linux/slab.h>
#include <linux/freezer.h>
#include <linux/uaccess.h>
#include <linux/miscdevice.h>
#include <linux/pm_runtime.h>
#include <linux/atomic.h>
#include <linux/of_device.h>
#include "lis3lv02d.h"
Go to the source code of this file.
Macros | |
#define | pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
#define | DRIVER_NAME "lis3lv02d" |
#define | MDPS_POLL_INTERVAL 50 |
#define | MDPS_POLL_MIN 0 |
#define | MDPS_POLL_MAX 2000 |
#define | LIS3_SYSFS_POWERDOWN_DELAY 5000 /* In milliseconds */ |
#define | SELFTEST_OK 0 |
#define | SELFTEST_FAIL -1 |
#define | SELFTEST_IRQ -2 |
#define | IRQ_LINE0 0 |
#define | IRQ_LINE1 1 |
#define | LIS3_PWRON_DELAY_WAI_12B (5000) |
#define | LIS3_PWRON_DELAY_WAI_8B (3000) |
#define | LIS3_ACCURACY 1024 |
#define | LIS3_SENSITIVITY_12B ((LIS3_ACCURACY * 1000) / 1024) |
#define | LIS3_SENSITIVITY_8B (18 * LIS3_ACCURACY) |
#define | LIS3DLH_SENSITIVITY_2G ((LIS3_ACCURACY * 1000) / 1024) |
#define | SHIFT_ADJ_2G 4 |
#define | LIS3_DEFAULT_FUZZ_12B 3 |
#define | LIS3_DEFAULT_FLAT_12B 3 |
#define | LIS3_DEFAULT_FUZZ_8B 1 |
#define | LIS3_DEFAULT_FLAT_8B 1 |
#define | param_check_axis(name, p) param_check_int(name, p) |
Functions | |
EXPORT_SYMBOL_GPL (lis3_dev) | |
module_param_array_named (axes, lis3_dev.ac.as_array, axis, NULL, 0644) | |
MODULE_PARM_DESC (axes,"Axis-mapping for x,y,z directions") | |
void | lis3lv02d_poweroff (struct lis3lv02d *lis3) |
EXPORT_SYMBOL_GPL (lis3lv02d_poweroff) | |
int | lis3lv02d_poweron (struct lis3lv02d *lis3) |
EXPORT_SYMBOL_GPL (lis3lv02d_poweron) | |
int | lis3lv02d_joystick_enable (struct lis3lv02d *lis3) |
EXPORT_SYMBOL_GPL (lis3lv02d_joystick_enable) | |
void | lis3lv02d_joystick_disable (struct lis3lv02d *lis3) |
EXPORT_SYMBOL_GPL (lis3lv02d_joystick_disable) | |
int | lis3lv02d_remove_fs (struct lis3lv02d *lis3) |
EXPORT_SYMBOL_GPL (lis3lv02d_remove_fs) | |
int | lis3lv02d_init_dt (struct lis3lv02d *lis3) |
EXPORT_SYMBOL_GPL (lis3lv02d_init_dt) | |
int | lis3lv02d_init_device (struct lis3lv02d *lis3) |
EXPORT_SYMBOL_GPL (lis3lv02d_init_device) | |
MODULE_DESCRIPTION ("ST LIS3LV02Dx three-axis digital accelerometer driver") | |
MODULE_AUTHOR ("Yan Burman, Eric Piel, Pavel Machek") | |
MODULE_LICENSE ("GPL") | |
Variables | |
struct lis3lv02d | lis3_dev |
#define DRIVER_NAME "lis3lv02d" |
Definition at line 45 of file lis3lv02d.c.
#define IRQ_LINE0 0 |
Definition at line 58 of file lis3lv02d.c.
#define IRQ_LINE1 1 |
Definition at line 59 of file lis3lv02d.c.
#define LIS3_ACCURACY 1024 |
Definition at line 79 of file lis3lv02d.c.
#define LIS3_DEFAULT_FLAT_12B 3 |
Definition at line 94 of file lis3lv02d.c.
#define LIS3_DEFAULT_FLAT_8B 1 |
Definition at line 96 of file lis3lv02d.c.
#define LIS3_DEFAULT_FUZZ_12B 3 |
Definition at line 93 of file lis3lv02d.c.
#define LIS3_DEFAULT_FUZZ_8B 1 |
Definition at line 95 of file lis3lv02d.c.
#define LIS3_PWRON_DELAY_WAI_12B (5000) |
Definition at line 70 of file lis3lv02d.c.
#define LIS3_PWRON_DELAY_WAI_8B (3000) |
Definition at line 71 of file lis3lv02d.c.
#define LIS3_SENSITIVITY_12B ((LIS3_ACCURACY * 1000) / 1024) |
Definition at line 81 of file lis3lv02d.c.
#define LIS3_SENSITIVITY_8B (18 * LIS3_ACCURACY) |
Definition at line 82 of file lis3lv02d.c.
#define LIS3_SYSFS_POWERDOWN_DELAY 5000 /* In milliseconds */ |
Definition at line 52 of file lis3lv02d.c.
#define LIS3DLH_SENSITIVITY_2G ((LIS3_ACCURACY * 1000) / 1024) |
Definition at line 90 of file lis3lv02d.c.
#define MDPS_POLL_INTERVAL 50 |
Definition at line 48 of file lis3lv02d.c.
#define MDPS_POLL_MAX 2000 |
Definition at line 50 of file lis3lv02d.c.
#define MDPS_POLL_MIN 0 |
Definition at line 49 of file lis3lv02d.c.
#define param_check_axis | ( | name, | |
p | |||
) | param_check_int(name, p) |
Definition at line 124 of file lis3lv02d.c.
Definition at line 23 of file lis3lv02d.c.
#define SELFTEST_FAIL -1 |
Definition at line 55 of file lis3lv02d.c.
#define SELFTEST_IRQ -2 |
Definition at line 56 of file lis3lv02d.c.
#define SELFTEST_OK 0 |
Definition at line 54 of file lis3lv02d.c.
#define SHIFT_ADJ_2G 4 |
Definition at line 91 of file lis3lv02d.c.
EXPORT_SYMBOL_GPL | ( | lis3_dev | ) |
EXPORT_SYMBOL_GPL | ( | lis3lv02d_poweroff | ) |
EXPORT_SYMBOL_GPL | ( | lis3lv02d_poweron | ) |
EXPORT_SYMBOL_GPL | ( | lis3lv02d_joystick_enable | ) |
EXPORT_SYMBOL_GPL | ( | lis3lv02d_joystick_disable | ) |
EXPORT_SYMBOL_GPL | ( | lis3lv02d_remove_fs | ) |
EXPORT_SYMBOL_GPL | ( | lis3lv02d_init_dt | ) |
EXPORT_SYMBOL_GPL | ( | lis3lv02d_init_device | ) |
Definition at line 1099 of file lis3lv02d.c.
Definition at line 1088 of file lis3lv02d.c.
Definition at line 743 of file lis3lv02d.c.
Definition at line 684 of file lis3lv02d.c.
Definition at line 397 of file lis3lv02d.c.
Definition at line 408 of file lis3lv02d.c.
Definition at line 873 of file lis3lv02d.c.
MODULE_AUTHOR | ( | "Yan | Burman, |
Eric | Piel, | ||
Pavel Machek" | |||
) |
MODULE_LICENSE | ( | "GPL" | ) |
module_param_array_named | ( | axes | , |
lis3_dev.ac. | as_array, | ||
axis | , | ||
NULL | , | ||
0644 | |||
) |
Definition at line 98 of file lis3lv02d.c.