Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
ucb1x00-assabet.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/fs.h>
#include <linux/gpio_keys.h>
#include <linux/input.h>
#include <linux/platform_device.h>
#include <linux/proc_fs.h>
#include <linux/mfd/ucb1x00.h>

Go to the source code of this file.

Macros

#define UCB1X00_ATTR(name, input)
 

Functions

 UCB1X00_ATTR (vbatt, UCB_ADC_INP_AD1)
 
 UCB1X00_ATTR (vcharger, UCB_ADC_INP_AD0)
 
 UCB1X00_ATTR (batt_temp, UCB_ADC_INP_AD2)
 
 module_init (ucb1x00_assabet_init)
 
 module_exit (ucb1x00_assabet_exit)
 
 MODULE_AUTHOR ("Russell King <[email protected]>")
 
 MODULE_DESCRIPTION ("Assabet noddy testing only example ADC driver")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define UCB1X00_ATTR (   name,
  input 
)
Value:
static ssize_t name##_show(struct device *dev, struct device_attribute *attr, \
char *buf) \
{ \
int val; \
ucb1x00_adc_enable(ucb); \
ucb1x00_adc_disable(ucb); \
return sprintf(buf, "%d\n", val); \
} \
static DEVICE_ATTR(name,0444,name##_show,NULL)

Definition at line 23 of file ucb1x00-assabet.c.

Function Documentation

MODULE_AUTHOR ( "Russell King <[email protected]>"  )
MODULE_DESCRIPTION ( "Assabet noddy testing only example ADC driver )
module_exit ( ucb1x00_assabet_exit  )
module_init ( ucb1x00_assabet_init  )
MODULE_LICENSE ( "GPL"  )
UCB1X00_ATTR ( vbatt  ,
UCB_ADC_INP_AD1   
)
UCB1X00_ATTR ( vcharger  ,
UCB_ADC_INP_AD0   
)
UCB1X00_ATTR ( batt_temp  ,
UCB_ADC_INP_AD2   
)