diff options
author | Guenter Roeck <linux@roeck-us.net> | 2013-01-16 10:31:32 -0800 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2013-02-06 09:58:03 -0800 |
commit | aebcbbfc4955929286a15a04592a2281d3e527db (patch) | |
tree | df81ac0ca3cb59b0c38b8fabc8ae569725c1f393 /drivers/hwmon/pmbus/pmbus.h | |
parent | 85cfb3a83536ad7f055b45f3a9c227848fa4dc80 (diff) | |
download | op-kernel-dev-aebcbbfc4955929286a15a04592a2281d3e527db.zip op-kernel-dev-aebcbbfc4955929286a15a04592a2281d3e527db.tar.gz |
hwmon: (pmbus) Add support for additional voltage sensor
Some PMBus chips support monitoring an additional non-standard voltage. While
this voltage can in many cases be supported by simulating an additional sensor
page, this does not work in all cases. Specifically, it is problematic if the
data format is linear and the voltage is reported in LINEAR11 format. Since
output voltages use LINEAR16, and the exponent for LINEAR16 data is chip-wide
and fixed, this can result in overflows.
To solve this problem, add support for an additional virtual input voltage,
call it 'vmon', and treat this voltage as input voltage (which, when the chip
supports linear data format, uses LINEAR11).
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/pmbus/pmbus.h')
-rw-r--r-- | drivers/hwmon/pmbus/pmbus.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/hwmon/pmbus/pmbus.h b/drivers/hwmon/pmbus/pmbus.h index 3fe03dc..164d177 100644 --- a/drivers/hwmon/pmbus/pmbus.h +++ b/drivers/hwmon/pmbus/pmbus.h @@ -2,6 +2,7 @@ * pmbus.h - Common defines and structures for PMBus devices * * Copyright (c) 2010, 2011 Ericsson AB. + * Copyright (c) 2012 Guenter Roeck * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -177,6 +178,13 @@ #define PMBUS_VIRT_READ_TEMP2_MAX (PMBUS_VIRT_BASE + 28) #define PMBUS_VIRT_RESET_TEMP2_HISTORY (PMBUS_VIRT_BASE + 29) +#define PMBUS_VIRT_READ_VMON (PMBUS_VIRT_BASE + 30) +#define PMBUS_VIRT_VMON_UV_WARN_LIMIT (PMBUS_VIRT_BASE + 31) +#define PMBUS_VIRT_VMON_OV_WARN_LIMIT (PMBUS_VIRT_BASE + 32) +#define PMBUS_VIRT_VMON_UV_FAULT_LIMIT (PMBUS_VIRT_BASE + 33) +#define PMBUS_VIRT_VMON_OV_FAULT_LIMIT (PMBUS_VIRT_BASE + 34) +#define PMBUS_VIRT_STATUS_VMON (PMBUS_VIRT_BASE + 35) + /* * CAPABILITY */ @@ -317,6 +325,8 @@ enum pmbus_sensor_classes { #define PMBUS_HAVE_STATUS_TEMP (1 << 15) #define PMBUS_HAVE_STATUS_FAN12 (1 << 16) #define PMBUS_HAVE_STATUS_FAN34 (1 << 17) +#define PMBUS_HAVE_VMON (1 << 18) +#define PMBUS_HAVE_STATUS_VMON (1 << 19) enum pmbus_data_format { linear = 0, direct, vid }; |