Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
as5011.c File Reference
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/input.h>
#include <linux/gpio.h>
#include <linux/delay.h>
#include <linux/input/as5011.h>
#include <linux/slab.h>
#include <linux/module.h>

Go to the source code of this file.

Data Structures

struct  as5011_device
 

Macros

#define DRIVER_DESC   "Driver for Austria Microsystems AS5011 joystick"
 
#define MODULE_DEVICE_ALIAS   "as5011"
 
#define AS5011_CTRL1   0x76
 
#define AS5011_CTRL2   0x75
 
#define AS5011_XP   0x43
 
#define AS5011_XN   0x44
 
#define AS5011_YP   0x53
 
#define AS5011_YN   0x54
 
#define AS5011_X_REG   0x41
 
#define AS5011_Y_REG   0x42
 
#define AS5011_X_RES_INT   0x51
 
#define AS5011_Y_RES_INT   0x52
 
#define AS5011_CTRL1_LP_PULSED   0x80
 
#define AS5011_CTRL1_LP_ACTIVE   0x40
 
#define AS5011_CTRL1_LP_CONTINUE   0x20
 
#define AS5011_CTRL1_INT_WUP_EN   0x10
 
#define AS5011_CTRL1_INT_ACT_EN   0x08
 
#define AS5011_CTRL1_EXT_CLK_EN   0x04
 
#define AS5011_CTRL1_SOFT_RST   0x02
 
#define AS5011_CTRL1_DATA_VALID   0x01
 
#define AS5011_CTRL2_EXT_SAMPLE_EN   0x08
 
#define AS5011_CTRL2_RC_BIAS_ON   0x04
 
#define AS5011_CTRL2_INV_SPINNING   0x02
 
#define AS5011_MAX_AXIS   80
 
#define AS5011_MIN_AXIS   (-80)
 
#define AS5011_FUZZ   8
 
#define AS5011_FLAT   40
 

Functions

 MODULE_AUTHOR ("Fabien Marteau <[email protected]>")
 
 MODULE_DESCRIPTION (DRIVER_DESC)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DEVICE_TABLE (i2c, as5011_id)
 
 module_i2c_driver (as5011_driver)
 

Macro Definition Documentation

#define AS5011_CTRL1   0x76

Definition at line 43 of file as5011.c.

#define AS5011_CTRL1_DATA_VALID   0x01

Definition at line 62 of file as5011.c.

#define AS5011_CTRL1_EXT_CLK_EN   0x04

Definition at line 60 of file as5011.c.

#define AS5011_CTRL1_INT_ACT_EN   0x08

Definition at line 59 of file as5011.c.

#define AS5011_CTRL1_INT_WUP_EN   0x10

Definition at line 58 of file as5011.c.

#define AS5011_CTRL1_LP_ACTIVE   0x40

Definition at line 56 of file as5011.c.

#define AS5011_CTRL1_LP_CONTINUE   0x20

Definition at line 57 of file as5011.c.

#define AS5011_CTRL1_LP_PULSED   0x80

Definition at line 55 of file as5011.c.

#define AS5011_CTRL1_SOFT_RST   0x02

Definition at line 61 of file as5011.c.

#define AS5011_CTRL2   0x75

Definition at line 44 of file as5011.c.

#define AS5011_CTRL2_EXT_SAMPLE_EN   0x08

Definition at line 65 of file as5011.c.

#define AS5011_CTRL2_INV_SPINNING   0x02

Definition at line 67 of file as5011.c.

#define AS5011_CTRL2_RC_BIAS_ON   0x04

Definition at line 66 of file as5011.c.

#define AS5011_FLAT   40

Definition at line 72 of file as5011.c.

#define AS5011_FUZZ   8

Definition at line 71 of file as5011.c.

#define AS5011_MAX_AXIS   80

Definition at line 69 of file as5011.c.

#define AS5011_MIN_AXIS   (-80)

Definition at line 70 of file as5011.c.

#define AS5011_X_REG   0x41

Definition at line 49 of file as5011.c.

#define AS5011_X_RES_INT   0x51

Definition at line 51 of file as5011.c.

#define AS5011_XN   0x44

Definition at line 46 of file as5011.c.

#define AS5011_XP   0x43

Definition at line 45 of file as5011.c.

#define AS5011_Y_REG   0x42

Definition at line 50 of file as5011.c.

#define AS5011_Y_RES_INT   0x52

Definition at line 52 of file as5011.c.

#define AS5011_YN   0x54

Definition at line 48 of file as5011.c.

#define AS5011_YP   0x53

Definition at line 47 of file as5011.c.

#define DRIVER_DESC   "Driver for Austria Microsystems AS5011 joystick"

Definition at line 35 of file as5011.c.

#define MODULE_DEVICE_ALIAS   "as5011"

Definition at line 36 of file as5011.c.

Function Documentation

MODULE_AUTHOR ( "Fabien Marteau <[email protected]>"  )
MODULE_DESCRIPTION ( DRIVER_DESC  )
MODULE_DEVICE_TABLE ( i2c  ,
as5011_id   
)
module_i2c_driver ( as5011_driver  )
MODULE_LICENSE ( "GPL"  )