Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30168C43381 for ; Tue, 12 Mar 2019 12:17:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F20362084F for ; Tue, 12 Mar 2019 12:17:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1552393021; bh=dqGkXXPVEjjWrIxbWQKwr+3FJ4USF3hmeRA01rq8yJo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=EV2BwlyLAukrvax/W98/frV02kP7MpxgcPsawMgfodn5tUss+fh3doT+GEOhKP43f 8EcDIlMLK6XJ2JL8Z692bZGABR5Jnv2qCYneQI7HmdUhKtBAgDIf9vJiepR23bHpiq xw6P6bhIfyOlOjSlIn59B9HAVyvgvB5PQc4f8dRQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726365AbfCLMRA (ORCPT ); Tue, 12 Mar 2019 08:17:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:49470 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726193AbfCLMRA (ORCPT ); Tue, 12 Mar 2019 08:17:00 -0400 Received: from localhost (unknown [12.27.65.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3850C206DF; Tue, 12 Mar 2019 12:16:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1552393019; bh=dqGkXXPVEjjWrIxbWQKwr+3FJ4USF3hmeRA01rq8yJo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=q/AzPOJzeQ0AUf0yFgDr9h7IeGUx2RNd0UGuC2xpjw8VbQ40KnMX8rjOZyAonqbMr vatkf1H1VLUjMQIekyj4S2WAhTAPyDDMsufxPaTbIFtrpfQU9T8W5GizitRjaukveu Z6JNGGlfzjIO4OmeVhdPtqCoe+89AvXB9PlIQ+tc= Date: Tue, 12 Mar 2019 05:16:58 -0700 From: Greg KH To: Krzysztof Kozlowski Cc: "stable@vger.kernel.org" Subject: Re: [PATCH stable v4.4+] ARM: dts: exynos: Do not ignore real-world fuse values for thermal zone 0 on Exynos5420 Message-ID: <20190312121658.GA10877@kroah.com> References: <1552391782-29716-1-git-send-email-krzk@kernel.org> <20190312120937.GA8137@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Tue, Mar 12, 2019 at 01:14:00PM +0100, Krzysztof Kozlowski wrote: > On Tue, 12 Mar 2019 at 13:09, Greg KH wrote: > > > > On Tue, Mar 12, 2019 at 12:56:22PM +0100, Krzysztof Kozlowski wrote: > > > commit 28928a3ce142b2e4e5a7a0f067cefb41a3d2c3f9 upstream. > > > > > > In Odroid XU3 Lite board, the temperature levels reported for thermal > > > zone 0 were weird. In warm room: > > > /sys/class/thermal/thermal_zone0/temp:32000 > > > /sys/class/thermal/thermal_zone1/temp:51000 > > > /sys/class/thermal/thermal_zone2/temp:55000 > > > /sys/class/thermal/thermal_zone3/temp:54000 > > > /sys/class/thermal/thermal_zone4/temp:51000 > > > > > > Sometimes after booting the value was even equal to ambient temperature > > > which is highly unlikely to be a real temperature of sensor in SoC. > > > > > > The thermal sensor's calibration (trimming) is based on fused values. > > > In case of the board above, the fused values are: 35, 52, 43, 58 and 43 > > > (corresponding to each TMU device). However driver defined a minimum value > > > for fused data as 40 and for smaller values it was using a hard-coded 55 > > > instead. This lead to mapping data from sensor to wrong temperatures > > > for thermal zone 0. > > > > > > Various vendor 3.10 trees (Hardkernel's based on Samsung LSI, Artik 10) > > > do not impose any limits on fused values. Since we do not have any > > > knowledge about these limits, use 0 as a minimum accepted fused value. > > > This should essentially allow accepting any reasonable fused value thus > > > behaving like vendor driver. > > > > > > The exynos5420-tmu-sensor-conf.dtsi is copied directly from existing > > > exynos4412 with one change - the samsung,tmu_min_efuse_value. > > > > > > Signed-off-by: Krzysztof Kozlowski > > > Acked-by: Bartlomiej Zolnierkiewicz > > > Acked-by: Eduardo Valentin > > > Reviewed-by: Javier Martinez Canillas > > > Tested-by: Javier Martinez Canillas > > > Reviewed-by: Anand Moon > > > Tested-by: Anand Moon > > > --- > > > arch/arm/boot/dts/exynos5420-tmu-sensor-conf.dtsi | 25 +++++++++++++++++++++++ > > > arch/arm/boot/dts/exynos5420.dtsi | 10 ++++----- > > > 2 files changed, 30 insertions(+), 5 deletions(-) > > > create mode 100644 arch/arm/boot/dts/exynos5420-tmu-sensor-conf.dtsi > > > > this backport does not apply to 4.9.y, but only 4.4.y. Can you also > > send a 4.9.y backport so that someone moving from 4.4.y to 4.9.y does > > not get a regression? > > v4.9 should also get it and you can apply directly the upstream commit: > 28928a3ce142b2e4e5a7a0f067cefb41a3d2c3f9 > (v4.4 required indentation adjustment) > > Shall I send a version for v4.9 or can you apply the upstream directly? The upstream version does not apply directly at all: checking file arch/arm/boot/dts/exynos5420-tmu-sensor-conf.dtsi checking file arch/arm/boot/dts/exynos5420.dtsi Hunk #1 succeeded at 703 with fuzz 1 (offset 4 lines). Hunk #2 FAILED at 708. Hunk #3 succeeded at 712 with fuzz 1 (offset -5 lines). Hunk #4 succeeded at 721 with fuzz 1 (offset -5 lines). Hunk #5 succeeded at 730 with fuzz 1 (offset -5 lines). 1 out of 5 hunks FAILED so yes, a backport is needed :) thanks, greg k-h