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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D33DAC6FA92 for ; Tue, 27 Sep 2022 14:34:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232724AbiI0OeE (ORCPT ); Tue, 27 Sep 2022 10:34:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232493AbiI0OdI (ORCPT ); Tue, 27 Sep 2022 10:33:08 -0400 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FE52543FF for ; Tue, 27 Sep 2022 07:33:05 -0700 (PDT) Received: by mail-wr1-x42f.google.com with SMTP id bk15so7557428wrb.13 for ; Tue, 27 Sep 2022 07:33:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=7e6ctEATW9s/XP6ppX0yJV3WjnU6tGYDDticrBE+dlY=; b=SEmC5HLruQb91q4xBajU66upItPLiebtVT+iFt8mtN7HOClv+DHAX4ENbahzbJnTwb SEdAu8gmbCLC6NEOOseU4HT3h/Yq+/aPIFuNY2b0Rl14tTKlF2KAwOHr2wcE7+8Mss66 +mybXU0pcrFQ5Z/pd0kQJ01p5cm9UwtTgjZUAWh+7YrcP3DF3XF4JmaeLwMMscQG9oKv 1F8ywgXTIUVnl/BL0XYojIghFRujPhMOaPy6ASX4QsLgzPp4tFXsX0sfG8zRYWbfVihU Y3pBO0vq+Cyqa3j5R5kU+FkNc32w8niSCS1RKh9aLwDsBITjQ6VFxjsrsu3fNOLE2UyI R0XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=7e6ctEATW9s/XP6ppX0yJV3WjnU6tGYDDticrBE+dlY=; b=mFjNkxDkbjoNXkzpRyRbb/6RW+oZRR1qkdRcPIwJXbM+A9n96R6QfHsfENU/EUeDlx 3Ol6f+eDtzRoRzWJrDj2IS9UhP/cAM3t0NfVD6w3r8R9hS17SZ7evdBeVokYC2d1oAx2 Cx4qnFE9bTCTGpZN8+KSHxCGxjtGlcb1R7aNsk2oYbeJ6f7Iv76RyyBzMUYrNWPEC2Fh 80WsK+TvSucVQBTrCCpV/GltSrglOkNYJE4yf+odd3anBo8PpI8ktDfoVix3Z9bP3uri NqnKYBIIiGzstTWEnyeGXWLDo6ZCQlR712FkiXu6/Qt3Rm8VzO9EPs42nJ0bE55h1tu6 cWgQ== X-Gm-Message-State: ACrzQf1xasEGEfprqdeYuaqsyAXkwKUkeoVg/4DvkgCgxCjQINaL12pP +k008/oW7q33mUhAmHACqIQOjQsDjYn9PA== X-Google-Smtp-Source: AMsMyM6+gMUdLIWCRExVkHM3ZcD1DnU1ZN99swSZ69fg1w96jdY+BmwDhRzTfea+KoLj36DG3IUmAw== X-Received: by 2002:adf:ebcf:0:b0:22c:9eb4:d6f6 with SMTP id v15-20020adfebcf000000b0022c9eb4d6f6mr8180737wrn.251.1664289183486; Tue, 27 Sep 2022 07:33:03 -0700 (PDT) Received: from mai.. (146725694.box.freepro.com. [130.180.211.218]) by smtp.gmail.com with ESMTPSA id l6-20020a05600c4f0600b003b4924493bfsm17518371wmq.9.2022.09.27.07.33.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Sep 2022 07:33:03 -0700 (PDT) From: Daniel Lezcano To: daniel.lezcano@linaro.org, rafael@kernel.org Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, rui.zhang@intel.com, Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski , Amit Kucheria , Alim Akhtar , linux-samsung-soc@vger.kernel.org (open list:SAMSUNG THERMAL DRIVER), linux-arm-kernel@lists.infradead.org (moderated list:ARM/SAMSUNG S3C, S5P AND EXYNOS ARM ARCHITECTURES) Subject: [PATCH v6 09/29] thermal/drivers/exynos: Replace of_thermal_is_trip_valid() by thermal_zone_get_trip() Date: Tue, 27 Sep 2022 16:32:19 +0200 Message-Id: <20220927143239.376737-10-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220927143239.376737-1-daniel.lezcano@linaro.org> References: <20220927143239.376737-1-daniel.lezcano@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The thermal_zone_get_trip() does the same check as of_thermal_is_trip_valid(). Replace the call to of_thermal_is_trip_valid() by thermal_zone_get_trip(). Signed-off-by: Daniel Lezcano --- drivers/thermal/samsung/exynos_tmu.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 91e6860b5ec4..34b460092308 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -554,13 +554,14 @@ static void exynos4210_tmu_control(struct platform_device *pdev, bool on) { struct exynos_tmu_data *data = platform_get_drvdata(pdev); struct thermal_zone_device *tz = data->tzd; + struct thermal_trip trip; unsigned int con, interrupt_en = 0, i; con = get_con_reg(data, readl(data->base + EXYNOS_TMU_REG_CONTROL)); if (on) { for (i = 0; i < data->ntrip; i++) { - if (!of_thermal_is_trip_valid(tz, i)) + if (thermal_zone_get_trip(tz, i, &trip)) continue; interrupt_en |= @@ -584,13 +585,14 @@ static void exynos5433_tmu_control(struct platform_device *pdev, bool on) { struct exynos_tmu_data *data = platform_get_drvdata(pdev); struct thermal_zone_device *tz = data->tzd; + struct thermal_trip trip; unsigned int con, interrupt_en = 0, pd_det_en, i; con = get_con_reg(data, readl(data->base + EXYNOS_TMU_REG_CONTROL)); if (on) { for (i = 0; i < data->ntrip; i++) { - if (!of_thermal_is_trip_valid(tz, i)) + if (thermal_zone_get_trip(tz, i, &trip)) continue; interrupt_en |= @@ -615,13 +617,14 @@ static void exynos7_tmu_control(struct platform_device *pdev, bool on) { struct exynos_tmu_data *data = platform_get_drvdata(pdev); struct thermal_zone_device *tz = data->tzd; + struct thermal_trip trip; unsigned int con, interrupt_en = 0, i; con = get_con_reg(data, readl(data->base + EXYNOS_TMU_REG_CONTROL)); if (on) { for (i = 0; i < data->ntrip; i++) { - if (!of_thermal_is_trip_valid(tz, i)) + if (thermal_zone_get_trip(tz, i, &trip)) continue; interrupt_en |= -- 2.34.1 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 93E97C6FA83 for ; Tue, 27 Sep 2022 14:34:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6dN+3AOO95WL3XVe8Mlfc4M3KJH7NWXmGWuvtu3YSkg=; b=0wlxBzZ3wnCOUI 0hGCpRt98npsB/0Z29eymrDshyKBzajWPmES5bUymh9pqGAJB9G/gObPiFLRJEOjDvtHz5nNWupnJ u7gL+ReG1RYpnDr8cb1JR44GqDiW7oOfyJi5w5iJ4xuzIhT7BOkUxIAqMZaTgstE1E1IIEiPWNfL8 1Jcg4XPbYofmEFX0Y6s9LKfTadhjoPWGfrbpmdfuMRT+I57eHP7hxnGY/W3MHRfnVpowbcnDf5x/b UUX1teben+xioamHNz0wgohmxHcBLGOsbnYGWoz5Is9JBr+/2vG50U7X6y9grDlIbp4rTPV2I1e1I SXqtckCCgaOh7ZRI90bg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1odBeK-00BG5B-AN; Tue, 27 Sep 2022 14:33:28 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1odBe0-00BFxh-21 for linux-arm-kernel@lists.infradead.org; Tue, 27 Sep 2022 14:33:09 +0000 Received: by mail-wr1-x434.google.com with SMTP id cc5so15312771wrb.6 for ; Tue, 27 Sep 2022 07:33:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=7e6ctEATW9s/XP6ppX0yJV3WjnU6tGYDDticrBE+dlY=; b=SEmC5HLruQb91q4xBajU66upItPLiebtVT+iFt8mtN7HOClv+DHAX4ENbahzbJnTwb SEdAu8gmbCLC6NEOOseU4HT3h/Yq+/aPIFuNY2b0Rl14tTKlF2KAwOHr2wcE7+8Mss66 +mybXU0pcrFQ5Z/pd0kQJ01p5cm9UwtTgjZUAWh+7YrcP3DF3XF4JmaeLwMMscQG9oKv 1F8ywgXTIUVnl/BL0XYojIghFRujPhMOaPy6ASX4QsLgzPp4tFXsX0sfG8zRYWbfVihU Y3pBO0vq+Cyqa3j5R5kU+FkNc32w8niSCS1RKh9aLwDsBITjQ6VFxjsrsu3fNOLE2UyI R0XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=7e6ctEATW9s/XP6ppX0yJV3WjnU6tGYDDticrBE+dlY=; b=gKfXAoxIO7qXNh+zH1O3yrXHHZgKtDu4IWzC8M3bht5kc9F3rc1Ml7zNnbb3T/qWyf dtg+JWKZRNCHpvKlTQzDplhGVsF30iYzFscWjIV78gGt0tJ6GIQiZC8gcE/jVabkAOya nFIljrY/+OzD9BwOsKqVoVq9+9qWED+ISDG2LtxAoNASj3AJHPCGoq9osQ+G76aDye6c lQqs718q1tBlPVa2Seld+EXQLjOwRcNZJM1Kj31EO9dA4jd2+leyi+UiTIhAEwvWS7cx dB0Q5lKAi4L3jzf9WwckZEpTkJr2Q+uuDgceZt5RO5e46Zu6tTR9b97Pxg55Bxamjd5Y 6QKQ== X-Gm-Message-State: ACrzQf0Mud4X+gpp1pb7t4xUdj77fHPEP9VsN8CoBFy4IHHOPxJI8Qmj q2EYD2OdVb6JfJCn3B4ShvDbWQ== X-Google-Smtp-Source: AMsMyM6+gMUdLIWCRExVkHM3ZcD1DnU1ZN99swSZ69fg1w96jdY+BmwDhRzTfea+KoLj36DG3IUmAw== X-Received: by 2002:adf:ebcf:0:b0:22c:9eb4:d6f6 with SMTP id v15-20020adfebcf000000b0022c9eb4d6f6mr8180737wrn.251.1664289183486; Tue, 27 Sep 2022 07:33:03 -0700 (PDT) Received: from mai.. (146725694.box.freepro.com. [130.180.211.218]) by smtp.gmail.com with ESMTPSA id l6-20020a05600c4f0600b003b4924493bfsm17518371wmq.9.2022.09.27.07.33.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Sep 2022 07:33:03 -0700 (PDT) From: Daniel Lezcano To: daniel.lezcano@linaro.org, rafael@kernel.org Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, rui.zhang@intel.com, Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski , Amit Kucheria , Alim Akhtar , linux-samsung-soc@vger.kernel.org (open list:SAMSUNG THERMAL DRIVER), linux-arm-kernel@lists.infradead.org (moderated list:ARM/SAMSUNG S3C, S5P AND EXYNOS ARM ARCHITECTURES) Subject: [PATCH v6 09/29] thermal/drivers/exynos: Replace of_thermal_is_trip_valid() by thermal_zone_get_trip() Date: Tue, 27 Sep 2022 16:32:19 +0200 Message-Id: <20220927143239.376737-10-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220927143239.376737-1-daniel.lezcano@linaro.org> References: <20220927143239.376737-1-daniel.lezcano@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220927_073308_124720_62348B98 X-CRM114-Status: GOOD ( 13.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 The thermal_zone_get_trip() does the same check as of_thermal_is_trip_valid(). Replace the call to of_thermal_is_trip_valid() by thermal_zone_get_trip(). Signed-off-by: Daniel Lezcano --- drivers/thermal/samsung/exynos_tmu.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 91e6860b5ec4..34b460092308 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -554,13 +554,14 @@ static void exynos4210_tmu_control(struct platform_device *pdev, bool on) { struct exynos_tmu_data *data = platform_get_drvdata(pdev); struct thermal_zone_device *tz = data->tzd; + struct thermal_trip trip; unsigned int con, interrupt_en = 0, i; con = get_con_reg(data, readl(data->base + EXYNOS_TMU_REG_CONTROL)); if (on) { for (i = 0; i < data->ntrip; i++) { - if (!of_thermal_is_trip_valid(tz, i)) + if (thermal_zone_get_trip(tz, i, &trip)) continue; interrupt_en |= @@ -584,13 +585,14 @@ static void exynos5433_tmu_control(struct platform_device *pdev, bool on) { struct exynos_tmu_data *data = platform_get_drvdata(pdev); struct thermal_zone_device *tz = data->tzd; + struct thermal_trip trip; unsigned int con, interrupt_en = 0, pd_det_en, i; con = get_con_reg(data, readl(data->base + EXYNOS_TMU_REG_CONTROL)); if (on) { for (i = 0; i < data->ntrip; i++) { - if (!of_thermal_is_trip_valid(tz, i)) + if (thermal_zone_get_trip(tz, i, &trip)) continue; interrupt_en |= @@ -615,13 +617,14 @@ static void exynos7_tmu_control(struct platform_device *pdev, bool on) { struct exynos_tmu_data *data = platform_get_drvdata(pdev); struct thermal_zone_device *tz = data->tzd; + struct thermal_trip trip; unsigned int con, interrupt_en = 0, i; con = get_con_reg(data, readl(data->base + EXYNOS_TMU_REG_CONTROL)); if (on) { for (i = 0; i < data->ntrip; i++) { - if (!of_thermal_is_trip_valid(tz, i)) + if (thermal_zone_get_trip(tz, i, &trip)) continue; interrupt_en |= -- 2.34.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel