Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359769
b: refs/heads/master
c: 3ad9524
h: refs/heads/master
i:
  359767: 3b3f132
v: v3
  • Loading branch information
Amit Daniel Kachhap authored and Zhang Rui committed Feb 6, 2013
1 parent 0b00bd4 commit 213b1bf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d6d71ee4a14ae602db343ec48c491851d7ec5267
refs/heads/master: 3ad9524a15126c24fc37922f56a0fb5dd03c218f
17 changes: 11 additions & 6 deletions trunk/drivers/thermal/exynos_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@

#define EXYNOS_TRIMINFO_RELOAD 0x1
#define EXYNOS_TMU_CLEAR_RISE_INT 0x111
#define EXYNOS_TMU_CLEAR_FALL_INT (0x111 << 16)
#define EXYNOS_TMU_CLEAR_FALL_INT (0x111 << 12)
#define EXYNOS_MUX_ADDR_VALUE 6
#define EXYNOS_MUX_ADDR_SHIFT 20
#define EXYNOS_TMU_TRIP_MODE_SHIFT 13
Expand Down Expand Up @@ -370,7 +370,14 @@ static int exynos_get_temp(struct thermal_zone_device *thermal,
static int exynos_get_trend(struct thermal_zone_device *thermal,
int trip, enum thermal_trend *trend)
{
if (thermal->temperature >= trip)
int ret;
unsigned long trip_temp;

ret = exynos_get_trip_temp(thermal, trip, &trip_temp);
if (ret < 0)
return ret;

if (thermal->temperature >= trip_temp)
*trend = THERMAL_TREND_RAISING;
else
*trend = THERMAL_TREND_DROPPING;
Expand Down Expand Up @@ -705,20 +712,18 @@ static void exynos_tmu_work(struct work_struct *work)
struct exynos_tmu_data *data = container_of(work,
struct exynos_tmu_data, irq_work);

exynos_report_trigger();
mutex_lock(&data->lock);
clk_enable(data->clk);


if (data->soc == SOC_ARCH_EXYNOS)
writel(EXYNOS_TMU_CLEAR_RISE_INT,
data->base + EXYNOS_TMU_REG_INTCLEAR);
else
writel(EXYNOS4210_TMU_INTCLEAR_VAL,
data->base + EXYNOS_TMU_REG_INTCLEAR);

clk_disable(data->clk);
mutex_unlock(&data->lock);
exynos_report_trigger();

enable_irq(data->irq);
}

Expand Down

0 comments on commit 213b1bf

Please sign in to comment.