aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-03-27 23:03:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-27 23:03:39 -0400
commit4329510c22af1d0cfcc291dc4ce6274abebfe170 (patch)
tree20f78e40c7c919ce01d1ab5f648d95cfa9710814 /drivers
parent17c6dd8144924e3c71930636091704da6d043536 (diff)
parent3506999e2fd1eb7ed7375eaa67dcc1d1d60e8ccd (diff)
Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging: hwmon: (pmbus) Fix temperature limit register access
Diffstat (limited to 'drivers')
-rw-r--r--drivers/hwmon/pmbus_core.c70
1 files changed, 36 insertions, 34 deletions
diff --git a/drivers/hwmon/pmbus_core.c b/drivers/hwmon/pmbus_core.c
index 6474512f49b0..edfb92e41735 100644
--- a/drivers/hwmon/pmbus_core.c
+++ b/drivers/hwmon/pmbus_core.c
@@ -752,7 +752,7 @@ static void pmbus_add_boolean_cmp(struct pmbus_data *data,
752static void pmbus_add_sensor(struct pmbus_data *data, 752static void pmbus_add_sensor(struct pmbus_data *data,
753 const char *name, const char *type, int seq, 753 const char *name, const char *type, int seq,
754 int page, int reg, enum pmbus_sensor_classes class, 754 int page, int reg, enum pmbus_sensor_classes class,
755 bool update) 755 bool update, bool readonly)
756{ 756{
757 struct pmbus_sensor *sensor; 757 struct pmbus_sensor *sensor;
758 758
@@ -765,7 +765,7 @@ static void pmbus_add_sensor(struct pmbus_data *data,
765 sensor->reg = reg; 765 sensor->reg = reg;
766 sensor->class = class; 766 sensor->class = class;
767 sensor->update = update; 767 sensor->update = update;
768 if (update) 768 if (readonly)
769 PMBUS_ADD_GET_ATTR(data, sensor->name, sensor, 769 PMBUS_ADD_GET_ATTR(data, sensor->name, sensor,
770 data->num_sensors); 770 data->num_sensors);
771 else 771 else
@@ -916,14 +916,14 @@ static void pmbus_find_attributes(struct i2c_client *client,
916 916
917 i0 = data->num_sensors; 917 i0 = data->num_sensors;
918 pmbus_add_label(data, "in", in_index, "vin", 0); 918 pmbus_add_label(data, "in", in_index, "vin", 0);
919 pmbus_add_sensor(data, "in", "input", in_index, 919 pmbus_add_sensor(data, "in", "input", in_index, 0,
920 0, PMBUS_READ_VIN, PSC_VOLTAGE_IN, true); 920 PMBUS_READ_VIN, PSC_VOLTAGE_IN, true, true);
921 if (pmbus_check_word_register(client, 0, 921 if (pmbus_check_word_register(client, 0,
922 PMBUS_VIN_UV_WARN_LIMIT)) { 922 PMBUS_VIN_UV_WARN_LIMIT)) {
923 i1 = data->num_sensors; 923 i1 = data->num_sensors;
924 pmbus_add_sensor(data, "in", "min", in_index, 924 pmbus_add_sensor(data, "in", "min", in_index,
925 0, PMBUS_VIN_UV_WARN_LIMIT, 925 0, PMBUS_VIN_UV_WARN_LIMIT,
926 PSC_VOLTAGE_IN, false); 926 PSC_VOLTAGE_IN, false, false);
927 if (info->func[0] & PMBUS_HAVE_STATUS_INPUT) { 927 if (info->func[0] & PMBUS_HAVE_STATUS_INPUT) {
928 pmbus_add_boolean_reg(data, "in", "min_alarm", 928 pmbus_add_boolean_reg(data, "in", "min_alarm",
929 in_index, 929 in_index,
@@ -937,7 +937,7 @@ static void pmbus_find_attributes(struct i2c_client *client,
937 i1 = data->num_sensors; 937 i1 = data->num_sensors;
938 pmbus_add_sensor(data, "in", "lcrit", in_index, 938 pmbus_add_sensor(data, "in", "lcrit", in_index,
939 0, PMBUS_VIN_UV_FAULT_LIMIT, 939 0, PMBUS_VIN_UV_FAULT_LIMIT,
940 PSC_VOLTAGE_IN, false); 940 PSC_VOLTAGE_IN, false, false);
941 if (info->func[0] & PMBUS_HAVE_STATUS_INPUT) { 941 if (info->func[0] & PMBUS_HAVE_STATUS_INPUT) {
942 pmbus_add_boolean_reg(data, "in", "lcrit_alarm", 942 pmbus_add_boolean_reg(data, "in", "lcrit_alarm",
943 in_index, 943 in_index,
@@ -951,7 +951,7 @@ static void pmbus_find_attributes(struct i2c_client *client,
951 i1 = data->num_sensors; 951 i1 = data->num_sensors;
952 pmbus_add_sensor(data, "in", "max", in_index, 952 pmbus_add_sensor(data, "in", "max", in_index,
953 0, PMBUS_VIN_OV_WARN_LIMIT, 953 0, PMBUS_VIN_OV_WARN_LIMIT,
954 PSC_VOLTAGE_IN, false); 954 PSC_VOLTAGE_IN, false, false);
955 if (info->func[0] & PMBUS_HAVE_STATUS_INPUT) { 955 if (info->func[0] & PMBUS_HAVE_STATUS_INPUT) {
956 pmbus_add_boolean_reg(data, "in", "max_alarm", 956 pmbus_add_boolean_reg(data, "in", "max_alarm",
957 in_index, 957 in_index,
@@ -965,7 +965,7 @@ static void pmbus_find_attributes(struct i2c_client *client,
965 i1 = data->num_sensors; 965 i1 = data->num_sensors;
966 pmbus_add_sensor(data, "in", "crit", in_index, 966 pmbus_add_sensor(data, "in", "crit", in_index,
967 0, PMBUS_VIN_OV_FAULT_LIMIT, 967 0, PMBUS_VIN_OV_FAULT_LIMIT,
968 PSC_VOLTAGE_IN, false); 968 PSC_VOLTAGE_IN, false, false);
969 if (info->func[0] & PMBUS_HAVE_STATUS_INPUT) { 969 if (info->func[0] & PMBUS_HAVE_STATUS_INPUT) {
970 pmbus_add_boolean_reg(data, "in", "crit_alarm", 970 pmbus_add_boolean_reg(data, "in", "crit_alarm",
971 in_index, 971 in_index,
@@ -988,7 +988,7 @@ static void pmbus_find_attributes(struct i2c_client *client,
988 if (info->func[0] & PMBUS_HAVE_VCAP) { 988 if (info->func[0] & PMBUS_HAVE_VCAP) {
989 pmbus_add_label(data, "in", in_index, "vcap", 0); 989 pmbus_add_label(data, "in", in_index, "vcap", 0);
990 pmbus_add_sensor(data, "in", "input", in_index, 0, 990 pmbus_add_sensor(data, "in", "input", in_index, 0,
991 PMBUS_READ_VCAP, PSC_VOLTAGE_IN, true); 991 PMBUS_READ_VCAP, PSC_VOLTAGE_IN, true, true);
992 in_index++; 992 in_index++;
993 } 993 }
994 994
@@ -1004,13 +1004,13 @@ static void pmbus_find_attributes(struct i2c_client *client,
1004 i0 = data->num_sensors; 1004 i0 = data->num_sensors;
1005 pmbus_add_label(data, "in", in_index, "vout", page + 1); 1005 pmbus_add_label(data, "in", in_index, "vout", page + 1);
1006 pmbus_add_sensor(data, "in", "input", in_index, page, 1006 pmbus_add_sensor(data, "in", "input", in_index, page,
1007 PMBUS_READ_VOUT, PSC_VOLTAGE_OUT, true); 1007 PMBUS_READ_VOUT, PSC_VOLTAGE_OUT, true, true);
1008 if (pmbus_check_word_register(client, page, 1008 if (pmbus_check_word_register(client, page,
1009 PMBUS_VOUT_UV_WARN_LIMIT)) { 1009 PMBUS_VOUT_UV_WARN_LIMIT)) {
1010 i1 = data->num_sensors; 1010 i1 = data->num_sensors;
1011 pmbus_add_sensor(data, "in", "min", in_index, page, 1011 pmbus_add_sensor(data, "in", "min", in_index, page,
1012 PMBUS_VOUT_UV_WARN_LIMIT, 1012 PMBUS_VOUT_UV_WARN_LIMIT,
1013 PSC_VOLTAGE_OUT, false); 1013 PSC_VOLTAGE_OUT, false, false);
1014 if (info->func[page] & PMBUS_HAVE_STATUS_VOUT) { 1014 if (info->func[page] & PMBUS_HAVE_STATUS_VOUT) {
1015 pmbus_add_boolean_reg(data, "in", "min_alarm", 1015 pmbus_add_boolean_reg(data, "in", "min_alarm",
1016 in_index, 1016 in_index,
@@ -1025,7 +1025,7 @@ static void pmbus_find_attributes(struct i2c_client *client,
1025 i1 = data->num_sensors; 1025 i1 = data->num_sensors;
1026 pmbus_add_sensor(data, "in", "lcrit", in_index, page, 1026 pmbus_add_sensor(data, "in", "lcrit", in_index, page,
1027 PMBUS_VOUT_UV_FAULT_LIMIT, 1027 PMBUS_VOUT_UV_FAULT_LIMIT,
1028 PSC_VOLTAGE_OUT, false); 1028 PSC_VOLTAGE_OUT, false, false);
1029 if (info->func[page] & PMBUS_HAVE_STATUS_VOUT) { 1029 if (info->func[page] & PMBUS_HAVE_STATUS_VOUT) {
1030 pmbus_add_boolean_reg(data, "in", "lcrit_alarm", 1030 pmbus_add_boolean_reg(data, "in", "lcrit_alarm",
1031 in_index, 1031 in_index,
@@ -1040,7 +1040,7 @@ static void pmbus_find_attributes(struct i2c_client *client,
1040 i1 = data->num_sensors; 1040 i1 = data->num_sensors;
1041 pmbus_add_sensor(data, "in", "max", in_index, page, 1041 pmbus_add_sensor(data, "in", "max", in_index, page,
1042 PMBUS_VOUT_OV_WARN_LIMIT, 1042 PMBUS_VOUT_OV_WARN_LIMIT,
1043 PSC_VOLTAGE_OUT, false); 1043 PSC_VOLTAGE_OUT, false, false);
1044 if (info->func[page] & PMBUS_HAVE_STATUS_VOUT) { 1044 if (info->func[page] & PMBUS_HAVE_STATUS_VOUT) {
1045 pmbus_add_boolean_reg(data, "in", "max_alarm", 1045 pmbus_add_boolean_reg(data, "in", "max_alarm",
1046 in_index, 1046 in_index,
@@ -1055,7 +1055,7 @@ static void pmbus_find_attributes(struct i2c_client *client,
1055 i1 = data->num_sensors; 1055 i1 = data->num_sensors;
1056 pmbus_add_sensor(data, "in", "crit", in_index, page, 1056 pmbus_add_sensor(data, "in", "crit", in_index, page,
1057 PMBUS_VOUT_OV_FAULT_LIMIT, 1057 PMBUS_VOUT_OV_FAULT_LIMIT,
1058 PSC_VOLTAGE_OUT, false); 1058 PSC_VOLTAGE_OUT, false, false);
1059 if (info->func[page] & PMBUS_HAVE_STATUS_VOUT) { 1059 if (info->func[page] & PMBUS_HAVE_STATUS_VOUT) {
1060 pmbus_add_boolean_reg(data, "in", "crit_alarm", 1060 pmbus_add_boolean_reg(data, "in", "crit_alarm",
1061 in_index, 1061 in_index,
@@ -1088,14 +1088,14 @@ static void pmbus_find_attributes(struct i2c_client *client,
1088 if (info->func[0] & PMBUS_HAVE_IIN) { 1088 if (info->func[0] & PMBUS_HAVE_IIN) {
1089 i0 = data->num_sensors; 1089 i0 = data->num_sensors;
1090 pmbus_add_label(data, "curr", in_index, "iin", 0); 1090 pmbus_add_label(data, "curr", in_index, "iin", 0);
1091 pmbus_add_sensor(data, "curr", "input", in_index, 1091 pmbus_add_sensor(data, "curr", "input", in_index, 0,
1092 0, PMBUS_READ_IIN, PSC_CURRENT_IN, true); 1092 PMBUS_READ_IIN, PSC_CURRENT_IN, true, true);
1093 if (pmbus_check_word_register(client, 0, 1093 if (pmbus_check_word_register(client, 0,
1094 PMBUS_IIN_OC_WARN_LIMIT)) { 1094 PMBUS_IIN_OC_WARN_LIMIT)) {
1095 i1 = data->num_sensors; 1095 i1 = data->num_sensors;
1096 pmbus_add_sensor(data, "curr", "max", in_index, 1096 pmbus_add_sensor(data, "curr", "max", in_index,
1097 0, PMBUS_IIN_OC_WARN_LIMIT, 1097 0, PMBUS_IIN_OC_WARN_LIMIT,
1098 PSC_CURRENT_IN, false); 1098 PSC_CURRENT_IN, false, false);
1099 if (info->func[0] & PMBUS_HAVE_STATUS_INPUT) { 1099 if (info->func[0] & PMBUS_HAVE_STATUS_INPUT) {
1100 pmbus_add_boolean_reg(data, "curr", "max_alarm", 1100 pmbus_add_boolean_reg(data, "curr", "max_alarm",
1101 in_index, 1101 in_index,
@@ -1108,7 +1108,7 @@ static void pmbus_find_attributes(struct i2c_client *client,
1108 i1 = data->num_sensors; 1108 i1 = data->num_sensors;
1109 pmbus_add_sensor(data, "curr", "crit", in_index, 1109 pmbus_add_sensor(data, "curr", "crit", in_index,
1110 0, PMBUS_IIN_OC_FAULT_LIMIT, 1110 0, PMBUS_IIN_OC_FAULT_LIMIT,
1111 PSC_CURRENT_IN, false); 1111 PSC_CURRENT_IN, false, false);
1112 if (info->func[0] & PMBUS_HAVE_STATUS_INPUT) 1112 if (info->func[0] & PMBUS_HAVE_STATUS_INPUT)
1113 pmbus_add_boolean_reg(data, "curr", 1113 pmbus_add_boolean_reg(data, "curr",
1114 "crit_alarm", 1114 "crit_alarm",
@@ -1131,13 +1131,13 @@ static void pmbus_find_attributes(struct i2c_client *client,
1131 i0 = data->num_sensors; 1131 i0 = data->num_sensors;
1132 pmbus_add_label(data, "curr", in_index, "iout", page + 1); 1132 pmbus_add_label(data, "curr", in_index, "iout", page + 1);
1133 pmbus_add_sensor(data, "curr", "input", in_index, page, 1133 pmbus_add_sensor(data, "curr", "input", in_index, page,
1134 PMBUS_READ_IOUT, PSC_CURRENT_OUT, true); 1134 PMBUS_READ_IOUT, PSC_CURRENT_OUT, true, true);
1135 if (pmbus_check_word_register(client, page, 1135 if (pmbus_check_word_register(client, page,
1136 PMBUS_IOUT_OC_WARN_LIMIT)) { 1136 PMBUS_IOUT_OC_WARN_LIMIT)) {
1137 i1 = data->num_sensors; 1137 i1 = data->num_sensors;
1138 pmbus_add_sensor(data, "curr", "max", in_index, page, 1138 pmbus_add_sensor(data, "curr", "max", in_index, page,
1139 PMBUS_IOUT_OC_WARN_LIMIT, 1139 PMBUS_IOUT_OC_WARN_LIMIT,
1140 PSC_CURRENT_OUT, false); 1140 PSC_CURRENT_OUT, false, false);
1141 if (info->func[page] & PMBUS_HAVE_STATUS_IOUT) { 1141 if (info->func[page] & PMBUS_HAVE_STATUS_IOUT) {
1142 pmbus_add_boolean_reg(data, "curr", "max_alarm", 1142 pmbus_add_boolean_reg(data, "curr", "max_alarm",
1143 in_index, 1143 in_index,
@@ -1151,7 +1151,7 @@ static void pmbus_find_attributes(struct i2c_client *client,
1151 i1 = data->num_sensors; 1151 i1 = data->num_sensors;
1152 pmbus_add_sensor(data, "curr", "lcrit", in_index, page, 1152 pmbus_add_sensor(data, "curr", "lcrit", in_index, page,
1153 PMBUS_IOUT_UC_FAULT_LIMIT, 1153 PMBUS_IOUT_UC_FAULT_LIMIT,
1154 PSC_CURRENT_OUT, false); 1154 PSC_CURRENT_OUT, false, false);
1155 if (info->func[page] & PMBUS_HAVE_STATUS_IOUT) { 1155 if (info->func[page] & PMBUS_HAVE_STATUS_IOUT) {
1156 pmbus_add_boolean_reg(data, "curr", 1156 pmbus_add_boolean_reg(data, "curr",
1157 "lcrit_alarm", 1157 "lcrit_alarm",
@@ -1166,7 +1166,7 @@ static void pmbus_find_attributes(struct i2c_client *client,
1166 i1 = data->num_sensors; 1166 i1 = data->num_sensors;
1167 pmbus_add_sensor(data, "curr", "crit", in_index, page, 1167 pmbus_add_sensor(data, "curr", "crit", in_index, page,
1168 PMBUS_IOUT_OC_FAULT_LIMIT, 1168 PMBUS_IOUT_OC_FAULT_LIMIT,
1169 PSC_CURRENT_OUT, false); 1169 PSC_CURRENT_OUT, false, false);
1170 if (info->func[page] & PMBUS_HAVE_STATUS_IOUT) { 1170 if (info->func[page] & PMBUS_HAVE_STATUS_IOUT) {
1171 pmbus_add_boolean_reg(data, "curr", 1171 pmbus_add_boolean_reg(data, "curr",
1172 "crit_alarm", 1172 "crit_alarm",
@@ -1199,13 +1199,13 @@ static void pmbus_find_attributes(struct i2c_client *client,
1199 i0 = data->num_sensors; 1199 i0 = data->num_sensors;
1200 pmbus_add_label(data, "power", in_index, "pin", 0); 1200 pmbus_add_label(data, "power", in_index, "pin", 0);
1201 pmbus_add_sensor(data, "power", "input", in_index, 1201 pmbus_add_sensor(data, "power", "input", in_index,
1202 0, PMBUS_READ_PIN, PSC_POWER, true); 1202 0, PMBUS_READ_PIN, PSC_POWER, true, true);
1203 if (pmbus_check_word_register(client, 0, 1203 if (pmbus_check_word_register(client, 0,
1204 PMBUS_PIN_OP_WARN_LIMIT)) { 1204 PMBUS_PIN_OP_WARN_LIMIT)) {
1205 i1 = data->num_sensors; 1205 i1 = data->num_sensors;
1206 pmbus_add_sensor(data, "power", "max", in_index, 1206 pmbus_add_sensor(data, "power", "max", in_index,
1207 0, PMBUS_PIN_OP_WARN_LIMIT, PSC_POWER, 1207 0, PMBUS_PIN_OP_WARN_LIMIT, PSC_POWER,
1208 false); 1208 false, false);
1209 if (info->func[0] & PMBUS_HAVE_STATUS_INPUT) 1209 if (info->func[0] & PMBUS_HAVE_STATUS_INPUT)
1210 pmbus_add_boolean_reg(data, "power", 1210 pmbus_add_boolean_reg(data, "power",
1211 "alarm", 1211 "alarm",
@@ -1228,7 +1228,7 @@ static void pmbus_find_attributes(struct i2c_client *client,
1228 i0 = data->num_sensors; 1228 i0 = data->num_sensors;
1229 pmbus_add_label(data, "power", in_index, "pout", page + 1); 1229 pmbus_add_label(data, "power", in_index, "pout", page + 1);
1230 pmbus_add_sensor(data, "power", "input", in_index, page, 1230 pmbus_add_sensor(data, "power", "input", in_index, page,
1231 PMBUS_READ_POUT, PSC_POWER, true); 1231 PMBUS_READ_POUT, PSC_POWER, true, true);
1232 /* 1232 /*
1233 * Per hwmon sysfs API, power_cap is to be used to limit output 1233 * Per hwmon sysfs API, power_cap is to be used to limit output
1234 * power. 1234 * power.
@@ -1241,7 +1241,8 @@ static void pmbus_find_attributes(struct i2c_client *client,
1241 if (pmbus_check_word_register(client, page, PMBUS_POUT_MAX)) { 1241 if (pmbus_check_word_register(client, page, PMBUS_POUT_MAX)) {
1242 i1 = data->num_sensors; 1242 i1 = data->num_sensors;
1243 pmbus_add_sensor(data, "power", "cap", in_index, page, 1243 pmbus_add_sensor(data, "power", "cap", in_index, page,
1244 PMBUS_POUT_MAX, PSC_POWER, false); 1244 PMBUS_POUT_MAX, PSC_POWER,
1245 false, false);
1245 need_alarm = true; 1246 need_alarm = true;
1246 } 1247 }
1247 if (pmbus_check_word_register(client, page, 1248 if (pmbus_check_word_register(client, page,
@@ -1249,7 +1250,7 @@ static void pmbus_find_attributes(struct i2c_client *client,
1249 i1 = data->num_sensors; 1250 i1 = data->num_sensors;
1250 pmbus_add_sensor(data, "power", "max", in_index, page, 1251 pmbus_add_sensor(data, "power", "max", in_index, page,
1251 PMBUS_POUT_OP_WARN_LIMIT, PSC_POWER, 1252 PMBUS_POUT_OP_WARN_LIMIT, PSC_POWER,
1252 false); 1253 false, false);
1253 need_alarm = true; 1254 need_alarm = true;
1254 } 1255 }
1255 if (need_alarm && (info->func[page] & PMBUS_HAVE_STATUS_IOUT)) 1256 if (need_alarm && (info->func[page] & PMBUS_HAVE_STATUS_IOUT))
@@ -1264,7 +1265,7 @@ static void pmbus_find_attributes(struct i2c_client *client,
1264 i1 = data->num_sensors; 1265 i1 = data->num_sensors;
1265 pmbus_add_sensor(data, "power", "crit", in_index, page, 1266 pmbus_add_sensor(data, "power", "crit", in_index, page,
1266 PMBUS_POUT_OP_FAULT_LIMIT, PSC_POWER, 1267 PMBUS_POUT_OP_FAULT_LIMIT, PSC_POWER,
1267 false); 1268 false, false);
1268 if (info->func[page] & PMBUS_HAVE_STATUS_IOUT) 1269 if (info->func[page] & PMBUS_HAVE_STATUS_IOUT)
1269 pmbus_add_boolean_reg(data, "power", 1270 pmbus_add_boolean_reg(data, "power",
1270 "crit_alarm", 1271 "crit_alarm",
@@ -1302,7 +1303,7 @@ static void pmbus_find_attributes(struct i2c_client *client,
1302 i0 = data->num_sensors; 1303 i0 = data->num_sensors;
1303 pmbus_add_sensor(data, "temp", "input", in_index, page, 1304 pmbus_add_sensor(data, "temp", "input", in_index, page,
1304 pmbus_temp_registers[t], 1305 pmbus_temp_registers[t],
1305 PSC_TEMPERATURE, true); 1306 PSC_TEMPERATURE, true, true);
1306 1307
1307 /* 1308 /*
1308 * PMBus provides only one status register for TEMP1-3. 1309 * PMBus provides only one status register for TEMP1-3.
@@ -1323,7 +1324,7 @@ static void pmbus_find_attributes(struct i2c_client *client,
1323 i1 = data->num_sensors; 1324 i1 = data->num_sensors;
1324 pmbus_add_sensor(data, "temp", "min", in_index, 1325 pmbus_add_sensor(data, "temp", "min", in_index,
1325 page, PMBUS_UT_WARN_LIMIT, 1326 page, PMBUS_UT_WARN_LIMIT,
1326 PSC_TEMPERATURE, true); 1327 PSC_TEMPERATURE, true, false);
1327 if (info->func[page] & PMBUS_HAVE_STATUS_TEMP) { 1328 if (info->func[page] & PMBUS_HAVE_STATUS_TEMP) {
1328 pmbus_add_boolean_cmp(data, "temp", 1329 pmbus_add_boolean_cmp(data, "temp",
1329 "min_alarm", in_index, i1, i0, 1330 "min_alarm", in_index, i1, i0,
@@ -1338,7 +1339,7 @@ static void pmbus_find_attributes(struct i2c_client *client,
1338 pmbus_add_sensor(data, "temp", "lcrit", 1339 pmbus_add_sensor(data, "temp", "lcrit",
1339 in_index, page, 1340 in_index, page,
1340 PMBUS_UT_FAULT_LIMIT, 1341 PMBUS_UT_FAULT_LIMIT,
1341 PSC_TEMPERATURE, true); 1342 PSC_TEMPERATURE, true, false);
1342 if (info->func[page] & PMBUS_HAVE_STATUS_TEMP) { 1343 if (info->func[page] & PMBUS_HAVE_STATUS_TEMP) {
1343 pmbus_add_boolean_cmp(data, "temp", 1344 pmbus_add_boolean_cmp(data, "temp",
1344 "lcrit_alarm", in_index, i1, i0, 1345 "lcrit_alarm", in_index, i1, i0,
@@ -1352,7 +1353,7 @@ static void pmbus_find_attributes(struct i2c_client *client,
1352 i1 = data->num_sensors; 1353 i1 = data->num_sensors;
1353 pmbus_add_sensor(data, "temp", "max", in_index, 1354 pmbus_add_sensor(data, "temp", "max", in_index,
1354 page, PMBUS_OT_WARN_LIMIT, 1355 page, PMBUS_OT_WARN_LIMIT,
1355 PSC_TEMPERATURE, true); 1356 PSC_TEMPERATURE, true, false);
1356 if (info->func[page] & PMBUS_HAVE_STATUS_TEMP) { 1357 if (info->func[page] & PMBUS_HAVE_STATUS_TEMP) {
1357 pmbus_add_boolean_cmp(data, "temp", 1358 pmbus_add_boolean_cmp(data, "temp",
1358 "max_alarm", in_index, i0, i1, 1359 "max_alarm", in_index, i0, i1,
@@ -1366,7 +1367,7 @@ static void pmbus_find_attributes(struct i2c_client *client,
1366 i1 = data->num_sensors; 1367 i1 = data->num_sensors;
1367 pmbus_add_sensor(data, "temp", "crit", in_index, 1368 pmbus_add_sensor(data, "temp", "crit", in_index,
1368 page, PMBUS_OT_FAULT_LIMIT, 1369 page, PMBUS_OT_FAULT_LIMIT,
1369 PSC_TEMPERATURE, true); 1370 PSC_TEMPERATURE, true, false);
1370 if (info->func[page] & PMBUS_HAVE_STATUS_TEMP) { 1371 if (info->func[page] & PMBUS_HAVE_STATUS_TEMP) {
1371 pmbus_add_boolean_cmp(data, "temp", 1372 pmbus_add_boolean_cmp(data, "temp",
1372 "crit_alarm", in_index, i0, i1, 1373 "crit_alarm", in_index, i0, i1,
@@ -1421,7 +1422,8 @@ static void pmbus_find_attributes(struct i2c_client *client,
1421 1422
1422 i0 = data->num_sensors; 1423 i0 = data->num_sensors;
1423 pmbus_add_sensor(data, "fan", "input", in_index, page, 1424 pmbus_add_sensor(data, "fan", "input", in_index, page,
1424 pmbus_fan_registers[f], PSC_FAN, true); 1425 pmbus_fan_registers[f], PSC_FAN, true,
1426 true);
1425 1427
1426 /* 1428 /*
1427 * Each fan status register covers multiple fans, 1429 * Each fan status register covers multiple fans,