Lines Matching refs:tdata
156 struct hwmon_thermal_data *tdata = tz->devdata; in hwmon_thermal_get_temp() local
157 struct hwmon_device *hwdev = to_hwmon_device(tdata->dev); in hwmon_thermal_get_temp()
161 ret = hwdev->chip->ops->read(tdata->dev, hwmon_temp, hwmon_temp_input, in hwmon_thermal_get_temp()
162 tdata->index, &t); in hwmon_thermal_get_temp()
173 struct hwmon_thermal_data *tdata = tz->devdata; in hwmon_thermal_set_trips() local
174 struct hwmon_device *hwdev = to_hwmon_device(tdata->dev); in hwmon_thermal_set_trips()
189 if (info[i]->config[tdata->index] & HWMON_T_MIN) { in hwmon_thermal_set_trips()
190 err = chip->ops->write(tdata->dev, hwmon_temp, in hwmon_thermal_set_trips()
191 hwmon_temp_min, tdata->index, low); in hwmon_thermal_set_trips()
196 if (info[i]->config[tdata->index] & HWMON_T_MAX) { in hwmon_thermal_set_trips()
197 err = chip->ops->write(tdata->dev, hwmon_temp, in hwmon_thermal_set_trips()
198 hwmon_temp_max, tdata->index, high); in hwmon_thermal_set_trips()
219 struct hwmon_thermal_data *tdata; in hwmon_thermal_add_sensor() local
223 tdata = devm_kzalloc(dev, sizeof(*tdata), GFP_KERNEL); in hwmon_thermal_add_sensor()
224 if (!tdata) in hwmon_thermal_add_sensor()
227 tdata->dev = dev; in hwmon_thermal_add_sensor()
228 tdata->index = index; in hwmon_thermal_add_sensor()
230 tzd = devm_thermal_of_zone_register(dev, index, tdata, in hwmon_thermal_add_sensor()
237 devm_kfree(dev, tdata); in hwmon_thermal_add_sensor()
241 err = devm_add_action(dev, hwmon_thermal_remove_sensor, &tdata->node); in hwmon_thermal_add_sensor()
245 tdata->tzd = tzd; in hwmon_thermal_add_sensor()
246 list_add(&tdata->node, &hwdev->tzdata); in hwmon_thermal_add_sensor()