Skip to content

Commit b43e3cf

Browse files
bzolnierEduardo Valentin
authored andcommitted
thermal: exynos: remove trip reporting to user-space
Remove trip reporting to user-space - I'm not aware of any user-space program which relies on it and there is a thermal user-space governor which does it in proper way nowadays. Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
1 parent 2b2426a commit b43e3cf

File tree

1 file changed

+2
-28
lines changed

1 file changed

+2
-28
lines changed

drivers/thermal/samsung/exynos_tmu.c

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -216,33 +216,6 @@ struct exynos_tmu_data {
216216
void (*tmu_clear_irqs)(struct exynos_tmu_data *data);
217217
};
218218

219-
static void exynos_report_trigger(struct exynos_tmu_data *p)
220-
{
221-
char data[10], *envp[] = { data, NULL };
222-
struct thermal_zone_device *tz = p->tzd;
223-
int temp;
224-
unsigned int i;
225-
226-
if (!tz) {
227-
pr_err("No thermal zone device defined\n");
228-
return;
229-
}
230-
231-
thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED);
232-
233-
mutex_lock(&tz->lock);
234-
/* Find the level for which trip happened */
235-
for (i = 0; i < of_thermal_get_ntrips(tz); i++) {
236-
tz->ops->get_trip_temp(tz, i, &temp);
237-
if (tz->last_temperature < temp)
238-
break;
239-
}
240-
241-
snprintf(data, sizeof(data), "%u", i);
242-
kobject_uevent_env(&tz->device.kobj, KOBJ_CHANGE, envp);
243-
mutex_unlock(&tz->lock);
244-
}
245-
246219
/*
247220
* TMU treats temperature as a mapped temperature code.
248221
* The temperature is converted differently depending on the calibration type.
@@ -815,7 +788,8 @@ static void exynos_tmu_work(struct work_struct *work)
815788
if (!IS_ERR(data->clk_sec))
816789
clk_disable(data->clk_sec);
817790

818-
exynos_report_trigger(data);
791+
thermal_zone_device_update(data->tzd, THERMAL_EVENT_UNSPECIFIED);
792+
819793
mutex_lock(&data->lock);
820794
clk_enable(data->clk);
821795

0 commit comments

Comments
 (0)