Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp313966imm; Wed, 17 Oct 2018 00:04:07 -0700 (PDT) X-Google-Smtp-Source: ACcGV60o1AHO5wvzX9F/o54w2nKO3pFWpPTcjf08bCM4Uh+oSY3ce+jcfHi6rUBL2HyZGhIPlLrO X-Received: by 2002:a65:64d5:: with SMTP id t21-v6mr2746605pgv.428.1539759847513; Wed, 17 Oct 2018 00:04:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539759847; cv=none; d=google.com; s=arc-20160816; b=HphCnuztrCzd2S7R38PdsqXperA92Ih3V7rr595o5VuW2QlZVGWKojaTSb5CZUpkgV SBV3Hoh8KnJ/8X7OXQ7jNSwZRwhF6+qIr2eSmPkvhvdROVKUaPmewCciE9VYFZNwfrqw KfYQCgWW1aH9POpTPUN8bA70T9AY9bTrNjoQoMCnAkepo5wa7ERrbokiVr1qHfMwIF/1 PFg5Gs/7Ef896rrm0xLtV94kH8NtJ9x14zlLDxrWKxiZWJe//Xup7jOFQ6HHRs2j2ydy 5DiS2VSAfpLOrsg43nfQB8KIrlhJ3BCApuvXjOc8Sr1cC9FSkslPKsdiQbiWZ2pdNt3V XL1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=KBP1p4NeDrFvGrl5ybCs1RrGYgm6SXucmIRz5ZPKKQQ=; b=mYeHC6zjGqDgY83Zan/BQCzLStYSMrsr7SdOJF4yqxmmLQ6AV4Zi4HoPYO0Cu/pLnl UzP3XeJ3W34cbhnLK+1Cmonk43nXRh3x0mnQf7KGEx88SVaxUGU6t+36Qloq25ovdYh0 QpJULIKXDzjRXBR5I/0M1U2rDARtSvdkWwSUASWPYTvmsmzgq9jGLs7IKF9m4EV9yj8/ giLpzoEbWTBFZM9g2f5UbVKUZNVSOG0kx1a6K7pwTq62GCEq+FDrsl0K2AMLm5DVvkDa bQJHsvB2He+v4TDnPDtrY5hAvZC2CU0A9CEGhw97TekIbT4Ae4hvs4sx5/oR07u2KWfA CrCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=O3l4nl2x; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u8-v6si17050167plh.376.2018.10.17.00.03.51; Wed, 17 Oct 2018 00:04:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=O3l4nl2x; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727550AbeJQO5l (ORCPT + 99 others); Wed, 17 Oct 2018 10:57:41 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:42632 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727246AbeJQO5k (ORCPT ); Wed, 17 Oct 2018 10:57:40 -0400 Received: by mail-lj1-f194.google.com with SMTP id y71-v6so23266079lje.9; Wed, 17 Oct 2018 00:03:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KBP1p4NeDrFvGrl5ybCs1RrGYgm6SXucmIRz5ZPKKQQ=; b=O3l4nl2xjEHsX+l8mKWXi0hIKxZKvDkJiq3ui8nMveGXl5bMQKssSlMs88VYSdl6Sp qyYZVPOjunSMZfjkbTTPRoGKCfry+F1jo2pmb6IV3n/41+Gf4W9G4ta4AQzodsXLLtN8 MYTWq0hx4ekf0v6Csn1Nxy+qKoThpQvEI06QH+VwIKKhHsbea3Q/SQuLsaxUAsZ39L2B 8IcpYHC4SN+x6Jy/4kxV0bmxexrXzDYYVH7qBO+irgz1WjNOOhdGVxOjMgudH3Yu/nmV eFuovPvpDS8u43a0J83VQqd3i2Gtc6cga+/GDy41jmir8PYTiVgEaGNeVmq/Tvb/UsU7 JaOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KBP1p4NeDrFvGrl5ybCs1RrGYgm6SXucmIRz5ZPKKQQ=; b=mWwagbMIE1tiMO/T5nxVWy1VsxNQJLiZnsKISe2wk52kAraUvmWyRIN5HHDl1BoiJj ZKz/Ws25H1rmBiukl/kdthXk7zHwAdHlQ4faO3bAmInV+kUVMr5jrRN4mpxikg1PuAU9 RcvUpsnUaSN0d5A0YZjqTKR40aPKqr8KkNz6jH3q5QeibUm6OdQZ9wk90taEONRLcQvI Y0XxbwTcvbQk6PGpjKpuzeCGA/m79TwMQV6gRcv1sCa3A+p+HeAvm+xOKi8Sq0EeZbUN deK1YZrOqunwrxvCPh5/ZVNZmqGH1eew5FJuZpkzyyJ7I/rH7frM+k+Kwh9RPc2QeXKe ImnQ== X-Gm-Message-State: ABuFfoglHuQnIUg7jI+BvfTCtousC+6R1iI9oj/GX3FaUiVN2tcIF+qA XhZOFq5FFueY9GnnedjKSDA2HsUa7QYJ/R9hTpk= X-Received: by 2002:a2e:458b:: with SMTP id s133-v6mr17326068lja.60.1539759803963; Wed, 17 Oct 2018 00:03:23 -0700 (PDT) MIME-Version: 1.0 References: <20181016145637eucas1p2dfa78042b9fd4fd27af7cc8537b7f485~eHqCoEO-42133821338eucas1p2F@eucas1p2.samsung.com> In-Reply-To: <20181016145637eucas1p2dfa78042b9fd4fd27af7cc8537b7f485~eHqCoEO-42133821338eucas1p2F@eucas1p2.samsung.com> From: =?UTF-8?Q?Krzysztof_Koz=C5=82owski?= Date: Wed, 17 Oct 2018 09:03:13 +0200 Message-ID: Subject: Re: [PATCH 00/11] thermal: add new flag irq-mode for trip point To: l.luba@partner.samsung.com Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, rui.zhang@intel.com, edubezval@gmail.com, daniel.lezcano@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, corbet@lwn.net, =?UTF-8?B?QmFydMWCb21pZWogxbtvxYJuaWVya2lld2ljeg==?= Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 16 Oct 2018 at 16:56, Lukasz Luba wrote: > > Hi all, > > This patch set adds new flag and mechanism in thermal trip point in DT. > The current situation with 'passive' (passive cooling - DVFS) > trip point is that it enables polling mode in thermal framework. For DT platform, I checked it some months ago... and that time I was pretty sure - passive mode does not enable polling (unless you tell it explicitly with "polling-delay-passive"). Maybe something changed... but quick look at the code tell me that not. Passive does not indicate polling mode. Why do you think that passive enables polling? Best regards > If the device supports irqs fired when the desired temerature is met, > thermal framwork should be notifed from driver's irq routine. > This is sufficent and there is no need of polling. > As a workaround, people declare trip point as 'active' > (active cooling, i.e. fan) to bypass polling mode setup in thermal > framework. > > With this patch set trip point 'passive' declared in DT with explicit flag: > 'irq-mode;' will not register itself as polling mode. > > A good example is Exynos4 SoC family, where there is 4 HW supported > trip points and there is a need of 6. The rest 2 are declared as 'passive' > without 'irq-mode;' flag, thus polling needed. > > It does not break existing design for trip points which do not have 'irq-mode' > flag - they will use polling. > > For consistency this flag should be added to all trip point types('active', > 'passive', 'hot', 'critical') when need (meaning, when irq will notify thermal > framework). > > Regards, > Lukasz Luba > > Lukasz Luba (11): > thermal: remove unused function parameter > thermal: add irq-mode configuration for trip point > thermal: add new sysfs file for irq-mode > Doc: thermal: new irq-mode for trip point > Doc: DT: thermal: new irq-mode for trip point > DT: arm64: exynos: add support for thermal trip irq-mode > DT: arm64: exynos7: add support for thermal trip irq-mode > DT: arm: exynos4: add support for thermal trip irq-mode > DT: arm: exynos: add support for thermal trip irq-mode > DT: arm: exynos: add support for thermal trip irq-mode > DT: arm: exynos: add support for thermal trip irq-mode > > .../devicetree/bindings/thermal/thermal.txt | 7 ++ > Documentation/thermal/sysfs-api.txt | 9 ++ > arch/arm/boot/dts/exynos4-cpu-thermal.dtsi | 10 +- > arch/arm/boot/dts/exynos5410-odroidxu.dts | 10 +- > arch/arm/boot/dts/exynos5420-trip-points.dtsi | 10 +- > arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 40 +++++--- > arch/arm64/boot/dts/exynos/exynos5433-tmu.dtsi | 105 ++++++++++++++------- > .../arm64/boot/dts/exynos/exynos7-trip-points.dtsi | 8 ++ > drivers/thermal/of-thermal.c | 17 ++++ > drivers/thermal/thermal_core.c | 16 ++-- > drivers/thermal/thermal_sysfs.c | 53 ++++++++++- > include/linux/thermal.h | 5 + > 12 files changed, 226 insertions(+), 64 deletions(-) > > -- > 2.7.4 >