Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
ucb1400.h File Reference
#include <sound/ac97_codec.h>
#include <linux/mutex.h>
#include <linux/platform_device.h>
#include <linux/gpio.h>

Go to the source code of this file.

Data Structures

struct  ucb1400_gpio_data
 
struct  ucb1400_gpio
 
struct  ucb1400_ts
 
struct  ucb1400
 
struct  ucb1400_pdata
 

Macros

#define UCB_IO_DATA   0x5a
 
#define UCB_IO_DIR   0x5c
 
#define UCB_IE_RIS   0x5e
 
#define UCB_IE_FAL   0x60
 
#define UCB_IE_STATUS   0x62
 
#define UCB_IE_CLEAR   0x62
 
#define UCB_IE_ADC   (1 << 11)
 
#define UCB_IE_TSPX   (1 << 12)
 
#define UCB_TS_CR   0x64
 
#define UCB_TS_CR_TSMX_POW   (1 << 0)
 
#define UCB_TS_CR_TSPX_POW   (1 << 1)
 
#define UCB_TS_CR_TSMY_POW   (1 << 2)
 
#define UCB_TS_CR_TSPY_POW   (1 << 3)
 
#define UCB_TS_CR_TSMX_GND   (1 << 4)
 
#define UCB_TS_CR_TSPX_GND   (1 << 5)
 
#define UCB_TS_CR_TSMY_GND   (1 << 6)
 
#define UCB_TS_CR_TSPY_GND   (1 << 7)
 
#define UCB_TS_CR_MODE_INT   (0 << 8)
 
#define UCB_TS_CR_MODE_PRES   (1 << 8)
 
#define UCB_TS_CR_MODE_POS   (2 << 8)
 
#define UCB_TS_CR_BIAS_ENA   (1 << 11)
 
#define UCB_TS_CR_TSPX_LOW   (1 << 12)
 
#define UCB_TS_CR_TSMX_LOW   (1 << 13)
 
#define UCB_ADC_CR   0x66
 
#define UCB_ADC_SYNC_ENA   (1 << 0)
 
#define UCB_ADC_VREFBYP_CON   (1 << 1)
 
#define UCB_ADC_INP_TSPX   (0 << 2)
 
#define UCB_ADC_INP_TSMX   (1 << 2)
 
#define UCB_ADC_INP_TSPY   (2 << 2)
 
#define UCB_ADC_INP_TSMY   (3 << 2)
 
#define UCB_ADC_INP_AD0   (4 << 2)
 
#define UCB_ADC_INP_AD1   (5 << 2)
 
#define UCB_ADC_INP_AD2   (6 << 2)
 
#define UCB_ADC_INP_AD3   (7 << 2)
 
#define UCB_ADC_EXT_REF   (1 << 5)
 
#define UCB_ADC_START   (1 << 7)
 
#define UCB_ADC_ENA   (1 << 15)
 
#define UCB_ADC_DATA   0x68
 
#define UCB_ADC_DAT_VALID   (1 << 15)
 
#define UCB_FCSR   0x6c
 
#define UCB_FCSR_AVE   (1 << 12)
 
#define UCB_ADC_DAT_MASK   0x3ff
 
#define UCB_ID   0x7e
 
#define UCB_ID_1400   0x4304
 

Functions

unsigned int ucb1400_adc_read (struct snd_ac97 *ac97, u16 adc_channel, int adcsync)
 

Macro Definition Documentation

#define UCB_ADC_CR   0x66

Definition at line 60 of file ucb1400.h.

#define UCB_ADC_DAT_MASK   0x3ff

Definition at line 81 of file ucb1400.h.

#define UCB_ADC_DAT_VALID   (1 << 15)

Definition at line 76 of file ucb1400.h.

#define UCB_ADC_DATA   0x68

Definition at line 75 of file ucb1400.h.

#define UCB_ADC_ENA   (1 << 15)

Definition at line 73 of file ucb1400.h.

#define UCB_ADC_EXT_REF   (1 << 5)

Definition at line 71 of file ucb1400.h.

#define UCB_ADC_INP_AD0   (4 << 2)

Definition at line 67 of file ucb1400.h.

#define UCB_ADC_INP_AD1   (5 << 2)

Definition at line 68 of file ucb1400.h.

#define UCB_ADC_INP_AD2   (6 << 2)

Definition at line 69 of file ucb1400.h.

#define UCB_ADC_INP_AD3   (7 << 2)

Definition at line 70 of file ucb1400.h.

#define UCB_ADC_INP_TSMX   (1 << 2)

Definition at line 64 of file ucb1400.h.

#define UCB_ADC_INP_TSMY   (3 << 2)

Definition at line 66 of file ucb1400.h.

#define UCB_ADC_INP_TSPX   (0 << 2)

Definition at line 63 of file ucb1400.h.

#define UCB_ADC_INP_TSPY   (2 << 2)

Definition at line 65 of file ucb1400.h.

#define UCB_ADC_START   (1 << 7)

Definition at line 72 of file ucb1400.h.

#define UCB_ADC_SYNC_ENA   (1 << 0)

Definition at line 61 of file ucb1400.h.

#define UCB_ADC_VREFBYP_CON   (1 << 1)

Definition at line 62 of file ucb1400.h.

#define UCB_FCSR   0x6c

Definition at line 78 of file ucb1400.h.

#define UCB_FCSR_AVE   (1 << 12)

Definition at line 79 of file ucb1400.h.

#define UCB_ID   0x7e

Definition at line 83 of file ucb1400.h.

#define UCB_ID_1400   0x4304

Definition at line 84 of file ucb1400.h.

#define UCB_IE_ADC   (1 << 11)

Definition at line 41 of file ucb1400.h.

#define UCB_IE_CLEAR   0x62

Definition at line 40 of file ucb1400.h.

#define UCB_IE_FAL   0x60

Definition at line 38 of file ucb1400.h.

#define UCB_IE_RIS   0x5e

Definition at line 37 of file ucb1400.h.

#define UCB_IE_STATUS   0x62

Definition at line 39 of file ucb1400.h.

#define UCB_IE_TSPX   (1 << 12)

Definition at line 42 of file ucb1400.h.

#define UCB_IO_DATA   0x5a

Definition at line 35 of file ucb1400.h.

#define UCB_IO_DIR   0x5c

Definition at line 36 of file ucb1400.h.

#define UCB_TS_CR   0x64

Definition at line 44 of file ucb1400.h.

#define UCB_TS_CR_BIAS_ENA   (1 << 11)

Definition at line 56 of file ucb1400.h.

#define UCB_TS_CR_MODE_INT   (0 << 8)

Definition at line 53 of file ucb1400.h.

#define UCB_TS_CR_MODE_POS   (2 << 8)

Definition at line 55 of file ucb1400.h.

#define UCB_TS_CR_MODE_PRES   (1 << 8)

Definition at line 54 of file ucb1400.h.

#define UCB_TS_CR_TSMX_GND   (1 << 4)

Definition at line 49 of file ucb1400.h.

#define UCB_TS_CR_TSMX_LOW   (1 << 13)

Definition at line 58 of file ucb1400.h.

#define UCB_TS_CR_TSMX_POW   (1 << 0)

Definition at line 45 of file ucb1400.h.

#define UCB_TS_CR_TSMY_GND   (1 << 6)

Definition at line 51 of file ucb1400.h.

#define UCB_TS_CR_TSMY_POW   (1 << 2)

Definition at line 47 of file ucb1400.h.

#define UCB_TS_CR_TSPX_GND   (1 << 5)

Definition at line 50 of file ucb1400.h.

#define UCB_TS_CR_TSPX_LOW   (1 << 12)

Definition at line 57 of file ucb1400.h.

#define UCB_TS_CR_TSPX_POW   (1 << 1)

Definition at line 46 of file ucb1400.h.

#define UCB_TS_CR_TSPY_GND   (1 << 7)

Definition at line 52 of file ucb1400.h.

#define UCB_TS_CR_TSPY_POW   (1 << 3)

Definition at line 48 of file ucb1400.h.

Function Documentation

unsigned int ucb1400_adc_read ( struct snd_ac97 ac97,
u16  adc_channel,
int  adcsync 
)

Definition at line 28 of file ucb1400_core.c.