Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
jz4740-adc.c File Reference
#include <linux/err.h>
#include <linux/io.h>
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/clk.h>
#include <linux/mfd/core.h>
#include <linux/jz4740-adc.h>

Go to the source code of this file.

Data Structures

struct  jz4740_adc
 

Macros

#define JZ_REG_ADC_ENABLE   0x00
 
#define JZ_REG_ADC_CFG   0x04
 
#define JZ_REG_ADC_CTRL   0x08
 
#define JZ_REG_ADC_STATUS   0x0c
 
#define JZ_REG_ADC_TOUCHSCREEN_BASE   0x10
 
#define JZ_REG_ADC_BATTERY_BASE   0x1c
 
#define JZ_REG_ADC_HWMON_BASE   0x20
 
#define JZ_ADC_ENABLE_TOUCH   BIT(2)
 
#define JZ_ADC_ENABLE_BATTERY   BIT(1)
 
#define JZ_ADC_ENABLE_ADCIN   BIT(0)
 

Enumerations

enum  {
  JZ_ADC_IRQ_ADCIN = 0, JZ_ADC_IRQ_BATTERY, JZ_ADC_IRQ_TOUCH, JZ_ADC_IRQ_PENUP,
  JZ_ADC_IRQ_PENDOWN
}
 

Functions

int jz4740_adc_set_config (struct device *dev, uint32_t mask, uint32_t val)
 
 EXPORT_SYMBOL_GPL (jz4740_adc_set_config)
 
 module_platform_driver (jz4740_adc_driver)
 
 MODULE_DESCRIPTION ("JZ4740 SoC ADC driver")
 
 MODULE_AUTHOR ("Lars-Peter Clausen <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS ("platform:jz4740-adc")
 

Macro Definition Documentation

#define JZ_ADC_ENABLE_ADCIN   BIT(0)

Definition at line 45 of file jz4740-adc.c.

#define JZ_ADC_ENABLE_BATTERY   BIT(1)

Definition at line 44 of file jz4740-adc.c.

#define JZ_ADC_ENABLE_TOUCH   BIT(2)

Definition at line 43 of file jz4740-adc.c.

#define JZ_REG_ADC_BATTERY_BASE   0x1c

Definition at line 40 of file jz4740-adc.c.

#define JZ_REG_ADC_CFG   0x04

Definition at line 35 of file jz4740-adc.c.

#define JZ_REG_ADC_CTRL   0x08

Definition at line 36 of file jz4740-adc.c.

#define JZ_REG_ADC_ENABLE   0x00

Definition at line 34 of file jz4740-adc.c.

#define JZ_REG_ADC_HWMON_BASE   0x20

Definition at line 41 of file jz4740-adc.c.

#define JZ_REG_ADC_STATUS   0x0c

Definition at line 37 of file jz4740-adc.c.

#define JZ_REG_ADC_TOUCHSCREEN_BASE   0x10

Definition at line 39 of file jz4740-adc.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
JZ_ADC_IRQ_ADCIN 
JZ_ADC_IRQ_BATTERY 
JZ_ADC_IRQ_TOUCH 
JZ_ADC_IRQ_PENUP 
JZ_ADC_IRQ_PENDOWN 

Definition at line 47 of file jz4740-adc.c.

Function Documentation

EXPORT_SYMBOL_GPL ( jz4740_adc_set_config  )
int jz4740_adc_set_config ( struct device dev,
uint32_t  mask,
uint32_t  val 
)

Definition at line 136 of file jz4740-adc.c.

MODULE_ALIAS ( "platform:jz4740-adc )
MODULE_AUTHOR ( "Lars-Peter Clausen <[email protected]>"  )
MODULE_DESCRIPTION ( "JZ4740 SoC ADC driver )
MODULE_LICENSE ( "GPL"  )
module_platform_driver ( jz4740_adc_driver  )