From patchwork Fri Nov 30 08:00:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 10705867 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A4C5614BD for ; Fri, 30 Nov 2018 08:01:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9926F2F4DF for ; Fri, 30 Nov 2018 08:01:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8DB982F4E3; Fri, 30 Nov 2018 08:01:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3DEA6296DA for ; Fri, 30 Nov 2018 08:01:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726706AbeK3TJc (ORCPT ); Fri, 30 Nov 2018 14:09:32 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:51147 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726572AbeK3TJc (ORCPT ); Fri, 30 Nov 2018 14:09:32 -0500 Received: by mail-wm1-f66.google.com with SMTP id 125so4796522wmh.0 for ; Fri, 30 Nov 2018 00:01:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=QRSPgOw55/T6zE4Vz5EM77WSQ9yydjg6bR6Qzgn853o=; b=hFavkEnnGzUvkMspt+c2pT9GINHR2fnxTsznYqafuiSowCA0OZ9DpYfC+0tIwTtpvG zcFcp8nj96AHs7++DOXqsWGWEq0PQqwWp39hfwE8J9bBYhHuw5/MgWvpNRg6F5iWfIP9 oTKoV+7feei4R7/kwxrSa5j5LbOXqBegNR/qI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=QRSPgOw55/T6zE4Vz5EM77WSQ9yydjg6bR6Qzgn853o=; b=RhroxELkoJOSfz7INLesAGUd9BbmIEAlH6wa+EKxTHd2yDTaWWNnCT67PKeWXMdHfu IsFO5GR/AVBcI//g/9TVzdnWvjTpZOVO6Qw6w4cibcvXIeqkxmHx8fGprqHr+GFYhuF6 xDhxEiWbEO0DnTo8+9+TE1kZWBa4jSKMJMFIdsLRzBBCNpbJqMstKcwuvNdjrxdPdQB1 0TwhmftnC6Hob2qczTBR30qiHrCdgkZ5kYHx4W+DF4TOBi+GcQvzAdu7Lq6OeeeGE2Vx 2PIQUGXLnm0FNcg6CHRXhq4/hFx7k79nkOwln2Kl8PbX7M6Q4BEbmjoerr3I8i++R/0G aRTA== X-Gm-Message-State: AA+aEWZZFN39dqwI27U/nGh1QIYv7M/IuWRBzOvyceMoHhd93ncPPqkh CDU4ew11iGOrb8ILECLdMF9gqQ== X-Google-Smtp-Source: AFSGD/XrxkeRfEK1I6kF5t+olKoHiVXBu6t2U2gUMOsWEQh6WabZvqWyE4X9kQds44pMGIWv/wrr+w== X-Received: by 2002:a1c:5585:: with SMTP id j127-v6mr4224100wmb.127.1543564863997; Fri, 30 Nov 2018 00:01:03 -0800 (PST) Received: from localhost.localdomain (118.142.136.77.rev.sfr.net. [77.136.142.118]) by smtp.gmail.com with ESMTPSA id h16sm6212393wrb.62.2018.11.30.00.01.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Nov 2018 00:01:03 -0800 (PST) From: Daniel Lezcano To: edubezval@gmail.com, rui.zhang@intel.com Cc: vincent.guittot@linaro.org, john.stultz@linaro.org, linux-pm@vger.kernel.org (open list:THERMAL), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 1/2] thermal/drivers/hisi: Fix wrong platform_get_irq_byname() Date: Fri, 30 Nov 2018 09:00:31 +0100 Message-Id: <1543564833-643-1-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Without this patch, the thermal driver on hi6220 and hi3660 is broken. That is due because part of the posted patchset was merged but a small change in the DT was dropped. The hi6220 and hi3660 do not have an interrupt name in the DT, so finding interrupt by name fails. Fix this by returning back to the platform_get_irq() function call. Fixes: 2cffaeff083f (thermal/drivers/hisi: Use platform_get_irq_byname) Signed-off-by: Daniel Lezcano --- drivers/thermal/hisi_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/hisi_thermal.c b/drivers/thermal/hisi_thermal.c index c4111a9..50f4d00 100644 --- a/drivers/thermal/hisi_thermal.c +++ b/drivers/thermal/hisi_thermal.c @@ -589,7 +589,7 @@ static int hisi_thermal_probe(struct platform_device *pdev) return ret; } - ret = platform_get_irq_byname(pdev, sensor->irq_name); + ret = platform_get_irq(pdev, 0); if (ret < 0) return ret; From patchwork Fri Nov 30 08:00:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 10705869 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 42D3F1057 for ; Fri, 30 Nov 2018 08:01:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 334CB296DA for ; Fri, 30 Nov 2018 08:01:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 273A92F4D2; Fri, 30 Nov 2018 08:01:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF673296DA for ; Fri, 30 Nov 2018 08:01:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726648AbeK3TJf (ORCPT ); Fri, 30 Nov 2018 14:09:35 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:35185 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727109AbeK3TJd (ORCPT ); Fri, 30 Nov 2018 14:09:33 -0500 Received: by mail-wm1-f66.google.com with SMTP id c126so4705690wmh.0 for ; Fri, 30 Nov 2018 00:01:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BULyaOacFd0d+m8z9WucrlU3IR4UOzS/+4lMifUgKf8=; b=BkcwvF6bmwP+b3m7YqvDHCbspSIkZHvy1WElrP/igiMnjI9tkcYwVqxQzmylnl/ctG EEh27BUlsfnPLSnMrN4ua5zN7r+h1VuWCyinCxuFWxhubjdn7b0cIwoGPmThA52dguHe FWbmvTiRMtFk/brObMH7jbGF6nH62qUZDjaJ8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=BULyaOacFd0d+m8z9WucrlU3IR4UOzS/+4lMifUgKf8=; b=J7Ih8VO8WFIu4SaMFHyrow3Jk6MLd1GSjfSebSCNkm2YTjba7T2Bd/22idgycsHWoR x1PnQEoG1Ouat2p2n9AqXV+RT9oXp3jMyJkBjWY93bkTTebCIirYLwbmytPXpBlnDRNL edw+fGY8nu7BMDzLYlY3o8KZy0kXczObumLSb6fHSGLuTdA1stHxz6Ewg1+R2IoaBzRW as2IdXd1rhQDm5jQvX9+CSwiLqh9NlK621AqhMMe2GmymWe/jDQL0F/GAmic5Zz4OiZz F8oNWXqH9K+ERDcVk4/5IcR2BaPVsTCxghYXDF+A+dsGUoOYWL2DEy31C9MFeYLS/faG VuwA== X-Gm-Message-State: AA+aEWZcxbmHL3bsp7CWeqsMCDDW/lCXtoiruCP+rVaFVzmjfZ0NwbJf A8LINEr/UaW7C6Bu5YDEepbNxQ== X-Google-Smtp-Source: AFSGD/VqqYRmxInzPfxesU6ZVhqjEEZcGRWykhD5CsPf9WQ+NkwB8QZP93S+rruSyPzbqilnePMEOA== X-Received: by 2002:a1c:a84f:: with SMTP id r76mr4354622wme.16.1543564865598; Fri, 30 Nov 2018 00:01:05 -0800 (PST) Received: from localhost.localdomain (118.142.136.77.rev.sfr.net. [77.136.142.118]) by smtp.gmail.com with ESMTPSA id h16sm6212393wrb.62.2018.11.30.00.01.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Nov 2018 00:01:05 -0800 (PST) From: Daniel Lezcano To: edubezval@gmail.com, rui.zhang@intel.com Cc: vincent.guittot@linaro.org, john.stultz@linaro.org, linux-pm@vger.kernel.org (open list:THERMAL), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 2/2] thermal/drivers/hisi: Fix number of sensors on hi3660 Date: Fri, 30 Nov 2018 09:00:32 +0100 Message-Id: <1543564833-643-2-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1543564833-643-1-git-send-email-daniel.lezcano@linaro.org> References: <1543564833-643-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Without this patch the thermal driver is broken on hi3660. The dual sensors support patchset was partially merged, unfortunately the dual thermal zones definition is not available in the DT yet, so when the driver tries to register all the sensors that fails. By reducing to 1 the number of sensors on the hi3660, we switch back to the previous functionnality. Fixes: 8c6c36846f11 (thermal/drivers/hisi: Add the dual clusters sensors for hi3660) Signed-off-by: Daniel Lezcano --- drivers/thermal/hisi_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/hisi_thermal.c b/drivers/thermal/hisi_thermal.c index 50f4d00..2d26ae8 100644 --- a/drivers/thermal/hisi_thermal.c +++ b/drivers/thermal/hisi_thermal.c @@ -424,7 +424,7 @@ static int hi3660_thermal_probe(struct hisi_thermal_data *data) struct platform_device *pdev = data->pdev; struct device *dev = &pdev->dev; - data->nr_sensors = 2; + data->nr_sensors = 1; data->sensor = devm_kzalloc(dev, sizeof(*data->sensor) * data->nr_sensors, GFP_KERNEL);