Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp458252ybt; Wed, 8 Jul 2020 04:12:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHkosUtn2fdAxXwgNbts62b6pmVjQDNWKfpp6pFCo4C5mz0prPeiPWcjOOh0kL/NcoFun/ X-Received: by 2002:aa7:c885:: with SMTP id p5mr52888440eds.100.1594206720933; Wed, 08 Jul 2020 04:12:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594206720; cv=none; d=google.com; s=arc-20160816; b=WRf979NOBa8h9x+3QdTpHUVGn5AAsjAzIwB6JM5updbyFM9rhAwJ10Nt1E3gpNjJ5i IT+IDv74jcoMoea4tjQauyBzLoiCsqrjg6rbAkGhWMbO2Vewnu9Lq3oOAlGXAmsZDmzk MP/37lIZLBlToLfMmo9I5025MzRxc94aMPAJkqx5PAC8TBjvZdkh1BhkQ04hq+KE7Sfx Rlj7rbWGWqWRblWBkvGbRxFDE8Fo9fxyj3m8DFuYogjhMiMeJ8GWbvHaAMXVuCwG2DOM /aOalkJjJrURxUJACrxBYmChUGHpqdvt11wCYLrP5SiFXn76u7fok7XHa4llf5UT6X30 J+Ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:mail-followup-to:message-id:subject:cc:to :from:date:dkim-signature; bh=kiYAb5kOz0IZZJE1PXbPB22BbysRhdJFT5pm6Xvhk2I=; b=hujBV+5IQ9x5MgMh5ue6BKLtzvsEAGT8E66tzHfSix5W1XXFQagrnUytgvbqqy6H9G M5+kGvyfFH1Aeszt3owukx6MbmyTkX/ph64ASvUwd1PHtxhuDML9NzmmyPuu+YjGXVIS 9rxgDTwTtp815urpUwYGluWIOWi47g4/oiPrYWHCZ0XpJ3mJ6IHYTkySdvjAzrAmzg+t gKiPykrE1+2sqBz+zwUgx38l90MEloDaKW8mttP27Yo3o1vy5zmbP6ckc8QYq5doLbc7 MgGzm0KC20J7nep2djuXl5iA0ENFGwv624CLJhYJQiR6UQzqvZTR0spMT8nO9NQiRh6U vrBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@megous.com header.s=mail header.b=cYWTa2si; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=megous.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h13si15936698ejl.692.2020.07.08.04.11.37; Wed, 08 Jul 2020 04:12:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@megous.com header.s=mail header.b=cYWTa2si; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=megous.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728825AbgGHLKx (ORCPT + 99 others); Wed, 8 Jul 2020 07:10:53 -0400 Received: from vps.xff.cz ([195.181.215.36]:49176 "EHLO vps.xff.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728611AbgGHLKw (ORCPT ); Wed, 8 Jul 2020 07:10:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1594206650; bh=HwMlt2AcB5R5z+ixudtSMz9QQLHUqR6NKrNCIv6ikVM=; h=Date:From:To:Cc:Subject:References:X-My-GPG-KeyId:From; b=cYWTa2siMsoYgQ7Z91koQPla54fDsMFlBfu1PY4kZBU0he2uUKTPt+n7ZEZXWnfTt +idq6HET2YSSsPaA8NXhJmN0Lni9sgfAaJv0De54NS+ARRA7AIV2eGGi51LaDYo4K2 U9RBIz7IKxjX6hw0VmT0tKKDKEGi4VaTymKJ3ZWo= Date: Wed, 8 Jul 2020 13:10:50 +0200 From: =?utf-8?Q?Ond=C5=99ej?= Jirman To: Russell King - ARM Linux admin Cc: linux-sunxi@googlegroups.com, Amit Kucheria , "open list:ALLWINNER THERMAL DRIVER" , Yangtao Li , Daniel Lezcano , open list , Maxime Ripard , Vasily Khoruzhick , Chen-Yu Tsai , Zhang Rui , "moderated list:ARM/Allwinner sunXi SoC support" Subject: Re: [PATCH] thermal: sun8i: Be loud when probe fails Message-ID: <20200708111050.ivpkcutwwvm7kwcm@core.my.home> Mail-Followup-To: =?utf-8?Q?Ond=C5=99ej?= Jirman , Russell King - ARM Linux admin , linux-sunxi@googlegroups.com, Amit Kucheria , "open list:ALLWINNER THERMAL DRIVER" , Yangtao Li , Daniel Lezcano , open list , Maxime Ripard , Vasily Khoruzhick , Chen-Yu Tsai , Zhang Rui , "moderated list:ARM/Allwinner sunXi SoC support" References: <20200708105527.868987-1-megous@megous.com> <20200708110301.GB1551@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200708110301.GB1551@shell.armlinux.org.uk> X-My-GPG-KeyId: EBFBDDE11FB918D44D1F56C1F9F0A873BE9777ED Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 08, 2020 at 12:03:01PM +0100, Russell King - ARM Linux admin wrote: > On Wed, Jul 08, 2020 at 12:55:27PM +0200, Ondrej Jirman wrote: > > I noticed several mobile Linux distributions failing to enable the > > thermal regulation correctly, because the kernel is silent > > when thermal driver fails to probe. Add enough error reporting > > to debug issues and warn users in case thermal sensor is failing > > to probe. > > > > Failing to notify users means, that SoC can easily overheat under > > load. > > > > Signed-off-by: Ondrej Jirman > > --- > > drivers/thermal/sun8i_thermal.c | 55 ++++++++++++++++++++++++++------- > > 1 file changed, 43 insertions(+), 12 deletions(-) > > > > diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c > > index 74d73be16496..9065e79ae743 100644 > > --- a/drivers/thermal/sun8i_thermal.c > > +++ b/drivers/thermal/sun8i_thermal.c > > @@ -287,8 +287,12 @@ static int sun8i_ths_calibrate(struct ths_device *tmdev) > > > > calcell = devm_nvmem_cell_get(dev, "calibration"); > > if (IS_ERR(calcell)) { > > + dev_err(dev, "Failed to get calibration nvmem cell (%ld)\n", > > + PTR_ERR(calcell)); > > Consider using: > > dev_err(dev, "Failed to get calibration nvmem cell (%pe)\n", > calcell); > > which means the kernel can print the symbolic errno value. Thank you, I'll change it in v2. :) regards, o. > -- > RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ > FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!