exynos_tmu.c (c8f8f7682e13d219699f6980cd0ba067f06d0dcf) exynos_tmu.c (89335c203a8d45a9380c9fec4cdc8cda404569ad)
1/*
2 * exynos_tmu.c - Samsung EXYNOS TMU (Thermal Management Unit)
3 *
4 * Copyright (C) 2014 Samsung Electronics
5 * Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
6 * Lukasz Majewski <l.majewski@samsung.com>
7 *
8 * Copyright (C) 2011 Samsung Electronics

--- 343 unchanged lines hidden (view full) ---

352 int i, ntrips =
353 min_t(int, of_thermal_get_ntrips(tzd), data->ntrip);
354
355 data->tmu_initialize(pdev);
356
357 /* Write temperature code for rising and falling threshold */
358 for (i = 0; i < ntrips; i++) {
359 /* Write temperature code for rising threshold */
1/*
2 * exynos_tmu.c - Samsung EXYNOS TMU (Thermal Management Unit)
3 *
4 * Copyright (C) 2014 Samsung Electronics
5 * Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
6 * Lukasz Majewski <l.majewski@samsung.com>
7 *
8 * Copyright (C) 2011 Samsung Electronics

--- 343 unchanged lines hidden (view full) ---

352 int i, ntrips =
353 min_t(int, of_thermal_get_ntrips(tzd), data->ntrip);
354
355 data->tmu_initialize(pdev);
356
357 /* Write temperature code for rising and falling threshold */
358 for (i = 0; i < ntrips; i++) {
359 /* Write temperature code for rising threshold */
360 tzd->ops->get_trip_temp(tzd, i, &temp);
360 ret = tzd->ops->get_trip_temp(tzd, i, &temp);
361 if (ret)
362 goto err;
361 temp /= MCELSIUS;
362 data->tmu_set_trip_temp(data, i, temp);
363
364 /* Write temperature code for falling threshold */
363 temp /= MCELSIUS;
364 data->tmu_set_trip_temp(data, i, temp);
365
366 /* Write temperature code for falling threshold */
365 tzd->ops->get_trip_hyst(tzd, i, &hyst);
367 ret = tzd->ops->get_trip_hyst(tzd, i, &hyst);
368 if (ret)
369 goto err;
366 hyst /= MCELSIUS;
367 data->tmu_set_trip_hyst(data, i, temp, hyst);
368 }
369
370 data->tmu_clear_irqs(data);
371 }
370 hyst /= MCELSIUS;
371 data->tmu_set_trip_hyst(data, i, temp, hyst);
372 }
373
374 data->tmu_clear_irqs(data);
375 }
372
376err:
373 clk_disable(data->clk);
374 mutex_unlock(&data->lock);
375 if (!IS_ERR(data->clk_sec))
376 clk_disable(data->clk_sec);
377out:
378 return ret;
379}
380

--- 881 unchanged lines hidden ---
377 clk_disable(data->clk);
378 mutex_unlock(&data->lock);
379 if (!IS_ERR(data->clk_sec))
380 clk_disable(data->clk_sec);
381out:
382 return ret;
383}
384

--- 881 unchanged lines hidden ---