exynos_tmu.c (3d883483dc0a7261d73d8b1857a7387a1dd99eee) | exynos_tmu.c (4531fa1684bb883ee01f1a182900b1e15d461b34) |
---|---|
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 --- 702 unchanged lines hidden (view full) --- 711 writel(interrupt_en, data->base + EXYNOS7_TMU_REG_INTEN); 712 writel(con, data->base + EXYNOS_TMU_REG_CONTROL); 713} 714 715static int exynos_get_temp(void *p, long *temp) 716{ 717 struct exynos_tmu_data *data = p; 718 | 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 --- 702 unchanged lines hidden (view full) --- 711 writel(interrupt_en, data->base + EXYNOS7_TMU_REG_INTEN); 712 writel(con, data->base + EXYNOS_TMU_REG_CONTROL); 713} 714 715static int exynos_get_temp(void *p, long *temp) 716{ 717 struct exynos_tmu_data *data = p; 718 |
719 if (!data) | 719 if (!data || !data->tmu_read) |
720 return -EINVAL; 721 722 mutex_lock(&data->lock); 723 clk_enable(data->clk); 724 725 *temp = code_to_temp(data, data->tmu_read(data)) * MCELSIUS; 726 727 clk_disable(data->clk); --- 566 unchanged lines hidden --- | 720 return -EINVAL; 721 722 mutex_lock(&data->lock); 723 clk_enable(data->clk); 724 725 *temp = code_to_temp(data, data->tmu_read(data)) * MCELSIUS; 726 727 clk_disable(data->clk); --- 566 unchanged lines hidden --- |