Lines Matching defs:sensor
3 * HWMON driver for ASUS motherboards that provides sensor readouts via WMI
138 * struct asus_wmi_sensor_info - sensor info.
139 * @id: sensor id.
140 * @data_type: sensor class e.g. voltage, temp etc.
141 * @location: sensor location.
142 * @name: sensor name.
143 * @source: sensor source.
144 * @type: sensor type signed, unsigned etc.
145 * @cached_value: cached sensor value.
219 * Gets the number of sensor items
267 * For a given sensor item returns details e.g. type (voltage/temperature/fan speed etc), bank etc
381 struct asus_wmi_sensor_info *sensor;
387 sensor = sensor_data->wmi.info_by_id[i];
388 if (sensor && sensor->source == source) {
389 ret = asus_wmi_get_sensor_value(sensor->id, &value);
393 sensor->cached_value = value;
417 static int asus_wmi_get_cached_value_or_update(const struct asus_wmi_sensor_info *sensor,
425 if (time_after(jiffies, sensor_data->wmi.source_last_updated[sensor->source] + HZ)) {
426 ret = asus_wmi_update_buffer(sensor->source);
430 ret = asus_wmi_update_values_for_source(sensor->source, sensor_data);
434 sensor_data->wmi.source_last_updated[sensor->source] = jiffies;
437 *value = sensor->cached_value;
449 const struct asus_wmi_sensor_info *sensor;
455 sensor = *(sensor_data->wmi.info[type] + channel);
457 ret = asus_wmi_get_cached_value_or_update(sensor, sensor_data, &value);
461 *val = asus_wmi_scale_sensor_value(value, sensor->data_type);
471 const struct asus_wmi_sensor_info *sensor;
473 sensor = *(sensor_data->wmi.info[type] + channel);
474 *str = sensor->name;
484 const struct asus_wmi_sensor_info *sensor;
486 sensor = *(sensor_data->wmi.info[type] + channel);
487 if (sensor)
518 struct asus_wmi_sensor_info sensor;
520 err = asus_wmi_sensor_info(i, &sensor);
524 switch (sensor.data_type) {
530 type = asus_data_types[sensor.data_type];