Received: by 10.192.165.156 with SMTP id m28csp1756261imm; Wed, 18 Apr 2018 15:29:33 -0700 (PDT) X-Google-Smtp-Source: AIpwx48520YHPxGUYp76du8u1AVCfCiIWJ1uHX2o758adkvaIWJ3urRmFWBbJd/leakAQyP6rhn8 X-Received: by 10.101.92.2 with SMTP id u2mr3082502pgr.317.1524090573469; Wed, 18 Apr 2018 15:29:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524090573; cv=none; d=google.com; s=arc-20160816; b=Oo8zbnCcTXuvtSf/pxT4+I3kNCJJr6odNmsIBsXQe0ZAy2J9x41DR+oJf7vMWIajjK ul16pv90eWlLH3Fa1F6CFnkN10c2meuDeuqd8/b0934fqsxW1/F+ton+QgVP9C5iccPq 8T941kXp4l41b+v9jv9irufQHhBrOzh/Uok4iT1Q4tVp1vDU+uh0fct0sSbVOIwdjkJ6 Hf97vMzZlH/SWax8yk456F4M3Mc8xdbsybb8nUkH+U9c8WF7eXJ27r7kXq/NLPUe4SWz bNnvr029ZXYjiGqikNgq6+pXdNSu5ePJPV/RW+1/iIiNZWgR11IGNpcZtirJ4Lz46LDM G8Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:importance:content-transfer-encoding :mime-version:subject:references:in-reply-to:message-id:cc:to:from :date:arc-authentication-results; bh=lyeGMJShq7B1turVRhg5zI+ZN+13URsDYojSFXFV1k8=; b=VLj4T54iwmcWY5CrBMbgUz3nNubCT0yCF/9e/xrYVs1p662OeQbFwQDG7vd9eIkQi4 WgjwlKpC6m+p0CZ/NvYCqnNyGfoXIcjrD2VWoqeUgICL6FaKFSIjp4RP4lg7PcZordGH ZbohxvXsTu6k2a6SS4HfAIpJK6+82viu76CdipdM7zE7jV/FH9iS3f2NN+G+Ei7kOV1o UZctvp2V4AMmzTE2334UTuRAD7wW9SbApTmdga0YrmbRl4pGguB/u+hLA6UQrL/9uPN6 uYaqcm5Ei4MhloIlb+UXudm9kXwprlghHE/7bAgH4MhaoNPipjkflOah26UwBWyMo2CH Onog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x9-v6si2023680plr.64.2018.04.18.15.28.56; Wed, 18 Apr 2018 15:29:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752744AbeDRW1A (ORCPT + 99 others); Wed, 18 Apr 2018 18:27:00 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:37595 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751407AbeDRW07 (ORCPT ); Wed, 18 Apr 2018 18:26:59 -0400 Received: from null ([172.19.246.43]) by mrelayeu.kundenserver.de (mreue005 [212.227.15.167]) with ESMTPSA (Nemesis) id 0MFwkk-1fBipF3PSY-00ExPd; Thu, 19 Apr 2018 00:26:15 +0200 Date: Thu, 19 Apr 2018 00:26:07 +0200 (CEST) From: Stefan Wahren To: Zhang Rui , Eduardo Valentin , Bartlomiej Zolnierkiewicz Cc: Masahiro Yamada , Markus Mayer , linux-pm@vger.kernel.org, Eric Anholt , Keerthy , bcm-kernel-feedback-list@broadcom.com, Jonathan Hunter , Thierry Reding , Shawn Guo , linux-kernel@vger.kernel.org, Jun Nie , Heiko Stuebner , Baoyou Xie Message-ID: <1578244948.69815.1524090367636@email.1und1.de> In-Reply-To: <1523364131-31059-1-git-send-email-b.zolnierkie@samsung.com> References: <1523364131-31059-1-git-send-email-b.zolnierkie@samsung.com> Subject: Re: [PATCH 00/17] thermal: enable/check sensor after its setup is finished MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.8.4-Rev22 X-Originating-Client: open-xchange-appsuite X-Provags-ID: V03:K1:GyvqqGil6hUWciKxG9e2c4t5czLV+VYos298nrMiYEEg4NsAj2I gnqXE4qYq8fG57T5dx16rIJH4Bqq+9yVfNDyrgQBwakrp6ABBe/nzZXXK+M133yT6s5S56c hwiK15T+gKREQ/TJg5cIIIdKtUi+44fZi1d4QpEgmKE3VoBVfQhYijz5DVHfRSVl8mf9bSm KAlxM4ZlI/kkNHp6FvVGA== X-UI-Out-Filterresults: notjunk:1;V01:K0:yJK7bwNmuSk=:0YyCgF1aEj4AxvaXs81Yx/ 44vHA40mgkg6fEE0Mj9y73KGWeZdXRu/d7SOfiLDKipJ+p1bRZS2ovQMwMOpZLIwhSiVFIPUs CU4hUu8xXbDQMBUMRieAC+/cph0zFOXJVbVh3F8XGhh2incOrpTGBjmnfJ9qAw/GyJRmlcf+u i07RZLU/1bq6GigtwOOxygUw6k6RgbwMSg87md940+kzmPxXgDRKYeDcCR9sKq6UlzHRJlLkq ITxsLKTsR1AYiGyD1GJ7tBw4VYhz4NAj8DD+eNWlaXWF5NmHScO1f8j2kDw2CjhzWv9ubBmsQ KSg3xzZr1F/aFnWlPYiwMdrdsqoSvd2xVZEzN6nLTfdMpP5xWrXfn3u/RM+O8sQfvLcTOWgX0 D6cotNQaLLO22ebioN/cTukANeFf1qy9L06dGqLZ0ybtlNEnrlZolShjV1V5QzTpycuwihmCe 5JcA9xnvQivGLzzEgLT5d3rDktmtnSzjnQ7vC5kB7v2ksClq94OADeKsMPoqL52um2mZU/nrB o2lsm0u9WNuJu30LUVad5PQ3phA3vQIeBGCYGj+aMEOX8tIhutsx5c3pXWisRf0xk5S7MUL9s Tgm4g0cvfmgjQNlyh8C1J6gkF2XxxE6iuniQDwQijXhEKwtbv4pm758qBfai4V5IbkT9AB1lm iTQ5Xc+AnI62a5ou/t2Th4C+3brAfPPuVMyTne6zTntJnShJ5wV3x1tyFTvylO+2B4OnI5ZYh w2kVdD+bJ8FaJAEEJKhyuKp5QBqtgG712MmaAS6tZUo+cyRi4Q7frXoU+qE= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Bartlomiej, > Bartlomiej Zolnierkiewicz hat am 10. April 2018 um 14:41 geschrieben: > > > 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). > For many DT thermal drivers this causes a problem because > [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 > 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. i've tested patch 1-5 + 17 on a Raspberry Pi 1 B and didn't see any regressions. Tested-by: Stefan Wahren