]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
thermal: exynos: fix setting rising_threshold for Exynos5433
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Thu, 26 Apr 2018 11:51:16 +0000 (13:51 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 1 Mar 2019 13:20:47 +0000 (14:20 +0100)
BugLink: http://bugs.launchpad.net/bugs/1815234
[ Upstream commit 8bfc218d0ebbabcba8ed2b8ec1831e0cf1f71629 ]

Add missing clearing of the previous value when setting rising
temperature threshold.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/thermal/samsung/exynos_tmu.c

index ac83f721db24d78cff24d9349ecf75edafe9f2d4..d60069b5dc98dee7bb4ccf82f11c057fc9519a11 100644 (file)
@@ -598,6 +598,7 @@ static int exynos5433_tmu_initialize(struct platform_device *pdev)
                threshold_code = temp_to_code(data, temp);
 
                rising_threshold = readl(data->base + rising_reg_offset);
+               rising_threshold &= ~(0xff << j * 8);
                rising_threshold |= (threshold_code << j * 8);
                writel(rising_threshold, data->base + rising_reg_offset);