Lines Matching refs:th
64 struct db8500_thermal_zone *th = thermal_zone_device_priv(tz);
71 *temp = th->interpolated_temp;
80 static void db8500_thermal_update_config(struct db8500_thermal_zone *th,
87 th->cur_index = idx;
88 th->interpolated_temp = (next_low + next_high)/2;
100 struct db8500_thermal_zone *th = irq_data;
101 unsigned int idx = th->cur_index;
117 db8500_thermal_update_config(th, idx, next_low, next_high);
118 dev_dbg(th->dev,
121 thermal_zone_device_update(th->tz, THERMAL_EVENT_UNSPECIFIED);
128 struct db8500_thermal_zone *th = irq_data;
129 unsigned int idx = th->cur_index;
138 db8500_thermal_update_config(th, idx, next_low, next_high);
140 dev_dbg(th->dev,
144 th->interpolated_temp = db8500_thermal_points[idx] + 1;
146 thermal_zone_device_update(th->tz, THERMAL_EVENT_UNSPECIFIED);
153 struct db8500_thermal_zone *th = NULL;
157 th = devm_kzalloc(dev, sizeof(*th), GFP_KERNEL);
158 if (!th)
161 th->dev = dev;
169 "dbx500_temp_low", th);
181 "dbx500_temp_high", th);
188 th->tz = devm_thermal_of_zone_register(dev, 0, th, &thdev_ops);
189 if (IS_ERR(th->tz)) {
191 return PTR_ERR(th->tz);
196 db8500_thermal_update_config(th, 0, PRCMU_DEFAULT_LOW_TEMP,
199 platform_set_drvdata(pdev, th);
214 struct db8500_thermal_zone *th = platform_get_drvdata(pdev);
217 db8500_thermal_update_config(th, 0, PRCMU_DEFAULT_LOW_TEMP,