Lines Matching refs:nsensor

361  * @nsensor: numeric sensor properties
371 struct hp_wmi_numeric_sensor nsensor;
681 numeric_sensor_is_connected(const struct hp_wmi_numeric_sensor *nsensor)
683 u32 operational_status = nsensor->operational_status;
688 static int numeric_sensor_has_fault(const struct hp_wmi_numeric_sensor *nsensor)
690 u32 operational_status = nsensor->operational_status;
713 static long scale_numeric_sensor(const struct hp_wmi_numeric_sensor *nsensor)
715 u32 current_reading = nsensor->current_reading;
716 s32 unit_modifier = nsensor->unit_modifier;
717 u32 sensor_type = nsensor->sensor_type;
718 u32 base_units = nsensor->base_units;
758 * @nsensor: pointer to numeric sensor struct
763 static int classify_numeric_sensor(const struct hp_wmi_numeric_sensor *nsensor)
765 u32 sensor_type = nsensor->sensor_type;
766 u32 base_units = nsensor->base_units;
767 const char *name = nsensor->name;
813 struct hp_wmi_numeric_sensor *nsensor,
837 nsensor->possible_states = possible_states;
838 nsensor->size = size;
854 nsensor->name = string;
858 nsensor->description = string;
865 nsensor->sensor_type = value;
869 nsensor->other_sensor_type = string;
873 nsensor->operational_status = value;
894 nsensor->current_state = string;
902 nsensor->base_units = value;
907 nsensor->unit_modifier = (s32)value;
911 nsensor->current_reading = value;
915 nsensor->rate_units = value;
931 struct hp_wmi_numeric_sensor *nsensor,
951 nsensor->operational_status = element->integer.value;
968 if (strcmp(trimmed, nsensor->current_state)) {
971 devm_kfree(dev, nsensor->current_state);
972 nsensor->current_state = new_string;
984 nsensor->unit_modifier = (s32)element->integer.value;
987 nsensor->current_reading = element->integer.value;
1175 const struct hp_wmi_numeric_sensor *nsensor = &info->nsensor;
1177 info->cached_val = scale_numeric_sensor(nsensor);
1191 struct hp_wmi_numeric_sensor *nsensor = &info->nsensor;
1206 update_numeric_sensor_from_wobj(dev, nsensor, wobj);
1231 struct hp_wmi_numeric_sensor *nsensor;
1238 nsensor = &info->nsensor;
1246 seq_printf(seqf, "%u\n", nsensor->operational_status);
1250 seq_printf(seqf, "%s\n", nsensor->current_state);
1254 seq_printf(seqf, "%d\n", nsensor->unit_modifier);
1258 seq_printf(seqf, "%u\n", nsensor->current_reading);
1282 struct hp_wmi_numeric_sensor *nsensor = seqf->private;
1285 for (i = 0; i < nsensor->size; i++)
1287 nsensor->possible_states[i]);
1318 struct hp_wmi_numeric_sensor *nsensor;
1341 nsensor = &info->nsensor;
1347 (void *)nsensor->name,
1351 (void *)nsensor->description,
1355 &nsensor->sensor_type);
1358 (void *)nsensor->other_sensor_type,
1365 nsensor, &possible_states_fops);
1371 &nsensor->base_units);
1381 &nsensor->rate_units);
1446 const struct hp_wmi_numeric_sensor *nsensor;
1466 nsensor = &info->nsensor;
1474 *out_val = numeric_sensor_has_fault(nsensor);
1489 *out_str = info->nsensor.name;
1536 name = info->nsensor.name;
1575 name = info->nsensor.name;
1733 struct hp_wmi_numeric_sensor *nsensor;
1762 nsensor = &info->nsensor;
1764 err = populate_numeric_sensor_from_wobj(dev, nsensor, wobj,
1772 if (!numeric_sensor_is_connected(nsensor))
1775 wtype = classify_numeric_sensor(nsensor);