From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 C088AC433E1 for ; Wed, 8 Jul 2020 11:07:50 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9086E20739 for ; Wed, 8 Jul 2020 11:07:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="WUHJmi1l"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="QPOFZPzs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9086E20739 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+CarYlyU2DNMhBI52wal0Z+wRBENrd8k3jz0Q5Tmj7Y=; b=WUHJmi1lSqVNcBV5QTMonbQL2 EJ3SYL6fJhvrFJDrBdxjurYd4JdVBHYUbLvYDZ75J/GzwU/Xws5AEdJaNh6bMD8Ebijdfj+pkexJH hk/A+rosPadkhRsNf+0kt/YUQ//U7O7FAGqIInTlf0OKnzJN0kpchCUmoZIw6gU00ekfFG4oiMZuw Izta3qKg6GVmEMUIMh0Jkt0wmC45I7o7phYlx9Mv6Utgxnn2KcX5tlaFfJBeFvSB56kLuFpnkCx1R xtCwY9ZckpffJRZy6yNee1dXEPQmDa5tWZl3+AbCyEg/2t03CD7S3nNVpUhs77ICBxEW46Kxjvex+ pBwWMlw2w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jt7uC-00063v-Ke; Wed, 08 Jul 2020 11:06:24 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jt7uA-0005kf-97 for linux-arm-kernel@lists.infradead.org; Wed, 08 Jul 2020 11:06:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=oKs1NW8INb5hZDk7/fI+/JTSaITHY2hLGGczbgCSe4g=; b=QPOFZPzsLlT/4uDGRXf8ntaP8 p7ByDddo0WjIEHZNteMXE/wOFQ67hIDzR1zqA402m4BK1pil56TUnklJ38pHFkWL0+vZQW7RALtz/ Oj54gAGu39LzgKvoa+bb1sxu83aQC/AE7YyZXLUCtygDZaLGAz5l9V3J8F+5UGO4RUmoM/KZk+iEW ogCLCWmUc29s85Hs8eL6FFVjgreAu4SCsRniv/lV+yg0SeoyARHCznmPDc4jhCUqnHS2aQMl1xSxr xRL5agm6LY2HD5EDhRoth3DiyjLb/JEEXQxnM53+GYWtRpusyv/lGRbKS8z+OBFjByAwVUQyT9De7 QiGiRtdlA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:36852) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jt7qz-0007wf-6Q; Wed, 08 Jul 2020 12:03:05 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1jt7qv-00011F-H1; Wed, 08 Jul 2020 12:03:01 +0100 Date: Wed, 8 Jul 2020 12:03:01 +0100 From: Russell King - ARM Linux admin To: Ondrej Jirman Subject: Re: [PATCH] thermal: sun8i: Be loud when probe fails Message-ID: <20200708110301.GB1551@shell.armlinux.org.uk> References: <20200708105527.868987-1-megous@megous.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200708105527.868987-1-megous@megous.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200708_070622_377874_1161F0F7 X-CRM114-Status: GOOD ( 15.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Amit Kucheria , "open list:ALLWINNER THERMAL DRIVER" , Yangtao Li , Daniel Lezcano , open list , Maxime Ripard , Vasily Khoruzhick , linux-sunxi@googlegroups.com, Zhang Rui , Chen-Yu Tsai , "moderated list:ARM/Allwinner sunXi SoC support" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel