[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <1539791563-5959-12-git-send-email-b.zolnierkie@samsung.com>
Date: Wed, 17 Oct 2018 17:52:37 +0200
From: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
To: Zhang Rui <rui.zhang@...el.com>,
Eduardo Valentin <edubezval@...il.com>
Cc: Amit kucheria <amit.kucheria@...aro.org>,
Eric Anholt <eric@...olt.net>,
Stefan Wahren <stefan.wahren@...e.com>,
Markus Mayer <mmayer@...adcom.com>,
bcm-kernel-feedback-list@...adcom.com,
Heiko Stuebner <heiko@...ech.de>,
Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Keerthy <j-keerthy@...com>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Jun Nie <jun.nie@...aro.org>,
Baoyou Xie <baoyou.xie@...aro.org>,
Shawn Guo <shawnguo@...nel.org>, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, b.zolnierkie@...sung.com
Subject: [PATCH v2 11/17] thermal: rockchip_thermal: enable+check sensor
after its setup is finished
* Enable+check sensor explicitly in rockchip_thermal_probe() (also
check sensor after doing chipset specific control operation).
* Remove superfluous second sensor enable+check attempt.
Cc: Heiko Stuebner <heiko@...ech.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
---
drivers/thermal/rockchip_thermal.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c
index 90d8175..ef9e2aa 100644
--- a/drivers/thermal/rockchip_thermal.c
+++ b/drivers/thermal/rockchip_thermal.c
@@ -1161,9 +1161,6 @@ static int rockchip_configure_from_dt(struct device *dev,
return error;
}
- thermal_zone_set_mode(sensor->tzd, THERMAL_DEVICE_ENABLED);
- thermal_zone_device_check(sensor->tzd);
-
return 0;
}
@@ -1272,6 +1269,10 @@ static int rockchip_thermal_probe(struct platform_device *pdev)
}
}
+ for (i = 0; i < thermal->chip->chn_num; i++)
+ thermal_zone_set_mode((&thermal->sensors[i])->tzd,
+ THERMAL_DEVICE_ENABLED);
+
error = devm_request_threaded_irq(&pdev->dev, irq, NULL,
&rockchip_thermal_alarm_irq_thread,
IRQF_ONESHOT,
@@ -1284,11 +1285,8 @@ static int rockchip_thermal_probe(struct platform_device *pdev)
thermal->chip->control(thermal->regs, true);
- for (i = 0; i < thermal->chip->chn_num; i++) {
- thermal_zone_set_mode((&thermal->sensors[i])->tzd,
- THERMAL_DEVICE_ENABLED);
+ for (i = 0; i < thermal->chip->chn_num; i++)
thermal_zone_device_check((&thermal->sensors[i])->tzd);
- }
platform_set_drvdata(pdev, thermal);
--
1.9.1
Powered by blists - more mailing lists