Lines Matching refs:tdata
163 struct hwmon_thermal_data *tdata = thermal_zone_device_priv(tz); in hwmon_thermal_get_temp() local
164 struct hwmon_device *hwdev = to_hwmon_device(tdata->dev); in hwmon_thermal_get_temp()
168 ret = hwdev->chip->ops->read(tdata->dev, hwmon_temp, hwmon_temp_input, in hwmon_thermal_get_temp()
169 tdata->index, &t); in hwmon_thermal_get_temp()
180 struct hwmon_thermal_data *tdata = thermal_zone_device_priv(tz); in hwmon_thermal_set_trips() local
181 struct hwmon_device *hwdev = to_hwmon_device(tdata->dev); in hwmon_thermal_set_trips()
196 if (info[i]->config[tdata->index] & HWMON_T_MIN) { in hwmon_thermal_set_trips()
197 err = chip->ops->write(tdata->dev, hwmon_temp, in hwmon_thermal_set_trips()
198 hwmon_temp_min, tdata->index, low); in hwmon_thermal_set_trips()
203 if (info[i]->config[tdata->index] & HWMON_T_MAX) { in hwmon_thermal_set_trips()
204 err = chip->ops->write(tdata->dev, hwmon_temp, in hwmon_thermal_set_trips()
205 hwmon_temp_max, tdata->index, high); in hwmon_thermal_set_trips()
226 struct hwmon_thermal_data *tdata; in hwmon_thermal_add_sensor() local
230 tdata = devm_kzalloc(dev, sizeof(*tdata), GFP_KERNEL); in hwmon_thermal_add_sensor()
231 if (!tdata) in hwmon_thermal_add_sensor()
234 tdata->dev = dev; in hwmon_thermal_add_sensor()
235 tdata->index = index; in hwmon_thermal_add_sensor()
237 tzd = devm_thermal_of_zone_register(dev, index, tdata, in hwmon_thermal_add_sensor()
244 devm_kfree(dev, tdata); in hwmon_thermal_add_sensor()
248 err = devm_add_action(dev, hwmon_thermal_remove_sensor, &tdata->node); in hwmon_thermal_add_sensor()
252 tdata->tzd = tzd; in hwmon_thermal_add_sensor()
253 list_add(&tdata->node, &hwdev->tzdata); in hwmon_thermal_add_sensor()