Lines Matching defs:temp
234 struct temp_sensor_1 *temp;
243 temp = ((struct temp_sensor_1 *)sensors->temp.data) + sattr->index;
247 val = get_unaligned_be16(&temp->sensor_id);
254 if (temp->value == 0xFFFF)
256 val = get_unaligned_be16(&temp->value) * 1000;
270 struct temp_sensor_2 *temp;
279 temp = ((struct temp_sensor_2 *)sensors->temp.data) + sattr->index;
283 val = get_unaligned_be32(&temp->sensor_id);
286 val = temp->value;
295 if (temp->fru_type != OCC_FRU_TYPE_VRM) {
304 val = temp->fru_type;
307 val = temp->value == OCC_TEMP_SENSOR_FAULT;
321 struct temp_sensor_10 *temp;
330 temp = ((struct temp_sensor_10 *)sensors->temp.data) + sattr->index;
334 val = get_unaligned_be32(&temp->sensor_id);
337 val = temp->value;
348 val = temp->fru_type;
351 val = temp->value == OCC_TEMP_SENSOR_FAULT;
354 val = temp->throttle * 1000;
783 struct temp_sensor_2 *temp;
793 switch (sensors->temp.version) {
795 num_attrs += (sensors->temp.num_sensors * 2);
798 num_attrs += (sensors->temp.num_sensors * 4);
802 num_attrs += (sensors->temp.num_sensors * 5);
806 sensors->temp.num_sensors = 0;
871 for (i = 0; i < sensors->temp.num_sensors; ++i) {
873 temp = ((struct temp_sensor_2 *)sensors->temp.data) + i;
875 snprintf(attr->name, sizeof(attr->name), "temp%d_label", s);
880 if (sensors->temp.version == 2 &&
881 temp->fru_type == OCC_FRU_TYPE_VRM) {
883 "temp%d_alarm", s);
886 "temp%d_input", s);
893 if (sensors->temp.version > 1) {
895 "temp%d_fru_type", s);
901 "temp%d_fault", s);
906 if (sensors->temp.version == 0x10) {
908 "temp%d_max", s);
1126 sensor = &sensors->temp;