Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions
lis3l02dq_core.c File Reference
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/gpio.h>
#include <linux/mutex.h>
#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/spi/spi.h>
#include <linux/slab.h>
#include <linux/sysfs.h>
#include <linux/module.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/iio/events.h>
#include <linux/iio/buffer.h>
#include "lis3l02dq.h"

Go to the source code of this file.

Macros

#define LIS3L02DQ_INFO_MASK
 
#define LIS3L02DQ_EVENT_MASK
 
#define LIS3L02DQ_CHAN(index, mod)
 

Enumerations

enum  lis3l02dq_rm_ind { LIS3L02DQ_ACCEL, LIS3L02DQ_GAIN, LIS3L02DQ_BIAS }
 

Functions

int lis3l02dq_spi_read_reg_8 (struct iio_dev *indio_dev, u8 reg_address, u8 *val)
 
int lis3l02dq_spi_write_reg_8 (struct iio_dev *indio_dev, u8 reg_address, u8 val)
 
int lis3l02dq_disable_all_events (struct iio_dev *indio_dev)
 
 module_spi_driver (lis3l02dq_driver)
 
 MODULE_AUTHOR ("Jonathan Cameron <[email protected]>")
 
 MODULE_DESCRIPTION ("ST LIS3L02DQ Accelerometer SPI driver")
 
 MODULE_LICENSE ("GPL v2")
 
 MODULE_ALIAS ("spi:lis3l02dq")
 

Macro Definition Documentation

#define LIS3L02DQ_CHAN (   index,
  mod 
)
Value:
{ \
.type = IIO_ACCEL, \
.modified = 1, \
.channel2 = mod, \
.info_mask = LIS3L02DQ_INFO_MASK, \
.address = index, \
.scan_index = index, \
.scan_type = { \
.sign = 's', \
.realbits = 12, \
.storagebits = 16, \
}, \
.event_mask = LIS3L02DQ_EVENT_MASK, \
}

Definition at line 525 of file lis3l02dq_core.c.

#define LIS3L02DQ_EVENT_MASK
#define LIS3L02DQ_INFO_MASK
Value:
IIO_CHAN_INFO_SCALE_SHARED_BIT | \
IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT | \
IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT)

Definition at line 515 of file lis3l02dq_core.c.

Enumeration Type Documentation

Enumerator:
LIS3L02DQ_ACCEL 
LIS3L02DQ_GAIN 
LIS3L02DQ_BIAS 

Definition at line 185 of file lis3l02dq_core.c.

Function Documentation

int lis3l02dq_disable_all_events ( struct iio_dev indio_dev)

Definition at line 567 of file lis3l02dq_core.c.

int lis3l02dq_spi_read_reg_8 ( struct iio_dev indio_dev,
u8  reg_address,
u8 val 
)

lis3l02dq_spi_read_reg_8() - read single byte from a single register : iio_dev for this actual device : the address of the register to be read : pass back the resulting value

Definition at line 51 of file lis3l02dq_core.c.

int lis3l02dq_spi_write_reg_8 ( struct iio_dev indio_dev,
u8  reg_address,
u8  val 
)

lis3l02dq_spi_write_reg_8() - write single byte to a register : iio_dev for this device : the address of the register to be written : the value to write

Definition at line 83 of file lis3l02dq_core.c.

MODULE_ALIAS ( "spi:lis3l02dq"  )
MODULE_AUTHOR ( "Jonathan Cameron <[email protected]>"  )
MODULE_DESCRIPTION ( "ST LIS3L02DQ Accelerometer SPI driver )
MODULE_LICENSE ( "GPL v2 )
module_spi_driver ( lis3l02dq_driver  )