Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
ibmaem.c File Reference
#include <linux/ipmi.h>
#include <linux/module.h>
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
#include <linux/jiffies.h>
#include <linux/mutex.h>
#include <linux/kdev_t.h>
#include <linux/spinlock.h>
#include <linux/idr.h>
#include <linux/slab.h>
#include <linux/sched.h>
#include <linux/platform_device.h>
#include <linux/math64.h>
#include <linux/time.h>
#include <linux/err.h>

Go to the source code of this file.

Data Structures

struct  aem_ipmi_data
 
struct  aem_ro_sensor_template
 
struct  aem_rw_sensor_template
 
struct  aem_data
 
struct  aem_iana_id
 
struct  aem_find_firmware_req
 
struct  aem_find_firmware_resp
 
struct  aem_find_instance_req
 
struct  aem_find_instance_resp
 
struct  aem_read_sensor_req
 
struct  aem_read_sensor_resp
 
struct  aem_driver_data
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define REFRESH_INTERVAL   (HZ)
 
#define IPMI_TIMEOUT   (30 * HZ)
 
#define DRVNAME   "aem"
 
#define AEM_NETFN   0x2E
 
#define AEM_FIND_FW_CMD   0x80
 
#define AEM_ELEMENT_CMD   0x81
 
#define AEM_FW_INSTANCE_CMD   0x82
 
#define AEM_READ_ELEMENT_CFG   0x80
 
#define AEM_READ_BUFFER   0x81
 
#define AEM_READ_REGISTER   0x82
 
#define AEM_WRITE_REGISTER   0x83
 
#define AEM_SET_REG_MASK   0x84
 
#define AEM_CLEAR_REG_MASK   0x85
 
#define AEM_READ_ELEMENT_CFG2   0x86
 
#define AEM_CONTROL_ELEMENT   0
 
#define AEM_ENERGY_ELEMENT   1
 
#define AEM_CLOCK_ELEMENT   4
 
#define AEM_POWER_CAP_ELEMENT   7
 
#define AEM_EXHAUST_ELEMENT   9
 
#define AEM_POWER_ELEMENT   10
 
#define AEM_MODULE_TYPE_ID   0x0001
 
#define AEM2_NUM_ENERGY_REGS   2
 
#define AEM2_NUM_PCAP_REGS   6
 
#define AEM2_NUM_TEMP_REGS   2
 
#define AEM2_NUM_SENSORS   14
 
#define AEM1_NUM_ENERGY_REGS   1
 
#define AEM1_NUM_SENSORS   3
 
#define AEM_NUM_ENERGY_REGS   AEM2_NUM_ENERGY_REGS
 
#define AEM_NUM_SENSORS   AEM2_NUM_SENSORS
 
#define POWER_CAP   0
 
#define POWER_CAP_MAX_HOTPLUG   1
 
#define POWER_CAP_MAX   2
 
#define POWER_CAP_MIN_WARNING   3
 
#define POWER_CAP_MIN   4
 
#define POWER_AUX   5
 
#define AEM_DEFAULT_POWER_INTERVAL   1000
 
#define AEM_MIN_POWER_INTERVAL   200
 
#define UJ_PER_MJ   1000L
 

Functions

 MODULE_AUTHOR ("Darrick J. Wong <[email protected]>")
 
 MODULE_DESCRIPTION ("IBM AEM power/temp/energy sensor driver")
 
 MODULE_LICENSE ("GPL")
 
 module_init (aem_init)
 
 module_exit (aem_exit)
 
 MODULE_ALIAS ("dmi:bvnIBM:*:pnIBMSystemx3350-*")
 
 MODULE_ALIAS ("dmi:bvnIBM:*:pnIBMSystemx3550-*")
 
 MODULE_ALIAS ("dmi:bvnIBM:*:pnIBMSystemx3650-*")
 
 MODULE_ALIAS ("dmi:bvnIBM:*:pnIBMSystemx3655-*")
 
 MODULE_ALIAS ("dmi:bvnIBM:*:pnIBMSystemx3755-*")
 
 MODULE_ALIAS ("dmi:bvnIBM:*:pnIBM3850M2/x3950M2-*")
 
 MODULE_ALIAS ("dmi:bvnIBM:*:pnIBMBladeHC10-*")
 

Variables

struct aem_find_firmware_req __packed
 

Macro Definition Documentation

#define AEM1_NUM_ENERGY_REGS   1

Definition at line 73 of file ibmaem.c.

#define AEM1_NUM_SENSORS   3

Definition at line 74 of file ibmaem.c.

#define AEM2_NUM_ENERGY_REGS   2

Definition at line 68 of file ibmaem.c.

#define AEM2_NUM_PCAP_REGS   6

Definition at line 69 of file ibmaem.c.

#define AEM2_NUM_SENSORS   14

Definition at line 71 of file ibmaem.c.

#define AEM2_NUM_TEMP_REGS   2

Definition at line 70 of file ibmaem.c.

#define AEM_CLEAR_REG_MASK   0x85

Definition at line 56 of file ibmaem.c.

#define AEM_CLOCK_ELEMENT   4

Definition at line 61 of file ibmaem.c.

#define AEM_CONTROL_ELEMENT   0

Definition at line 59 of file ibmaem.c.

#define AEM_DEFAULT_POWER_INTERVAL   1000

Definition at line 88 of file ibmaem.c.

#define AEM_ELEMENT_CMD   0x81

Definition at line 48 of file ibmaem.c.

#define AEM_ENERGY_ELEMENT   1

Definition at line 60 of file ibmaem.c.

#define AEM_EXHAUST_ELEMENT   9

Definition at line 63 of file ibmaem.c.

#define AEM_FIND_FW_CMD   0x80

Definition at line 47 of file ibmaem.c.

#define AEM_FW_INSTANCE_CMD   0x82

Definition at line 49 of file ibmaem.c.

#define AEM_MIN_POWER_INTERVAL   200

Definition at line 89 of file ibmaem.c.

#define AEM_MODULE_TYPE_ID   0x0001

Definition at line 66 of file ibmaem.c.

#define AEM_NETFN   0x2E

Definition at line 45 of file ibmaem.c.

#define AEM_NUM_ENERGY_REGS   AEM2_NUM_ENERGY_REGS

Definition at line 77 of file ibmaem.c.

#define AEM_NUM_SENSORS   AEM2_NUM_SENSORS

Definition at line 79 of file ibmaem.c.

#define AEM_POWER_CAP_ELEMENT   7

Definition at line 62 of file ibmaem.c.

#define AEM_POWER_ELEMENT   10

Definition at line 64 of file ibmaem.c.

#define AEM_READ_BUFFER   0x81

Definition at line 52 of file ibmaem.c.

#define AEM_READ_ELEMENT_CFG   0x80

Definition at line 51 of file ibmaem.c.

#define AEM_READ_ELEMENT_CFG2   0x86

Definition at line 57 of file ibmaem.c.

#define AEM_READ_REGISTER   0x82

Definition at line 53 of file ibmaem.c.

#define AEM_SET_REG_MASK   0x84

Definition at line 55 of file ibmaem.c.

#define AEM_WRITE_REGISTER   0x83

Definition at line 54 of file ibmaem.c.

#define DRVNAME   "aem"

Definition at line 43 of file ibmaem.c.

#define IPMI_TIMEOUT   (30 * HZ)

Definition at line 42 of file ibmaem.c.

#define POWER_AUX   5

Definition at line 86 of file ibmaem.c.

#define POWER_CAP   0

Definition at line 81 of file ibmaem.c.

#define POWER_CAP_MAX   2

Definition at line 83 of file ibmaem.c.

#define POWER_CAP_MAX_HOTPLUG   1

Definition at line 82 of file ibmaem.c.

#define POWER_CAP_MIN   4

Definition at line 85 of file ibmaem.c.

#define POWER_CAP_MIN_WARNING   3

Definition at line 84 of file ibmaem.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 23 of file ibmaem.c.

#define REFRESH_INTERVAL   (HZ)

Definition at line 41 of file ibmaem.c.

#define UJ_PER_MJ   1000L

Definition at line 90 of file ibmaem.c.

Function Documentation

MODULE_ALIAS ( "dmi:bvnIBM:*:pnIBMSystemx3350-*"  )
MODULE_ALIAS ( "dmi:bvnIBM:*:pnIBMSystemx3550-*"  )
MODULE_ALIAS ( "dmi:bvnIBM:*:pnIBMSystemx3650-*"  )
MODULE_ALIAS ( "dmi:bvnIBM:*:pnIBMSystemx3655-*"  )
MODULE_ALIAS ( "dmi:bvnIBM:*:pnIBMSystemx3755-*"  )
MODULE_ALIAS ( "dmi:bvnIBM:*:pnIBM3850M2/x3950M2-*"  )
MODULE_ALIAS ( "dmi:bvnIBM:*:pnIBMBladeHC10-*"  )
MODULE_AUTHOR ( "Darrick J. Wong <[email protected]>"  )
MODULE_DESCRIPTION ( "IBM AEM power/temp/energy sensor driver )
module_exit ( aem_exit  )
module_init ( aem_init  )
MODULE_LICENSE ( "GPL"  )

Variable Documentation