Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
test_power.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/power_supply.h>
#include <linux/errno.h>
#include <linux/delay.h>
#include <linux/vermagic.h>

Go to the source code of this file.

Data Structures

struct  battery_property_map
 

Macros

#define MAX_KEYLENGTH   256
 
#define param_get_battery_capacity   param_get_int
 
#define param_get_battery_voltage   param_get_int
 
#define param_check_ac_online(name, p)   __param_check(name, p, void);
 
#define param_check_usb_online(name, p)   __param_check(name, p, void);
 
#define param_check_battery_status(name, p)   __param_check(name, p, void);
 
#define param_check_battery_present(name, p)   __param_check(name, p, void);
 
#define param_check_battery_technology(name, p)   __param_check(name, p, void);
 
#define param_check_battery_health(name, p)   __param_check(name, p, void);
 
#define param_check_battery_capacity(name, p)   __param_check(name, p, void);
 
#define param_check_battery_voltage(name, p)   __param_check(name, p, void);
 

Functions

 module_init (test_power_init)
 
 module_exit (test_power_exit)
 
 module_param (ac_online, ac_online, 0644)
 
 MODULE_PARM_DESC (ac_online,"AC charging state <on|off>")
 
 module_param (usb_online, usb_online, 0644)
 
 MODULE_PARM_DESC (usb_online,"USB charging state <on|off>")
 
 module_param (battery_status, battery_status, 0644)
 
 MODULE_PARM_DESC (battery_status,"battery status <charging|discharging|not-charging|full>")
 
 module_param (battery_present, battery_present, 0644)
 
 MODULE_PARM_DESC (battery_present,"battery presence state <good|overheat|dead|overvoltage|failure>")
 
 module_param (battery_technology, battery_technology, 0644)
 
 MODULE_PARM_DESC (battery_technology,"battery technology <NiMH|LION|LIPO|LiFe|NiCd|LiMn>")
 
 module_param (battery_health, battery_health, 0644)
 
 MODULE_PARM_DESC (battery_health,"battery health state <good|overheat|dead|overvoltage|failure>")
 
 module_param (battery_capacity, battery_capacity, 0644)
 
 MODULE_PARM_DESC (battery_capacity,"battery capacity (percentage)")
 
 module_param (battery_voltage, battery_voltage, 0644)
 
 MODULE_PARM_DESC (battery_voltage,"battery voltage (millivolts)")
 
 MODULE_DESCRIPTION ("Power supply driver for testing")
 
 MODULE_AUTHOR ("Anton Vorontsov <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define MAX_KEYLENGTH   256

Definition at line 217 of file test_power.c.

#define param_check_ac_online (   name,
  p 
)    __param_check(name, p, void);

Definition at line 454 of file test_power.c.

#define param_check_battery_capacity (   name,
  p 
)    __param_check(name, p, void);

Definition at line 460 of file test_power.c.

#define param_check_battery_health (   name,
  p 
)    __param_check(name, p, void);

Definition at line 459 of file test_power.c.

#define param_check_battery_present (   name,
  p 
)    __param_check(name, p, void);

Definition at line 457 of file test_power.c.

#define param_check_battery_status (   name,
  p 
)    __param_check(name, p, void);

Definition at line 456 of file test_power.c.

#define param_check_battery_technology (   name,
  p 
)    __param_check(name, p, void);

Definition at line 458 of file test_power.c.

#define param_check_battery_voltage (   name,
  p 
)    __param_check(name, p, void);

Definition at line 461 of file test_power.c.

#define param_check_usb_online (   name,
  p 
)    __param_check(name, p, void);

Definition at line 455 of file test_power.c.

#define param_get_battery_capacity   param_get_int

Definition at line 397 of file test_power.c.

#define param_get_battery_voltage   param_get_int

Definition at line 412 of file test_power.c.

Function Documentation

MODULE_AUTHOR ( "Anton Vorontsov <[email protected]>"  )
MODULE_DESCRIPTION ( "Power supply driver for testing"  )
module_exit ( test_power_exit  )
module_init ( test_power_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( ac_online  ,
ac_online  ,
0644   
)
module_param ( usb_online  ,
usb_online  ,
0644   
)
module_param ( battery_status  ,
battery_status  ,
0644   
)
module_param ( battery_present  ,
battery_present  ,
0644   
)
module_param ( battery_technology  ,
battery_technology  ,
0644   
)
module_param ( battery_health  ,
battery_health  ,
0644   
)
module_param ( battery_capacity  ,
battery_capacity  ,
0644   
)
module_param ( battery_voltage  ,
battery_voltage  ,
0644   
)
MODULE_PARM_DESC ( ac_online  ,
"AC charging state <on|off>"   
)
MODULE_PARM_DESC ( usb_online  ,
"USB charging state <on|off>"   
)
MODULE_PARM_DESC ( battery_status  ,
"battery status <charging|discharging|not-charging|full>"   
)
MODULE_PARM_DESC ( battery_present  ,
"battery presence state <good|overheat|dead|overvoltage|failure>"   
)
MODULE_PARM_DESC ( battery_technology  ,
"battery technology <NiMH|LION|LIPO|LiFe|NiCd|LiMn>"   
)
MODULE_PARM_DESC ( battery_health  ,
"battery health state <good|overheat|dead|overvoltage|failure>"   
)
MODULE_PARM_DESC ( battery_capacity  ,
"battery capacity (percentage)"   
)
MODULE_PARM_DESC ( battery_voltage  ,
"battery voltage (millivolts)"   
)