All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Krzysztof Kozłowski" <k.kozlowski.k+lkml@gmail.com>
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,
	"Bartłomiej Żołnierkiewicz" <b.zolnierkie@samsung.com>
Subject: Re: [PATCH 00/11] thermal: add new flag irq-mode for trip point
Date: Wed, 17 Oct 2018 09:03:13 +0200	[thread overview]
Message-ID: <CAJKOXPei6b7TnOnG7DUMNm+xEUsMxqcMOfbG10cJbrNROXLN2w@mail.gmail.com> (raw)
In-Reply-To: <20181016145637eucas1p2dfa78042b9fd4fd27af7cc8537b7f485~eHqCoEO-42133821338eucas1p2F@eucas1p2.samsung.com>

On Tue, 16 Oct 2018 at 16:56, Lukasz Luba <l.luba@partner.samsung.com> 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
>

WARNING: multiple messages have this Message-ID (diff)
From: k.kozlowski.k+lkml@gmail.com (Krzysztof Kozłowski)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 00/11] thermal: add new flag irq-mode for trip point
Date: Wed, 17 Oct 2018 09:03:13 +0200	[thread overview]
Message-ID: <CAJKOXPei6b7TnOnG7DUMNm+xEUsMxqcMOfbG10cJbrNROXLN2w@mail.gmail.com> (raw)
In-Reply-To: <20181016145637eucas1p2dfa78042b9fd4fd27af7cc8537b7f485~eHqCoEO-42133821338eucas1p2F@eucas1p2.samsung.com>

On Tue, 16 Oct 2018 at 16:56, Lukasz Luba <l.luba@partner.samsung.com> 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
>

  reply	other threads:[~2018-10-17  7:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20181016145637eucas1p2dfa78042b9fd4fd27af7cc8537b7f485@eucas1p2.samsung.com>
2018-10-16 14:56 ` [PATCH 00/11] thermal: add new flag irq-mode for trip point Lukasz Luba
2018-10-16 14:56   ` Lukasz Luba
2018-10-17  7:03   ` Krzysztof Kozłowski [this message]
2018-10-17  7:03     ` Krzysztof Kozłowski
2018-10-17  7:42     ` Lukasz Luba
2018-10-17  7:42       ` Lukasz Luba
2018-10-17  7:52       ` Krzysztof Kozlowski
2018-10-17  7:52         ` Krzysztof Kozlowski
2018-10-17  8:24         ` Lukasz Luba
2018-10-17  8:24           ` Lukasz Luba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJKOXPei6b7TnOnG7DUMNm+xEUsMxqcMOfbG10cJbrNROXLN2w@mail.gmail.com \
    --to=k.kozlowski.k+lkml@gmail.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=corbet@lwn.net \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=edubezval@gmail.com \
    --cc=l.luba@partner.samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.