Lines Matching refs:tdata
141 struct hwmon_thermal_data *tdata = data; in hwmon_thermal_get_temp() local
142 struct hwmon_device *hwdev = to_hwmon_device(tdata->dev); in hwmon_thermal_get_temp()
146 ret = hwdev->chip->ops->read(tdata->dev, hwmon_temp, hwmon_temp_input, in hwmon_thermal_get_temp()
147 tdata->index, &t); in hwmon_thermal_get_temp()
158 struct hwmon_thermal_data *tdata = data; in hwmon_thermal_set_trips() local
159 struct hwmon_device *hwdev = to_hwmon_device(tdata->dev); in hwmon_thermal_set_trips()
174 if (info[i]->config[tdata->index] & HWMON_T_MIN) { in hwmon_thermal_set_trips()
175 err = chip->ops->write(tdata->dev, hwmon_temp, in hwmon_thermal_set_trips()
176 hwmon_temp_min, tdata->index, low); in hwmon_thermal_set_trips()
181 if (info[i]->config[tdata->index] & HWMON_T_MAX) { in hwmon_thermal_set_trips()
182 err = chip->ops->write(tdata->dev, hwmon_temp, in hwmon_thermal_set_trips()
183 hwmon_temp_max, tdata->index, high); in hwmon_thermal_set_trips()
204 struct hwmon_thermal_data *tdata; in hwmon_thermal_add_sensor() local
208 tdata = devm_kzalloc(dev, sizeof(*tdata), GFP_KERNEL); in hwmon_thermal_add_sensor()
209 if (!tdata) in hwmon_thermal_add_sensor()
212 tdata->dev = dev; in hwmon_thermal_add_sensor()
213 tdata->index = index; in hwmon_thermal_add_sensor()
215 tzd = devm_thermal_zone_of_sensor_register(dev, index, tdata, in hwmon_thermal_add_sensor()
224 err = devm_add_action(dev, hwmon_thermal_remove_sensor, &tdata->node); in hwmon_thermal_add_sensor()
228 tdata->tzd = tzd; in hwmon_thermal_add_sensor()
229 list_add(&tdata->node, &hwdev->tzdata); in hwmon_thermal_add_sensor()