Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
lpc32xx_adc.c File Reference
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/io.h>
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/completion.h>
#include <linux/of.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>

Go to the source code of this file.

Data Structures

struct  lpc32xx_adc_info
 

Macros

#define LPC32XX_ADC_SELECT(x)   ((x) + 0x04)
 
#define LPC32XX_ADC_CTRL(x)   ((x) + 0x08)
 
#define LPC32XX_ADC_VALUE(x)   ((x) + 0x48)
 
#define AD_REFm   0x00000200 /* constant, always write this value! */
 
#define AD_REFp   0x00000080 /* constant, always write this value! */
 
#define AD_IN   0x00000010 /* multiple of this is the */
 
#define AD_INTERNAL   0x00000004 /* constant, always write this value! */
 
#define AD_STROBE   0x00000002
 
#define AD_PDN_CTRL   0x00000004
 
#define ADC_VALUE_MASK   0x000003FF
 
#define MOD_NAME   "lpc32xx-adc"
 
#define LPC32XX_ADC_CHANNEL(_index)
 

Functions

 module_platform_driver (lpc32xx_adc_driver)
 
 MODULE_AUTHOR ("Roland Stigge <[email protected]>")
 
 MODULE_DESCRIPTION ("LPC32XX ADC driver")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define AD_IN   0x00000010 /* multiple of this is the */

Definition at line 48 of file lpc32xx_adc.c.

#define AD_INTERNAL   0x00000004 /* constant, always write this value! */

Definition at line 50 of file lpc32xx_adc.c.

#define AD_PDN_CTRL   0x00000004

Definition at line 54 of file lpc32xx_adc.c.

#define AD_REFm   0x00000200 /* constant, always write this value! */

Definition at line 46 of file lpc32xx_adc.c.

#define AD_REFp   0x00000080 /* constant, always write this value! */

Definition at line 47 of file lpc32xx_adc.c.

#define AD_STROBE   0x00000002

Definition at line 53 of file lpc32xx_adc.c.

#define ADC_VALUE_MASK   0x000003FF

Definition at line 57 of file lpc32xx_adc.c.

#define LPC32XX_ADC_CHANNEL (   _index)
Value:
{ \
.type = IIO_VOLTAGE, \
.indexed = 1, \
.channel = _index, \
.address = AD_IN * _index, \
.scan_index = _index, \
}

Definition at line 102 of file lpc32xx_adc.c.

#define LPC32XX_ADC_CTRL (   x)    ((x) + 0x08)

Definition at line 42 of file lpc32xx_adc.c.

#define LPC32XX_ADC_SELECT (   x)    ((x) + 0x04)

Definition at line 41 of file lpc32xx_adc.c.

#define LPC32XX_ADC_VALUE (   x)    ((x) + 0x48)

Definition at line 43 of file lpc32xx_adc.c.

#define MOD_NAME   "lpc32xx-adc"

Definition at line 59 of file lpc32xx_adc.c.

Function Documentation

MODULE_AUTHOR ( "Roland Stigge <[email protected]>"  )
MODULE_DESCRIPTION ( "LPC32XX ADC driver )
MODULE_LICENSE ( "GPL"  )
module_platform_driver ( lpc32xx_adc_driver  )