Lines Matching refs:tdata
165 struct hwmon_thermal_data *tdata = thermal_zone_device_priv(tz); in hwmon_thermal_get_temp() local
166 struct hwmon_device *hwdev = to_hwmon_device(tdata->dev); in hwmon_thermal_get_temp()
172 ret = hwdev->chip->ops->read(tdata->dev, hwmon_temp, hwmon_temp_input, in hwmon_thermal_get_temp()
173 tdata->index, &t); in hwmon_thermal_get_temp()
184 struct hwmon_thermal_data *tdata = thermal_zone_device_priv(tz); in hwmon_thermal_set_trips() local
185 struct hwmon_device *hwdev = to_hwmon_device(tdata->dev); in hwmon_thermal_set_trips()
202 if (info[i]->config[tdata->index] & HWMON_T_MIN) { in hwmon_thermal_set_trips()
203 err = chip->ops->write(tdata->dev, hwmon_temp, in hwmon_thermal_set_trips()
204 hwmon_temp_min, tdata->index, low); in hwmon_thermal_set_trips()
209 if (info[i]->config[tdata->index] & HWMON_T_MAX) { in hwmon_thermal_set_trips()
210 err = chip->ops->write(tdata->dev, hwmon_temp, in hwmon_thermal_set_trips()
211 hwmon_temp_max, tdata->index, high); in hwmon_thermal_set_trips()
232 struct hwmon_thermal_data *tdata; in hwmon_thermal_add_sensor() local
236 tdata = devm_kzalloc(dev, sizeof(*tdata), GFP_KERNEL); in hwmon_thermal_add_sensor()
237 if (!tdata) in hwmon_thermal_add_sensor()
240 tdata->dev = dev; in hwmon_thermal_add_sensor()
241 tdata->index = index; in hwmon_thermal_add_sensor()
243 tzd = devm_thermal_of_zone_register(dev, index, tdata, in hwmon_thermal_add_sensor()
250 devm_kfree(dev, tdata); in hwmon_thermal_add_sensor()
254 err = devm_add_action(dev, hwmon_thermal_remove_sensor, &tdata->node); in hwmon_thermal_add_sensor()
258 tdata->tzd = tzd; in hwmon_thermal_add_sensor()
259 list_add(&tdata->node, &hwdev->tzdata); in hwmon_thermal_add_sensor()