exynos_tmu.c (03ef4855a825f9ba7195454f6498e0f056be995a) exynos_tmu.c (a1c306375b0638f37996bbda1e3a75c6f108a097)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * exynos_tmu.c - Samsung Exynos TMU (Thermal Management Unit)
4 *
5 * Copyright (C) 2014 Samsung Electronics
6 * Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
7 * Lukasz Majewski <l.majewski@samsung.com>
8 *

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

259static int exynos_tmu_initialize(struct platform_device *pdev)
260{
261 struct exynos_tmu_data *data = platform_get_drvdata(pdev);
262 struct thermal_zone_device *tzd = data->tzd;
263 int num_trips = thermal_zone_get_num_trips(tzd);
264 unsigned int status;
265 int ret = 0, temp;
266
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * exynos_tmu.c - Samsung Exynos TMU (Thermal Management Unit)
4 *
5 * Copyright (C) 2014 Samsung Electronics
6 * Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
7 * Lukasz Majewski <l.majewski@samsung.com>
8 *

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

259static int exynos_tmu_initialize(struct platform_device *pdev)
260{
261 struct exynos_tmu_data *data = platform_get_drvdata(pdev);
262 struct thermal_zone_device *tzd = data->tzd;
263 int num_trips = thermal_zone_get_num_trips(tzd);
264 unsigned int status;
265 int ret = 0, temp;
266
267 if (data->soc != SOC_ARCH_EXYNOS5433) /* FIXME */
268 ret = tzd->ops->get_crit_temp(tzd, &temp);
269 if (ret) {
267 ret = thermal_zone_get_crit_temp(tzd, &temp);
268 if (ret && data->soc != SOC_ARCH_EXYNOS5433) { /* FIXME */
270 dev_err(&pdev->dev,
271 "No CRITICAL trip point defined in device tree!\n");
272 goto out;
273 }
274
275 if (num_trips > data->ntrip) {
276 dev_info(&pdev->dev,
277 "More trip points than supported by this TMU.\n");

--- 909 unchanged lines hidden ---
269 dev_err(&pdev->dev,
270 "No CRITICAL trip point defined in device tree!\n");
271 goto out;
272 }
273
274 if (num_trips > data->ntrip) {
275 dev_info(&pdev->dev,
276 "More trip points than supported by this TMU.\n");

--- 909 unchanged lines hidden ---