From patchwork Tue Oct 16 14:56:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Luba X-Patchwork-Id: 10643719 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 85CF017D4 for ; Tue, 16 Oct 2018 14:56:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 729B229EFF for ; Tue, 16 Oct 2018 14:56:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6666129F2A; Tue, 16 Oct 2018 14:56:44 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 6026629EFF for ; Tue, 16 Oct 2018 14:56:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727123AbeJPWrb (ORCPT ); Tue, 16 Oct 2018 18:47:31 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:39213 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726778AbeJPWrb (ORCPT ); Tue, 16 Oct 2018 18:47:31 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20181016145639euoutp023ae33c135eeb1cecd8fcdf174369f9ed~eHqEQV2XZ0360503605euoutp023 for ; Tue, 16 Oct 2018 14:56:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181016145639euoutp023ae33c135eeb1cecd8fcdf174369f9ed~eHqEQV2XZ0360503605euoutp023 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1539701799; bh=Utc5er4Zxe7vWuFo+3uwuF1I9+UvTJV8mbYc0op2+nw=; h=From:To:Cc:Subject:Date:References:From; b=lgzNCo3aJTAmdaCPqQNYEoJuCH0PXGSZvF5i1vrJQ2cgi9RCnoJHHj+ewikzoFzU0 4s9eqZf9xPKEAWLVJPFWF2W3dTZenJ9y2n4vvQoLrjNq7VHtZeAF1rIU5II6GmjOiO TLgddvby2beblnFlXMf69hu+9tGspvQb/BtDuNLE= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20181016145638eucas1p28141a2eb71c0b9d988c96bb13c36e83c~eHqDfnJ932133821338eucas1p2G; Tue, 16 Oct 2018 14:56:38 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 7A.21.04806.62CF5CB5; Tue, 16 Oct 2018 15:56:38 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20181016145637eucas1p2dfa78042b9fd4fd27af7cc8537b7f485~eHqCoEO-42133821338eucas1p2F; Tue, 16 Oct 2018 14:56:37 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20181016145637eusmtrp290f955e10bfa0cc113817d97336e4d67~eHqCY2pZI3061930619eusmtrp2E; Tue, 16 Oct 2018 14:56:37 +0000 (GMT) X-AuditID: cbfec7f5-34dff700000012c6-6f-5bc5fc2614ff Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id A8.AA.04128.52CF5CB5; Tue, 16 Oct 2018 15:56:37 +0100 (BST) Received: from AMDC3778.DIGITAL.local (unknown [106.120.51.20]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20181016145637eusmtip2853e0e9e2984f1cc262c80072ba0c3c2~eHqB3sHFu2833228332eusmtip2H; Tue, 16 Oct 2018 14:56:37 +0000 (GMT) From: Lukasz Luba To: 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 Cc: rui.zhang@intel.com, edubezval@gmail.com, daniel.lezcano@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, corbet@lwn.net, b.zolnierkie@samsung.com, Lukasz Luba Subject: [PATCH 00/11] thermal: add new flag irq-mode for trip point Date: Tue, 16 Oct 2018 16:56:11 +0200 X-Mailer: git-send-email 2.7.4 X-Brightmail-Tracker: H4sIAAAAAAAAA0VSW0hTYRzvO2eX43B2Ot6+zIZODA2ahQYHupAgdJ66CmFmOvM4JZ224zSj aMvLNtERhSYaanmLIS3nsGlepm2tKZpazBR7iCzQyoemZOGlHbbq7Xf9/76HD0OJx9wwLFde RCvk0jwxT8DpffXrzYF9G/bUg+qOCLK73sglF60aQDa595LNtkku2fzOxSXnVeGk6ZMHPKps 45Bv+x/ySHeNDZDts9MIWTFo45OLH/W8E0Kqq6kLUH0NH/hU68ASQpkMOh614BrgUT1tt6lW /X0uNbIygFB6swFQbpPojOCi4GgWnZdbTCvijmcIcsZnYwungq7X2ecQFdjcWQX8MIgnwHpn P1IFBBiBPwHwebkaeMkqgDOfrT7HDWBjhYr7t2KsfcrxGp0AOq0u5F9lYczsIRjGwyXQYrjG 6kF4I4DuoVY+S1DcCeB8Zy/CngrEk+DvJQ2PxRw8GjoMP4F3QgTnJnUoW4B4Bx/ecU2grCHE i2Hf5grPG0qClu4KXyEQLjvMfC8Oh9t9zYgXM3BCa/Dlb0KN0+LLHIEvHdNc9qUoHguN/XFe ORG+WGGn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FqEUwfEwenVANjn1Evz8UlDfpsBxdnPNk2v+C4l7Ve/Ou2Nd7Ru8zvrbOxnGdhpbyB ee++6fxdnf3LrmYs/FDF12+j5+nJ0bnXmb/kkML/G7ofI8NXLeLdMrPq+fnNzkv1nuqvXttR uGbO4zv5yy/1f4n1nfDCRfzYxf5P23s/Gr1Irdixl0Mn/pn7ZzWv/W/WKrEUZyQaajEXFScC AN8UtZ6MAgAA Message-Id: <20181016145637eucas1p2dfa78042b9fd4fd27af7cc8537b7f485~eHqCoEO-42133821338eucas1p2F@eucas1p2.samsung.com> X-CMS-MailID: 20181016145637eucas1p2dfa78042b9fd4fd27af7cc8537b7f485 X-Msg-Generator: CA X-RootMTR: 20181016145637eucas1p2dfa78042b9fd4fd27af7cc8537b7f485 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181016145637eucas1p2dfa78042b9fd4fd27af7cc8537b7f485 References: 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 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. 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(-)