Linux Kernel
3.7.1
|
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/i2c.h>
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
#include <linux/jiffies.h>
Go to the source code of this file.
Data Structures | |
struct | pem_data |
Functions | |
MODULE_DEVICE_TABLE (i2c, pem_id) | |
module_i2c_driver (pem_driver) | |
MODULE_AUTHOR ("Guenter Roeck <[email protected]>") | |
MODULE_DESCRIPTION ("Lineage CPL PEM hardware monitoring driver") | |
MODULE_LICENSE ("GPL") | |
#define ALRM1_OV_VOLT_SHUTDOWN (1 << 2) |
Definition at line 107 of file lineage-pem.c.
#define ALRM1_POWER_LIMIT (1 << 7) |
Definition at line 112 of file lineage-pem.c.
#define ALRM1_PRIMARY_FAULT (1 << 6) |
Definition at line 111 of file lineage-pem.c.
#define ALRM1_TEMP_SHUTDOWN (1 << 5) |
Definition at line 110 of file lineage-pem.c.
#define ALRM1_TEMP_WARNING (1 << 4) |
Definition at line 109 of file lineage-pem.c.
#define ALRM1_VIN_OUT_LIMIT (1 << 0) |
Definition at line 105 of file lineage-pem.c.
#define ALRM1_VIN_OVERCURRENT (1 << 3) |
Definition at line 108 of file lineage-pem.c.
#define ALRM1_VOUT_OUT_LIMIT (1 << 1) |
Definition at line 106 of file lineage-pem.c.
#define ALRM2_5V_OUT_LIMIT (1 << 1) |
Definition at line 114 of file lineage-pem.c.
#define ALRM2_DCDC_TEMP_HIGH (1 << 4) |
Definition at line 117 of file lineage-pem.c.
#define ALRM2_FAN_FAULT (1 << 7) |
Definition at line 120 of file lineage-pem.c.
#define ALRM2_NO_PRIMARY (1 << 6) |
Definition at line 119 of file lineage-pem.c.
#define ALRM2_OV_LOW (1 << 3) |
Definition at line 116 of file lineage-pem.c.
#define ALRM2_PRI_TEMP_HIGH (1 << 5) |
Definition at line 118 of file lineage-pem.c.
#define ALRM2_TEMP_FAULT (1 << 2) |
Definition at line 115 of file lineage-pem.c.
#define DATA_STRING_LEN 9 |
Definition at line 123 of file lineage-pem.c.
#define FAN_SPEED_LEN 5 |
Definition at line 125 of file lineage-pem.c.
#define FIRMWARE_REV_LEN 4 |
Definition at line 122 of file lineage-pem.c.
Definition at line 124 of file lineage-pem.c.
#define PEM_CLEAR_INFO_FLAGS 0x03 |
Definition at line 50 of file lineage-pem.c.
#define PEM_DATA_ALARM_1 3 |
Definition at line 65 of file lineage-pem.c.
#define PEM_DATA_ALARM_2 2 |
Definition at line 64 of file lineage-pem.c.
#define PEM_DATA_CURRENT 6 |
Definition at line 68 of file lineage-pem.c.
#define PEM_DATA_STATUS_1 1 |
Definition at line 63 of file lineage-pem.c.
#define PEM_DATA_STATUS_2 0 |
Definition at line 62 of file lineage-pem.c.
#define PEM_DATA_TEMP 7 |
Definition at line 69 of file lineage-pem.c.
#define PEM_DATA_TEMP_CRIT 11 |
Definition at line 73 of file lineage-pem.c.
#define PEM_DATA_TEMP_MAX 10 |
Definition at line 72 of file lineage-pem.c.
#define PEM_DATA_VOUT_LSB 4 |
Definition at line 66 of file lineage-pem.c.
#define PEM_DATA_VOUT_MSB 5 |
Definition at line 67 of file lineage-pem.c.
#define PEM_FAN_ADJUSTMENT 0 |
Definition at line 81 of file lineage-pem.c.
#define PEM_FAN_FAN1 1 |
Definition at line 82 of file lineage-pem.c.
#define PEM_FAN_FAN2 2 |
Definition at line 83 of file lineage-pem.c.
#define PEM_FAN_FAN3 3 |
Definition at line 84 of file lineage-pem.c.
#define PEM_FAN_HI_SPEED 0xdf |
Definition at line 57 of file lineage-pem.c.
#define PEM_FAN_NORMAL_SPEED 0xe0 |
Definition at line 58 of file lineage-pem.c.
#define PEM_INPUT_POWER_LSB 1 |
Definition at line 77 of file lineage-pem.c.
#define PEM_INPUT_POWER_MSB 2 |
Definition at line 78 of file lineage-pem.c.
#define PEM_INPUT_VOLTAGE 0 |
Definition at line 76 of file lineage-pem.c.
#define PEM_OPERATION 0x01 |
Definition at line 49 of file lineage-pem.c.
#define PEM_READ_DATA_STRING 0xd0 |
Definition at line 53 of file lineage-pem.c.
#define PEM_READ_FAN_SPEED 0xe1 |
Definition at line 59 of file lineage-pem.c.
#define PEM_READ_FIRMWARE_REV 0xdd |
Definition at line 55 of file lineage-pem.c.
#define PEM_READ_INPUT_STRING 0xdc |
Definition at line 54 of file lineage-pem.c.
#define PEM_READ_RUN_TIMER 0xde |
Definition at line 56 of file lineage-pem.c.
#define PEM_VOUT_COMMAND 0x21 |
Definition at line 51 of file lineage-pem.c.
#define PEM_VOUT_OV_FAULT_LIMIT 0x40 |
Definition at line 52 of file lineage-pem.c.
#define STS1_EXT_FAULT (1 << 2) |
Definition at line 89 of file lineage-pem.c.
#define STS1_INT_FAULT (1 << 5) |
Definition at line 92 of file lineage-pem.c.
#define STS1_ISOLATION_TEST_OK (1 << 6) |
Definition at line 93 of file lineage-pem.c.
#define STS1_LEDS_FLASHING (1 << 1) |
Definition at line 88 of file lineage-pem.c.
#define STS1_OUTPUT_ON (1 << 0) |
Definition at line 87 of file lineage-pem.c.
#define STS1_SERVICE_LED_ON (1 << 3) |
Definition at line 90 of file lineage-pem.c.
#define STS1_SHUTDOWN_OCCURRED (1 << 4) |
Definition at line 91 of file lineage-pem.c.
#define STS2_DATA_OUT_RANGE (1 << 1) |
Definition at line 96 of file lineage-pem.c.
#define STS2_ENABLE_PIN_HI (1 << 0) |
Definition at line 95 of file lineage-pem.c.
#define STS2_HIGH_POWER_CAP (1 << 4) |
Definition at line 99 of file lineage-pem.c.
#define STS2_INVALID_INSTR (1 << 5) |
Definition at line 100 of file lineage-pem.c.
#define STS2_ISOLATION_TEST_FAIL (1 << 3) |
Definition at line 98 of file lineage-pem.c.
#define STS2_PEC_ERR (1 << 7) |
Definition at line 102 of file lineage-pem.c.
#define STS2_RESTARTED_OK (1 << 1) |
Definition at line 97 of file lineage-pem.c.
#define STS2_WILL_RESTART (1 << 6) |
Definition at line 101 of file lineage-pem.c.
MODULE_AUTHOR | ( | "Guenter Roeck <[email protected]>" | ) |
MODULE_DEVICE_TABLE | ( | i2c | , |
pem_id | |||
) |
module_i2c_driver | ( | pem_driver | ) |
MODULE_LICENSE | ( | "GPL" | ) |