From: Eduardo Valentin <edubezval@gmail.com>
To: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Zhang Rui <rui.zhang@intel.com>, Eric Anholt <eric@anholt.net>,
Stefan Wahren <stefan.wahren@i2se.com>,
Markus Mayer <mmayer@broadcom.com>,
bcm-kernel-feedback-list@broadcom.com,
Heiko Stuebner <heiko@sntech.de>,
Thierry Reding <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
Keerthy <j-keerthy@ti.com>,
Masahiro Yamada <yamada.masahiro@socionext.com>,
Jun Nie <jun.nie@linaro.org>, Baoyou Xie <baoyou.xie@linaro.org>,
Shawn Guo <shawnguo@kernel.org>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 00/17] thermal: enable/check sensor after its setup is finished
Date: Mon, 10 Sep 2018 10:37:01 -0700 [thread overview]
Message-ID: <20180910173659.GB4196@localhost.localdomain> (raw)
In-Reply-To: <1523364131-31059-1-git-send-email-b.zolnierkie@samsung.com>
On Tue, Apr 10, 2018 at 02:41:54PM +0200, Bartlomiej Zolnierkiewicz wrote:
> Hi,
>
> [devm]_thermal_zone_of_sensor_register() is used to register
> thermal sensor by thermal drivers using DeviceTree. Besides
> registering sensor this function also immediately enables it
> (using ->set_mode method) and then checks it with a update call
> to the thermal core (which ends up using ->get_temp method).
Yeah, pretty much the driver needs to be ready to answer to callbacks
once it calls thermal_*_register() method.
> For many DT thermal drivers this causes a problem because
Can you be more specific? Are you seeing this problem in samsung driver
or in other drivers too?
> [devm]_thermal_zone_of_sensor_register() need to be called in
> order to obtain data about thermal trips which are then used to
> finish hardware sensor setup (only after which ->get_temp can
> be used). The issue has been observed when using Samsung Exynos
Oh I see, this is because trip info is read by the of thermal thermal
then, correct?
> thermal driver and fixed internally in the driver in commit
> d8efad71e5b6 ("thermal: exynos: Reading temperature makes sense
> only when TMU is turned on"). However after this commit there
> are now following warnings from the thermal core visible:
>
> [ 3.453602] thermal thermal_zone0: failed to read out thermal zone (-22)
> [ 3.483468] thermal thermal_zone1: failed to read out thermal zone (-22)
> [ 3.505965] thermal thermal_zone2: failed to read out thermal zone (-22)
> [ 3.528455] thermal thermal_zone3: failed to read out thermal zone (-22)
> [ 3.550939] thermal thermal_zone4: failed to read out thermal zone (-22)
>
> This patchset attempts to directly address the thermal core
> problem with [devm]_thermal_zone_of_sensor_register() and
> affected DT thermal drivers. In order to achieve this sensor
> registration, enable and check operations are separated and
> corresponding drivers are modified to use the new helpers to
> enable and check sensor explicitly.
>
Ok. Up to this point I followed that this is a samsung driver issue, not
we need to change the core to fix adapt to it?
And adapting the core should be fine to fit a new use/fix something,
as long the issue is well described..
> Tested on Exynos5422 based Odroid-XU3 Lite board (aforementioned
> warnings from the thermal core are now gone).
>
> Best regards,
> --
> Bartlomiej Zolnierkiewicz
> Samsung R&D Institute Poland
> Samsung Electronics
>
>
> Bartlomiej Zolnierkiewicz (17):
> thermal: add thermal_zone_device_toggle() helper
> thermal: separate sensor registration and enable
> thermal: add thermal_zone_device_check() helper
> thermal: do sensor checking explicitly in drivers
> thermal: bcm2835: enable/check sensor after its setup is finished
> thermal: brcmstb: enable/check sensor after its setup is finished
> thermal: hisi_thermal: enable/check sensor after its setup is finished
> thermal: qcom: tsens: enable/check sensor after its setup is finished
> thermal: qoriq: enable/check sensor after its setup is finished
> thermal: rcar_gen3_thermal: enable/check sensor after its setup is
> finished
> thermal: rockchip_thermal: enable/check sensor after its setup is
> finished
> thermal: exynos: enable/check sensor after its setup is finished
> thermal: tegra: enable/check sensor after its setup is finished
> thermal: ti-soc-thermal: enable/check sensor after its setup is
> finished
> thermal: uniphier: enable/check sensor after its setup is
> finished
> thermal: zx2967: enable/check sensor after its setup is finished
> thermal: warn on attempts to read temperature on disabled sensors
>
> drivers/acpi/thermal.c | 5 ++--
> drivers/net/ethernet/mellanox/mlxsw/core_thermal.c | 1 -
> drivers/platform/x86/acerhdf.c | 6 +++-
> drivers/regulator/max8973-regulator.c | 3 +-
> drivers/thermal/broadcom/bcm2835_thermal.c | 3 ++
> drivers/thermal/broadcom/brcmstb_thermal.c | 3 ++
> drivers/thermal/broadcom/ns-thermal.c | 3 ++
> drivers/thermal/da9062-thermal.c | 7 ++---
> drivers/thermal/db8500_thermal.c | 5 +++-
> drivers/thermal/hisi_thermal.c | 22 ++++----------
> drivers/thermal/imx_thermal.c | 3 +-
> drivers/thermal/int340x_thermal/int3400_thermal.c | 1 +
> drivers/thermal/intel_bxt_pmic_thermal.c | 3 +-
> drivers/thermal/intel_soc_dts_iosf.c | 3 +-
> drivers/thermal/max77620_thermal.c | 6 ++--
> drivers/thermal/mtk_thermal.c | 3 ++
> drivers/thermal/of-thermal.c | 6 ++--
> drivers/thermal/qcom-spmi-temp-alarm.c | 5 +++-
> drivers/thermal/qcom/tsens.c | 6 ++++
> drivers/thermal/qoriq_thermal.c | 3 ++
> drivers/thermal/rcar_gen3_thermal.c | 7 +++--
> drivers/thermal/rcar_thermal.c | 8 +++--
> drivers/thermal/rockchip_thermal.c | 34 ++++++++++------------
> drivers/thermal/samsung/exynos_tmu.c | 7 ++++-
> drivers/thermal/st/st_thermal_memmap.c | 3 +-
> drivers/thermal/tango_thermal.c | 5 ++++
> drivers/thermal/tegra/soctherm.c | 3 ++
> drivers/thermal/tegra/tegra-bpmp-thermal.c | 3 ++
> drivers/thermal/thermal-generic-adc.c | 3 ++
> drivers/thermal/thermal_core.c | 14 ++++-----
> drivers/thermal/thermal_helpers.c | 33 +++++++++++++++++++++
> drivers/thermal/thermal_sysfs.c | 17 +++++++----
> drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 7 ++++-
> drivers/thermal/uniphier_thermal.c | 6 +++-
> drivers/thermal/x86_pkg_temp_thermal.c | 2 +-
> drivers/thermal/zx2967_thermal.c | 3 ++
> include/linux/thermal.h | 5 ++++
> 37 files changed, 173 insertions(+), 84 deletions(-)
>
> --
> 1.9.1
next prev parent reply other threads:[~2018-09-10 17:37 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20180410124240epcas2p25c8979583c41f147ac34c49faf30aa14@epcas2p2.samsung.com>
2018-04-10 12:41 ` [PATCH 00/17] thermal: enable/check sensor after its setup is finished Bartlomiej Zolnierkiewicz
2018-04-10 12:41 ` [PATCH 01/17] thermal: add thermal_zone_device_toggle() helper Bartlomiej Zolnierkiewicz
2018-09-10 17:16 ` Eduardo Valentin
2018-09-14 11:40 ` Bartlomiej Zolnierkiewicz
[not found] ` <0495124b-9ae8-3b4b-5f0c-208d2e06e5a5@samsung.com>
2018-09-17 9:33 ` Bartlomiej Zolnierkiewicz
2018-09-24 16:46 ` Eduardo Valentin
2018-04-10 12:41 ` [PATCH 02/17] thermal: separate sensor registration and enable Bartlomiej Zolnierkiewicz
2018-04-10 12:41 ` [PATCH 03/17] thermal: add thermal_zone_device_check() helper Bartlomiej Zolnierkiewicz
2018-04-10 12:41 ` [PATCH 04/17] thermal: do sensor checking explicitly in drivers Bartlomiej Zolnierkiewicz
2018-04-10 12:41 ` [PATCH 05/17] thermal: bcm2835: enable/check sensor after its setup is finished Bartlomiej Zolnierkiewicz
2018-04-10 12:42 ` [PATCH 06/17] thermal: brcmstb: " Bartlomiej Zolnierkiewicz
2018-04-10 12:42 ` [PATCH 07/17] thermal: hisi_thermal: " Bartlomiej Zolnierkiewicz
2018-04-10 12:42 ` [PATCH 08/17] thermal: qcom: tsens: " Bartlomiej Zolnierkiewicz
2018-04-10 12:42 ` [PATCH 09/17] thermal: qoriq: " Bartlomiej Zolnierkiewicz
2018-04-10 12:42 ` [PATCH 10/17] thermal: rcar_gen3_thermal: " Bartlomiej Zolnierkiewicz
2018-04-10 12:42 ` [PATCH 11/17] thermal: rockchip_thermal: " Bartlomiej Zolnierkiewicz
2018-04-10 12:42 ` [PATCH 12/17] thermal: exynos: " Bartlomiej Zolnierkiewicz
2018-04-10 12:42 ` [PATCH 13/17] thermal: tegra: " Bartlomiej Zolnierkiewicz
2018-04-10 12:42 ` [PATCH 14/17] thermal: ti-soc-thermal: " Bartlomiej Zolnierkiewicz
2018-04-10 12:42 ` [PATCH 15/17] thermal: uniphier: " Bartlomiej Zolnierkiewicz
2018-04-10 12:42 ` [PATCH 16/17] thermal: zx2967: " Bartlomiej Zolnierkiewicz
2018-04-10 12:42 ` [PATCH 17/17] thermal: warn on attempts to read temperature on disabled sensors Bartlomiej Zolnierkiewicz
2018-04-18 22:26 ` [PATCH 00/17] thermal: enable/check sensor after its setup is finished Stefan Wahren
2018-06-29 16:15 ` Bartlomiej Zolnierkiewicz
2018-09-07 9:10 ` Amit Kucheria
2018-09-10 17:37 ` Eduardo Valentin [this message]
2018-09-14 13:17 ` Bartlomiej Zolnierkiewicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180910173659.GB4196@localhost.localdomain \
--to=edubezval@gmail.com \
--cc=b.zolnierkie@samsung.com \
--cc=baoyou.xie@linaro.org \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=eric@anholt.net \
--cc=heiko@sntech.de \
--cc=j-keerthy@ti.com \
--cc=jonathanh@nvidia.com \
--cc=jun.nie@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mmayer@broadcom.com \
--cc=rui.zhang@intel.com \
--cc=shawnguo@kernel.org \
--cc=stefan.wahren@i2se.com \
--cc=thierry.reding@gmail.com \
--cc=yamada.masahiro@socionext.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.