#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>
#include <linux/i2c/pmbus.h>
#include "pmbus.h"
Go to the source code of this file.
|
#define | PMBUS_MAX_INPUT_SENSORS 22 /* 10*volt, 7*curr, 5*power */ |
|
#define | PMBUS_VOUT_SENSORS_PER_PAGE |
|
#define | PMBUS_IOUT_SENSORS_PER_PAGE |
|
#define | PMBUS_POUT_SENSORS_PER_PAGE |
|
#define | PMBUS_MAX_SENSORS_PER_FAN 1 /* input */ |
|
#define | PMBUS_MAX_SENSORS_PER_TEMP |
|
#define | PMBUS_MAX_INPUT_BOOLEANS |
|
#define | PMBUS_VOUT_BOOLEANS_PER_PAGE |
|
#define | PMBUS_IOUT_BOOLEANS_PER_PAGE |
|
#define | PMBUS_POUT_BOOLEANS_PER_PAGE |
|
#define | PMBUS_MAX_BOOLEANS_PER_FAN 2 /* alarm, fault */ |
|
#define | PMBUS_MAX_BOOLEANS_PER_TEMP |
|
#define | PMBUS_MAX_INPUT_LABELS 4 /* vin, vcap, iin, pin */ |
|
#define | PB_NUM_STATUS_REG (PMBUS_PAGES * 6 + 1) |
|
#define | PB_STATUS_BASE 0 |
|
#define | PB_STATUS_VOUT_BASE (PB_STATUS_BASE + PMBUS_PAGES) |
|
#define | PB_STATUS_IOUT_BASE (PB_STATUS_VOUT_BASE + PMBUS_PAGES) |
|
#define | PB_STATUS_FAN_BASE (PB_STATUS_IOUT_BASE + PMBUS_PAGES) |
|
#define | PB_STATUS_FAN34_BASE (PB_STATUS_FAN_BASE + PMBUS_PAGES) |
|
#define | PB_STATUS_INPUT_BASE (PB_STATUS_FAN34_BASE + PMBUS_PAGES) |
|
#define | PB_STATUS_TEMP_BASE (PB_STATUS_INPUT_BASE + 1) |
|
#define | PMBUS_NAME_SIZE 24 |
|
#define | MAX_MANTISSA (1023 * 1000) |
|
#define | MIN_MANTISSA (511 * 1000) |
|
#define | PMBUS_ADD_ATTR(data, _name, _idx, _mode, _type, _show, _set) |
|
#define | PMBUS_ADD_GET_ATTR(data, _name, _type, _idx) |
|
#define | PMBUS_ADD_SET_ATTR(data, _name, _type, _idx) |
|
|
int | pmbus_set_page (struct i2c_client *client, u8 page) |
|
| EXPORT_SYMBOL_GPL (pmbus_set_page) |
|
int | pmbus_write_byte (struct i2c_client *client, int page, u8 value) |
|
| EXPORT_SYMBOL_GPL (pmbus_write_byte) |
|
int | pmbus_write_word_data (struct i2c_client *client, u8 page, u8 reg, u16 word) |
|
| EXPORT_SYMBOL_GPL (pmbus_write_word_data) |
|
int | pmbus_read_word_data (struct i2c_client *client, u8 page, u8 reg) |
|
| EXPORT_SYMBOL_GPL (pmbus_read_word_data) |
|
int | pmbus_read_byte_data (struct i2c_client *client, int page, u8 reg) |
|
| EXPORT_SYMBOL_GPL (pmbus_read_byte_data) |
|
void | pmbus_clear_faults (struct i2c_client *client) |
|
| EXPORT_SYMBOL_GPL (pmbus_clear_faults) |
|
bool | pmbus_check_byte_register (struct i2c_client *client, int page, int reg) |
|
| EXPORT_SYMBOL_GPL (pmbus_check_byte_register) |
|
bool | pmbus_check_word_register (struct i2c_client *client, int page, int reg) |
|
| EXPORT_SYMBOL_GPL (pmbus_check_word_register) |
|
struct pmbus_driver_info * | pmbus_get_driver_info (struct i2c_client *client) |
|
| EXPORT_SYMBOL_GPL (pmbus_get_driver_info) |
|
int | pmbus_do_probe (struct i2c_client *client, const struct i2c_device_id *id, struct pmbus_driver_info *info) |
|
| EXPORT_SYMBOL_GPL (pmbus_do_probe) |
|
int | pmbus_do_remove (struct i2c_client *client) |
|
| EXPORT_SYMBOL_GPL (pmbus_do_remove) |
|
| MODULE_AUTHOR ("Guenter Roeck") |
|
| MODULE_DESCRIPTION ("PMBus core driver") |
|
| MODULE_LICENSE ("GPL") |
|
#define MAX_MANTISSA (1023 * 1000) |
#define MIN_MANTISSA (511 * 1000) |
#define PMBUS_ADD_ATTR |
( |
|
data, |
|
|
|
_name, |
|
|
|
_idx, |
|
|
|
_mode, |
|
|
|
_type, |
|
|
|
_show, |
|
|
|
_set |
|
) |
| |
Value:
= &
data->_type##
s[
data->num_##_type##
s].attribute; \
BUG_ON(
data->num_attributes >=
data->max_attributes); \
sysfs_attr_init(&
a->dev_attr.attr); \
a->dev_attr.attr.name = _name; \
a->dev_attr.attr.mode = _mode; \
a->dev_attr.show = _show; \
a->dev_attr.store = _set; \
data->attributes[
data->num_attributes] = &
a->dev_attr.attr;
\
data->num_attributes++; \
} while (0)
Definition at line 796 of file pmbus_core.c.
#define PMBUS_ADD_GET_ATTR |
( |
|
data, |
|
|
|
_name, |
|
|
|
_type, |
|
|
|
_idx |
|
) |
| |
#define PMBUS_ADD_SET_ATTR |
( |
|
data, |
|
|
|
_name, |
|
|
|
_type, |
|
|
|
_idx |
|
) |
| |
Value:
pmbus_show_##_type, pmbus_set_##_type)
Definition at line 815 of file pmbus_core.c.
#define PMBUS_IOUT_BOOLEANS_PER_PAGE |
#define PMBUS_IOUT_SENSORS_PER_PAGE |
#define PMBUS_MAX_BOOLEANS_PER_FAN 2 /* alarm, fault */ |
#define PMBUS_MAX_BOOLEANS_PER_TEMP |
#define PMBUS_MAX_INPUT_BOOLEANS |
#define PMBUS_MAX_INPUT_LABELS 4 /* vin, vcap, iin, pin */ |
#define PMBUS_MAX_INPUT_SENSORS 22 /* 10*volt, 7*curr, 5*power */ |
#define PMBUS_MAX_SENSORS_PER_FAN 1 /* input */ |
#define PMBUS_MAX_SENSORS_PER_TEMP |
#define PMBUS_NAME_SIZE 24 |
#define PMBUS_POUT_BOOLEANS_PER_PAGE |
#define PMBUS_POUT_SENSORS_PER_PAGE |
#define PMBUS_VOUT_BOOLEANS_PER_PAGE |
#define PMBUS_VOUT_SENSORS_PER_PAGE |
MODULE_AUTHOR |
( |
"Guenter Roeck" |
| ) |
|