From patchwork Tue Oct 16 14:56:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Luba X-Patchwork-Id: 10643743 X-Patchwork-Delegate: rui.zhang@intel.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 77DB417D4 for ; Tue, 16 Oct 2018 14:58:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 65BCD29119 for ; Tue, 16 Oct 2018 14:58:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 593F329EFF; Tue, 16 Oct 2018 14:58: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=-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 00B8729119 for ; Tue, 16 Oct 2018 14:58:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727163AbeJPWrd (ORCPT ); Tue, 16 Oct 2018 18:47:33 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:39227 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726760AbeJPWrc (ORCPT ); Tue, 16 Oct 2018 18:47:32 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20181016145641euoutp0202d8790c0eddc054e2efdda5573e7748~eHqGLbc8i0316303163euoutp02j for ; Tue, 16 Oct 2018 14:56:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181016145641euoutp0202d8790c0eddc054e2efdda5573e7748~eHqGLbc8i0316303163euoutp02j DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1539701801; bh=rzIY2soOD1M1UDKrc+X0WCeYTqj8P76+NMfULbIsJ2U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PTNnIF58IJnjSRSzGNNCPwbFv+TUW5KygfYRjiYWlLzIvNmSsuX1nLUcnzr5FXTkR N2YvUZEYLsEQifDWYFXW2EOnbFaLaqXpfC51/hfdSrxi1JJVxif0hhnRp/8UazfayJ 5rtfFvRZ1JY8s/G6ec/XMMUny4RQdWBePEoVTwMU= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181016145640eucas1p162bf0e36a8d7db602c3d928789ee413e~eHqFbtohL2235322353eucas1p1w; Tue, 16 Oct 2018 14:56:40 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 0C.21.04806.82CF5CB5; Tue, 16 Oct 2018 15:56:40 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20181016145640eucas1p10d60eaf07c6a4b0c539e46053d2ea7de~eHqEkMsUc2218322183eucas1p19; Tue, 16 Oct 2018 14:56:40 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20181016145639eusmtrp165f659ddab39bdb22db15bef7fecbfd1~eHqEVGxf61176711767eusmtrp1r; Tue, 16 Oct 2018 14:56:39 +0000 (GMT) X-AuditID: cbfec7f5-367ff700000012c6-74-5bc5fc2822e1 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id A9.D9.04284.72CF5CB5; Tue, 16 Oct 2018 15:56:39 +0100 (BST) Received: from AMDC3778.DIGITAL.local (unknown [106.120.51.20]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20181016145639eusmtip2f891a136be7dc57e6b00280b180c6454~eHqDz4e8d2832928329eusmtip2K; Tue, 16 Oct 2018 14:56:39 +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 01/11] thermal: remove unused function parameter Date: Tue, 16 Oct 2018 16:56:12 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1539701782-26852-1-git-send-email-l.luba@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSa0hTYRiA+Xa2s7PR9HSU/PAaC1OTZmLSgVIMgw74o/oRRAq19KSS22xH l2bRfui8YJqK5nUqmpPhBc1MRU2dOsW8dZlTC4k0S9GkaaVI5Tyr/j3v814/+DCEaOQ5Y7Hy BFopl8aJUSG3fXh78rj37lD4ibItX7KluJlHLvalA1JrcSMrByd4ZOUbE4+cU7uSrR/3oFpT yyVfd5WjpOXhICCfzExzyLSeQT65+CEHDRFRDdoGQHWWvudTNd1fOFSrPhOl3pm6Uepp7QOq JqeAR/Wvd3OonDY9oCyt7heFV4Vnoui4WBWt9Au+Loyp0Nbx45eESU3arxw1SBVkAQEG8ZNQ U6xBs4AQI/B6ABcaSgAbbAL4TVdkCywA7vTp+FkA22/pmiZYrwPQULqB/utYa57mWYtQXAI7 9Let3hEvA9DSW8O3Bgg+CuCcrp1jXe6Ah8Dvb9cRK3NxT/jis57PHuUOZycy970AD4Nz5iqE 9b18+Ox5spVFuAr26DQc1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itzDzFKcDArifCmXzoaLcSbklhZlVqUH19UmpNafIjRFOimicxSosn5wKjNK4k3NDU0t7A0 NDc2NzazUBLnPW9QGSUkkJ5YkpqdmlqQWgTTx8TBKdXA6H9k99fDdnI/3zVdurLkG/unvmcX vzqzJjKK+elcvGRV+5xlw8+oKd8kLteVPgyWWhqXNUvF8Ev4pbhj92Tz5r4PmcZgcfnp/C+Z YZ+05h5vWe9S3RAo3mz94k2B9/p1TB2zWrTPVnWW1wSHTl/UcjvQJZnxvf+D3SG+GddTE48U Gkx6bVgkosRSnJFoqMVcVJwIAPcXyrCiAgAA Message-Id: <20181016145640eucas1p10d60eaf07c6a4b0c539e46053d2ea7de~eHqEkMsUc2218322183eucas1p19@eucas1p1.samsung.com> X-CMS-MailID: 20181016145640eucas1p10d60eaf07c6a4b0c539e46053d2ea7de X-Msg-Generator: CA X-RootMTR: 20181016145640eucas1p10d60eaf07c6a4b0c539e46053d2ea7de X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181016145640eucas1p10d60eaf07c6a4b0c539e46053d2ea7de References: <1539701782-26852-1-git-send-email-l.luba@partner.samsung.com> 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 Clean unused parameter from internal framework function. Cc: Zhang Rui Cc: Eduardo Valentin Cc: Daniel Lezcano Signed-off-by: Lukasz Luba --- drivers/thermal/thermal_core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 6ab9823..2c6d72a 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -313,9 +313,7 @@ static void monitor_thermal_zone(struct thermal_zone_device *tz) mutex_unlock(&tz->lock); } -static void handle_non_critical_trips(struct thermal_zone_device *tz, - int trip, - enum thermal_trip_type trip_type) +static void handle_non_critical_trips(struct thermal_zone_device *tz, int trip) { tz->governor ? tz->governor->throttle(tz, trip) : def_governor->throttle(tz, trip); @@ -416,7 +414,7 @@ static void handle_thermal_trip(struct thermal_zone_device *tz, int trip) if (type == THERMAL_TRIP_CRITICAL || type == THERMAL_TRIP_HOT) handle_critical_trips(tz, trip, type); else - handle_non_critical_trips(tz, trip, type); + handle_non_critical_trips(tz, trip); /* * Alright, we handled this trip successfully. * So, start monitoring again. From patchwork Tue Oct 16 14:56:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Luba X-Patchwork-Id: 10643737 X-Patchwork-Delegate: rui.zhang@intel.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 9664117D4 for ; Tue, 16 Oct 2018 14:57:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8027F29119 for ; Tue, 16 Oct 2018 14:57:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 71CFB29EFF; Tue, 16 Oct 2018 14:57:51 +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 D3F0C29119 for ; Tue, 16 Oct 2018 14:57:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727263AbeJPWrg (ORCPT ); Tue, 16 Oct 2018 18:47:36 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:57168 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727191AbeJPWre (ORCPT ); Tue, 16 Oct 2018 18:47:34 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20181016145644euoutp01c870924ead5dd5138e4bb1ac80993477~eHqIxYQbs0427704277euoutp01d for ; Tue, 16 Oct 2018 14:56:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20181016145644euoutp01c870924ead5dd5138e4bb1ac80993477~eHqIxYQbs0427704277euoutp01d DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1539701804; bh=ZaON51JdJUOdRku3RBbdEjVhfEGCUlhxysvABCFT0aA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o4nqu/UdlHVcFVXjVp5JZGJ4+fy+CiTUOWlOkdPgd34YYk9j3OjEh4n51wVQFsugE oefnaxUQFc/xH34OseqdsCibylPScsuv0kI4Y8Eb8WDctCnhV+98edckyL9FYQVvq8 Id6x82s6v9UYEf2i2gbJoBy4dzfc6RAk14+pRl+A= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20181016145643eucas1p20b76fcfe67c67680ebf1ec88c18222cb~eHqH3OWhp0771207712eucas1p2l; Tue, 16 Oct 2018 14:56:43 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id C2.C2.04441.B2CF5CB5; Tue, 16 Oct 2018 15:56:43 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20181016145642eucas1p2d3cfc208d3f401bfe662d6df071cc3b8~eHqHE9TOU2133821338eucas1p2M; Tue, 16 Oct 2018 14:56:42 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20181016145642eusmtrp1d3c59afc722ee70e20b7a75b0fed2106~eHqG2E-DX1176711767eusmtrp1z; Tue, 16 Oct 2018 14:56:42 +0000 (GMT) X-AuditID: cbfec7f2-5e3ff70000001159-c3-5bc5fc2b2857 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 1C.D9.04284.A2CF5CB5; Tue, 16 Oct 2018 15:56:42 +0100 (BST) Received: from AMDC3778.DIGITAL.local (unknown [106.120.51.20]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20181016145641eusmtip23d41a8d2e82508875a1544c042728100~eHqGUckWn2834528345eusmtip2B; Tue, 16 Oct 2018 14:56:41 +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 02/11] thermal: add irq-mode configuration for trip point Date: Tue, 16 Oct 2018 16:56:13 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1539701782-26852-1-git-send-email-l.luba@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSbUhTYRTHeXZ3766j2XVKPvgWrYRM0izDS4kZ9OFKSAV+qX3IpZcp6dRd NTWhle9illkavszZZtbQpuY700pnU3xfoUuttCwxNNAVLQrLeWd9+53/Of//OTw8OCJsQt3w WFkyLZdJ4kQYn9v+8uf4Qd/fA+JDbR0E2Xxfh5KLz/MAqbR4kjWGMZSseT2FkjMKD7Ll4ybU 5mq45KvuKoy03DQAsm56kkPm9Bh45OJCMRYqoBqUDYDqqnjLo9T6ZQ7Voi3AqLkpPUY91Vyj 1MWlKPXiq55DFbdq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rYuRC6jmE6PEvY8LWbsYOTjYBPQkdqwqBImLCMxnlDi66TJYEbPAZUaJ7ml7wLqFBTwl2h+0 MoHYLAKqElsa34Jt4xXwkth8/z8LxAY5iZvnOplBbE4Bb4lbNxYwgywQAqq5uJhxAiPfAkaG VYwiqaXFuem5xYZ6xYm5xaV56XrJ+bmbGIGxse3Yz807GC9tDD7EKMDBqMTD++P6kWgh1sSy 4srcQ4wSHMxKIrzpl45GC/GmJFZWpRblxxeV5qQWH2I0BbppIrOUaHI+MG7zSuINTQ3NLSwN zY3Njc0slMR5zxtURgkJpCeWpGanphakFsH0MXFwSjUwGrrobxB/5pLzP6N3n813Kb/bjBEv pT6kzw+R2/CUPZMr6Pil8GvsR648C3KKT+c+o+bivFiPq3dRVPuyl46u7z/an3talCv80Fro Yfbyjz2ez5Im+Sc3dNQqpl48/EJcseV+Fmt1b991Nu0fWkqftXRVj4Te3+du9vSQjlbQp38X Zm8Pf3xSiaU4I9FQi7moOBEAmv4XAKMCAAA= Message-Id: <20181016145642eucas1p2d3cfc208d3f401bfe662d6df071cc3b8~eHqHE9TOU2133821338eucas1p2M@eucas1p2.samsung.com> X-CMS-MailID: 20181016145642eucas1p2d3cfc208d3f401bfe662d6df071cc3b8 X-Msg-Generator: CA X-RootMTR: 20181016145642eucas1p2d3cfc208d3f401bfe662d6df071cc3b8 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181016145642eucas1p2d3cfc208d3f401bfe662d6df071cc3b8 References: <1539701782-26852-1-git-send-email-l.luba@partner.samsung.com> 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 This patch adds support irq mode in trip point. When that flag is set in DT, there is no need for polling int thermal framework. Crossing the trip point will rise an irq. The naming convention for tip point 'type' can be confussing and 'passive' (whic is passive cooling) might be interpretted wrongly. This mechanism prevents from missue and adds explicit setting for hardware which support interrupts for pre-configured temperature threshold. Cc: Zhang Rui Cc: Eduardo Valentin Cc: Daniel Lezcano Signed-off-by: Lukasz Luba --- drivers/thermal/of-thermal.c | 17 +++++++++++++++++ drivers/thermal/thermal_core.c | 10 ++++++++-- include/linux/thermal.h | 5 +++++ 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c index 4f28165..db0942a 100644 --- a/drivers/thermal/of-thermal.c +++ b/drivers/thermal/of-thermal.c @@ -289,6 +289,20 @@ static int of_thermal_get_trip_type(struct thermal_zone_device *tz, int trip, return 0; } +static int +of_thermal_get_trip_irq_mode(struct thermal_zone_device *tz, int trip, + bool *mode) +{ + struct __thermal_zone *data = tz->devdata; + + if (trip >= data->ntrips || trip < 0) + return -EDOM; + + *mode = data->trips[trip].irq_mode; + + return 0; +} + static int of_thermal_get_trip_temp(struct thermal_zone_device *tz, int trip, int *temp) { @@ -371,6 +385,7 @@ static struct thermal_zone_device_ops of_thermal_ops = { .set_mode = of_thermal_set_mode, .get_trip_type = of_thermal_get_trip_type, + .get_trip_irq_mode = of_thermal_get_trip_irq_mode, .get_trip_temp = of_thermal_get_trip_temp, .set_trip_temp = of_thermal_set_trip_temp, .get_trip_hyst = of_thermal_get_trip_hyst, @@ -779,6 +794,8 @@ static int thermal_of_populate_trip(struct device_node *np, return ret; } + trip->irq_mode = of_property_read_bool(np, "irq-mode"); + /* Required for cooling map matching */ trip->np = np; of_node_get(np); diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 2c6d72a..f569532 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -404,6 +404,7 @@ static void handle_critical_trips(struct thermal_zone_device *tz, static void handle_thermal_trip(struct thermal_zone_device *tz, int trip) { enum thermal_trip_type type; + bool irq_mode = false; /* Ignore disabled trip points */ if (test_bit(trip, &tz->trips_disabled)) @@ -417,9 +418,14 @@ static void handle_thermal_trip(struct thermal_zone_device *tz, int trip) handle_non_critical_trips(tz, trip); /* * Alright, we handled this trip successfully. - * So, start monitoring again. + * So, start monitoring in polling mode if + * trip is not using irq HW support. */ - monitor_thermal_zone(tz); + if (tz->ops->get_trip_irq_mode) + tz->ops->get_trip_irq_mode(tz, trip, &irq_mode); + + if (!irq_mode) + monitor_thermal_zone(tz); } static void update_temperature(struct thermal_zone_device *tz) diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 5f4705f..b064565 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -103,6 +103,7 @@ struct thermal_zone_device_ops { enum thermal_device_mode); int (*get_trip_type) (struct thermal_zone_device *, int, enum thermal_trip_type *); + int (*get_trip_irq_mode) (struct thermal_zone_device *, int, bool *); int (*get_trip_temp) (struct thermal_zone_device *, int, int *); int (*set_trip_temp) (struct thermal_zone_device *, int, int); int (*get_trip_hyst) (struct thermal_zone_device *, int, int *); @@ -196,6 +197,7 @@ struct thermal_zone_device { struct thermal_attr *trip_temp_attrs; struct thermal_attr *trip_type_attrs; struct thermal_attr *trip_hyst_attrs; + struct thermal_attr *trip_irq_mode_attrs; void *devdata; int trips; unsigned long trips_disabled; /* bitmap for disabled trips */ @@ -364,6 +366,8 @@ struct thermal_zone_of_device_ops { * @temperature: temperature value in miliCelsius * @hysteresis: relative hysteresis in miliCelsius * @type: trip point type + * @irq_mode: to not use polling in framework set support of HW irq (which will + * be triggered when temperature reaches this level). */ struct thermal_trip { @@ -371,6 +375,7 @@ struct thermal_trip { int temperature; int hysteresis; enum thermal_trip_type type; + bool irq_mode; }; /* Function declarations */ From patchwork Tue Oct 16 14:56:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Luba X-Patchwork-Id: 10643739 X-Patchwork-Delegate: rui.zhang@intel.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 E372317D4 for ; Tue, 16 Oct 2018 14:58:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D07C029119 for ; Tue, 16 Oct 2018 14:58:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C459D29EFF; Tue, 16 Oct 2018 14:58:03 +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 48AEE29119 for ; Tue, 16 Oct 2018 14:58:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727032AbeJPWso (ORCPT ); Tue, 16 Oct 2018 18:48:44 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:57181 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727214AbeJPWrf (ORCPT ); Tue, 16 Oct 2018 18:47:35 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20181016145645euoutp01f241ce99c00a3d05fbabbfead4b81178~eHqJwYZGk0464804648euoutp01Q for ; Tue, 16 Oct 2018 14:56:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20181016145645euoutp01f241ce99c00a3d05fbabbfead4b81178~eHqJwYZGk0464804648euoutp01Q DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1539701805; bh=YL3IJQwlo5YNFrxIFkhGqiDAirUyPIfzICP0/e+gE7E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Dl51satmR1c3w+yAdbiNRmZgcA3uNndkqCTcuY867OOOoqn3Un7413tSX/VCNZ7DO 0DS0K8HHRuuvgL3LmWxapMBqptDCknB/kphkw8J46NhkvyYwJwxc106VwFic2b3wwV q9fPDOe+SeBUFtvjBwgBNTEjNAol+Ju8nBb216Dg= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181016145644eucas1p1ebaa178971e16d75ece84cba3035817a~eHqJDSr863104931049eucas1p1k; Tue, 16 Oct 2018 14:56:44 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 9E.21.04806.C2CF5CB5; Tue, 16 Oct 2018 15:56:44 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20181016145644eucas1p2755acef5196e01799d5704fac9766547~eHqIWySvH0770707707eucas1p2z; Tue, 16 Oct 2018 14:56:44 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20181016145643eusmtrp18e14c3b9e80dd8c900577fdbfa20e6fe~eHqICmBmk1176711767eusmtrp12; Tue, 16 Oct 2018 14:56:43 +0000 (GMT) X-AuditID: cbfec7f5-34dff700000012c6-81-5bc5fc2c8184 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 5D.D9.04284.B2CF5CB5; Tue, 16 Oct 2018 15:56:43 +0100 (BST) Received: from AMDC3778.DIGITAL.local (unknown [106.120.51.20]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20181016145643eusmtip203b1a7dcf3f34716276b899e65d7f1d3~eHqHeJKpU2834528345eusmtip2D; Tue, 16 Oct 2018 14:56:43 +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 03/11] thermal: add new sysfs file for irq-mode Date: Tue, 16 Oct 2018 16:56:14 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1539701782-26852-1-git-send-email-l.luba@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSfSxVcRjH97vnnnuPO1fHIZ55rdustKKmP86qVVZbZ6LZxMIfujhheese lNakP7wOWUSoi7zuzmZedkNcb1felryNSxKRllGrmy2Rch3Vf5/n+3yflz17CIyqwa2IsMgY VhEpD5eJJEL1y/XXR49s9vgfezDjQNc9rsXpxY4URCv1tnSxdgini8cncHo60YauX9iG0uRy IT3W8kRE6zO1iK6YHBHQSW1aMb04nyU6J2VqlDWIaS58K2bKWj8JmHpVmoiZmWgVMQ3l95iy rByc6fzcKmCyGlWI0dfbeUr8JKeD2fCwOFbhfOaaJDTvFxVdaXdb9y4XT0QbkI4IAsgTsNHo l44kBEVWI3gzt4T44DsC3eRHIR/oEfRVr2HpyGinom1iS8QnqhBUFk5i/0oyf5aJDX1FpBM0 qW4adHOyCIFeY9AlBEb2I5iuUgsMrczIszC2Pis0sJB0gJV8XgfSDqaG0nbGGZGXYFpXsjMB SI0YljsLcENCSsbBYP7YbsEFGHw2IOLZDJZ7G8U828BgToaQZw5epap2PXchpb9p13MKuntH cMPWGOkItS3O/GFcYUpD8WgCulVTgxnbxofqfIyXpZCaTPE9DkFjxvDuLhZQVZMn5i0MDIwm 8NdRImgb6MaykX3h/1ElCKmQJRvLRYSwnEske8uJk0dwsZEhTkFREfVo+4cGt3rXmpBmM7AL kQSSGUt/TGr9KVwex8VHdCEgMJm5NGS0x5+SBsvj77CKqABFbDjLdSFrQiizlFYq6/wpMkQe w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7/R7/ZfO7o+0P/KxU9B Jv4XVeKVWIozEg21mIuKEwFlciBYowIAAA== Message-Id: <20181016145644eucas1p2755acef5196e01799d5704fac9766547~eHqIWySvH0770707707eucas1p2z@eucas1p2.samsung.com> X-CMS-MailID: 20181016145644eucas1p2755acef5196e01799d5704fac9766547 X-Msg-Generator: CA X-RootMTR: 20181016145644eucas1p2755acef5196e01799d5704fac9766547 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181016145644eucas1p2755acef5196e01799d5704fac9766547 References: <1539701782-26852-1-git-send-email-l.luba@partner.samsung.com> 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 Patch adds show functions for irq-mode feature. It allocates new attributes and extends the old list. Cc: Zhang Rui Cc: Eduardo Valentin Cc: Daniel Lezcano Signed-off-by: Lukasz Luba --- drivers/thermal/thermal_sysfs.c | 53 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c index 2241cea..372b439 100644 --- a/drivers/thermal/thermal_sysfs.c +++ b/drivers/thermal/thermal_sysfs.c @@ -21,6 +21,8 @@ #include "thermal_core.h" +#define TRIP_ATTR_NUM 4 + /* sys I/F for thermal zone */ static ssize_t @@ -167,6 +169,28 @@ trip_point_temp_show(struct device *dev, struct device_attribute *attr, } static ssize_t +trip_point_irq_mode_show(struct device *dev, struct device_attribute *attr, + char *buf) +{ + struct thermal_zone_device *tz = to_thermal_zone(dev); + int trip, ret; + bool mode; + + if (!tz->ops->get_trip_irq_mode) + return -EPERM; + + if (sscanf(attr->attr.name, "trip_point_%d_irq", &trip) != 1) + return -EINVAL; + + ret = tz->ops->get_trip_irq_mode(tz, trip, &mode); + + if (ret) + return ret; + + return sprintf(buf, "%d\n", mode); +} + +static ssize_t trip_point_hyst_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { @@ -520,10 +544,19 @@ static int create_trip_attrs(struct thermal_zone_device *tz, int mask) if (!tz->trip_type_attrs) return -ENOMEM; + tz->trip_irq_mode_attrs = kcalloc(tz->trips, + sizeof(*tz->trip_irq_mode_attrs), + GFP_KERNEL); + if (!tz->trip_irq_mode_attrs) { + kfree(tz->trip_type_attrs); + return -ENOMEM; + } + tz->trip_temp_attrs = kcalloc(tz->trips, sizeof(*tz->trip_temp_attrs), GFP_KERNEL); if (!tz->trip_temp_attrs) { kfree(tz->trip_type_attrs); + kfree(tz->trip_irq_mode_attrs); return -ENOMEM; } @@ -533,14 +566,17 @@ static int create_trip_attrs(struct thermal_zone_device *tz, int mask) GFP_KERNEL); if (!tz->trip_hyst_attrs) { kfree(tz->trip_type_attrs); + kfree(tz->trip_irq_mode_attrs); kfree(tz->trip_temp_attrs); return -ENOMEM; } } - attrs = kcalloc(tz->trips * 3 + 1, sizeof(*attrs), GFP_KERNEL); + attrs = kcalloc(tz->trips * TRIP_ATTR_NUM + 1, sizeof(*attrs), + GFP_KERNEL); if (!attrs) { kfree(tz->trip_type_attrs); + kfree(tz->trip_irq_mode_attrs); kfree(tz->trip_temp_attrs); if (tz->ops->get_trip_hyst) kfree(tz->trip_hyst_attrs); @@ -559,6 +595,19 @@ static int create_trip_attrs(struct thermal_zone_device *tz, int mask) tz->trip_type_attrs[indx].attr.show = trip_point_type_show; attrs[indx] = &tz->trip_type_attrs[indx].attr.attr; + /* create trip irq_mode attribute */ + snprintf(tz->trip_irq_mode_attrs[indx].name, + THERMAL_NAME_LENGTH, "trip_point_%d_irq", indx); + + sysfs_attr_init(&tz->trip_irq_mode_attrs[indx].attr.attr); + tz->trip_irq_mode_attrs[indx].attr.attr.name = + tz->trip_irq_mode_attrs[indx].name; + tz->trip_irq_mode_attrs[indx].attr.attr.mode = S_IRUGO; + tz->trip_irq_mode_attrs[indx].attr.show = + trip_point_irq_mode_show; + attrs[indx + tz->trips * 3] = + &tz->trip_irq_mode_attrs[indx].attr.attr; + /* create trip temp attribute */ snprintf(tz->trip_temp_attrs[indx].name, THERMAL_NAME_LENGTH, "trip_point_%d_temp", indx); @@ -595,7 +644,7 @@ static int create_trip_attrs(struct thermal_zone_device *tz, int mask) attrs[indx + tz->trips * 2] = &tz->trip_hyst_attrs[indx].attr.attr; } - attrs[tz->trips * 3] = NULL; + attrs[tz->trips * TRIP_ATTR_NUM] = NULL; tz->trips_attribute_group.attrs = attrs; From patchwork Tue Oct 16 14:56:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Luba X-Patchwork-Id: 10643721 X-Patchwork-Delegate: rui.zhang@intel.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 3C0CA17D4 for ; Tue, 16 Oct 2018 14:56:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2805929F2A for ; Tue, 16 Oct 2018 14:56:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 19E162A02B; Tue, 16 Oct 2018 14:56:52 +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 9BFA329EFF for ; Tue, 16 Oct 2018 14:56:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727334AbeJPWri (ORCPT ); Tue, 16 Oct 2018 18:47:38 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:39273 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727242AbeJPWrg (ORCPT ); Tue, 16 Oct 2018 18:47:36 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20181016145646euoutp02f202ce14292ec7b08d03d76f16480741~eHqKnZoPg0360003600euoutp027 for ; Tue, 16 Oct 2018 14:56:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181016145646euoutp02f202ce14292ec7b08d03d76f16480741~eHqKnZoPg0360003600euoutp027 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1539701806; bh=vkNhkP6Pf3bAS0U4g+Ht9CEYBwZ0/+v0QfUAKe/DLQM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rt+Ro1nK30YnU7wHcb9ilLzpE9ad0f1g+OOuzrDxAT0ivHJJ9XLkUPlTjJ6NhRgZT MVjYRmbMUblQqYLm1F+dwRe4OBggWe12Hl9rbGUCl5GraA174Wq4Y8AlUX3vMKQ1WI nct17Jg8lXarjGRDs5YZtgLw7+e9BOojcfg35bDw= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20181016145645eucas1p2d10b2a128ad1fd7355455a01ad911283~eHqJ5UH-02490024900eucas1p2v; Tue, 16 Oct 2018 14:56:45 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id AF.21.04806.D2CF5CB5; Tue, 16 Oct 2018 15:56:45 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20181016145644eucas1p2a75a10af4c741ded4836ddd9648a7289~eHqJJ1u9K2490024900eucas1p2u; Tue, 16 Oct 2018 14:56:44 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20181016145644eusmtrp2056e60e106e6f1fc03a3d3120403e60c~eHqI6_bK53061930619eusmtrp2S; Tue, 16 Oct 2018 14:56:44 +0000 (GMT) X-AuditID: cbfec7f5-34dff700000012c6-83-5bc5fc2dafa2 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id BC.AA.04128.C2CF5CB5; Tue, 16 Oct 2018 15:56:44 +0100 (BST) Received: from AMDC3778.DIGITAL.local (unknown [106.120.51.20]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20181016145644eusmtip275014cbca284398fecf10f9fc73af1c2~eHqIbDhp72763027630eusmtip22; Tue, 16 Oct 2018 14:56:44 +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 04/11] Doc: thermal: new irq-mode for trip point Date: Tue, 16 Oct 2018 16:56:15 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1539701782-26852-1-git-send-email-l.luba@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSa0gUURTHuTM7s+Pi1DRandQ0FnoJbUVBQ2qpFE3UB78V+cHWHFZJ19pR ywqSynfJamA+clfbrdVFFHURNTXzkUj4DqvtnRKlFdgaKejarrPWt9/5nXPu/3K5FM7WEX5U gjZF0GnViUpSIWt+tjC8a9diX/Sej1X+XENJPcFNdWUjzuDYzBl7hwjO+GKC4OwZAVzjpAuq sswybrztPsk57vQi7uHLUYzL7OiVc1OfCshwmq811CK+teydnDe1f8P4Rmsuy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YySvS0f2CCSIhJTNq3nR3CFpb4 c62LDaLoE6PE4WNLgBIcHGwCehI7VhWCxEUE5jNKHN10GayIWeAyo0T3tD1g3cICDhL7P74C s1kEVCV+rFnHCmLzCnhJLPy7nQ1ig5zEzXOdzCA2p4C3xK0bC5hBFggB1VxczDiBkW8BI8Mq RpHU0uLc9NxiI73ixNzi0rx0veT83E2MwOjYduznlh2MXe+CDzEKcDAq8fD+uH4kWog1say4 MvcQowQHs5IIb/qlo9FCvCmJlVWpRfnxRaU5qcWHGE2BbprILCWanA+M3LySeENTQ3MLS0Nz Y3NjMwslcd7zBpVRQgLpiSWp2ampBalFMH1MHJxSDYx7Ynq0LHs4FqolcUvNe5dyTVN/0UPt K8v3hd/M2JBrb/xEbId+ibVux7INKtcrLoXKmV7zuy6geVzjYrlg7vc3Ns6n6pX54jkf8i9M uee0xu70agPZJXevvXX/KbFs25mW68uaztsw9V4/OfFC7n1BxTnunqmzhZ+q3d7KGWyxK2gG s0iwC7cSS3FGoqEWc1FxIgBo3GSWpAIAAA== Message-Id: <20181016145644eucas1p2a75a10af4c741ded4836ddd9648a7289~eHqJJ1u9K2490024900eucas1p2u@eucas1p2.samsung.com> X-CMS-MailID: 20181016145644eucas1p2a75a10af4c741ded4836ddd9648a7289 X-Msg-Generator: CA X-RootMTR: 20181016145644eucas1p2a75a10af4c741ded4836ddd9648a7289 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181016145644eucas1p2a75a10af4c741ded4836ddd9648a7289 References: <1539701782-26852-1-git-send-email-l.luba@partner.samsung.com> 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 Thermal trip point gets new flag in DT: irq-mode. Trip point may have a new explicit flag which indicate irq support when the temperature is met (so the thermal framework deos not need set polling for it). It is useful for 'passive' cooling trip point, which now will not be register for polling the temperature. Update documentation about irq-mode for trip points. The new sysfs file shows 1 if the trip point supports irq. Cc: Jonathan Corbet Cc: Zhang Rui Cc: linux-doc@vger.kernel.org Signed-off-by: Lukasz Luba --- Documentation/thermal/sysfs-api.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt index 9113997..e405724 100644 --- a/Documentation/thermal/sysfs-api.txt +++ b/Documentation/thermal/sysfs-api.txt @@ -272,6 +272,7 @@ Thermal zone device sys I/F, created once it's registered: |---trip_point_[0-*]_temp: Trip point temperature |---trip_point_[0-*]_type: Trip point type |---trip_point_[0-*]_hyst: Hysteresis value for this trip point + |---trip_point_[0-*]_irq: Trip point supports triggering irq |---emul_temp: Emulated temperature set node |---sustainable_power: Sustainable dissipatable power |---k_po: Proportional term during temperature overshoot @@ -365,6 +366,10 @@ trip_point_[0-*]_type thermal zone. RO, Optional +trip_point_[0-*]_irq + Boolean which indicate that the trip point triggers irq. + RO, Optional + trip_point_[0-*]_hyst The hysteresis value for a trip point, represented as an integer Unit: Celsius @@ -544,12 +549,16 @@ method, the sys I/F structure will be built like this: |---available_policies: step_wise fair_share |---trip_point_0_temp: 100000 |---trip_point_0_type: critical + |---trip_point_0_irq: 1 |---trip_point_1_temp: 80000 |---trip_point_1_type: passive + |---trip_point_1_irq: 1 |---trip_point_2_temp: 70000 |---trip_point_2_type: active0 + |---trip_point_2_irq: 0 |---trip_point_3_temp: 60000 |---trip_point_3_type: active1 + |---trip_point_3_irq: 1 |---cdev0: --->/sys/class/thermal/cooling_device0 |---cdev0_trip_point: 1 /* cdev0 can be used for passive */ |---cdev0_weight: 1024 From patchwork Tue Oct 16 14:56:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Luba X-Patchwork-Id: 10643723 X-Patchwork-Delegate: rui.zhang@intel.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 5337613AD for ; Tue, 16 Oct 2018 14:56:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 407D229EFF for ; Tue, 16 Oct 2018 14:56:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 34A6E2A0C9; Tue, 16 Oct 2018 14:56:52 +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 C6F7629F04 for ; Tue, 16 Oct 2018 14:56:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727215AbeJPWrj (ORCPT ); Tue, 16 Oct 2018 18:47:39 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:39273 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727197AbeJPWri (ORCPT ); Tue, 16 Oct 2018 18:47:38 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20181016145648euoutp02d266a5846082109c5c75c3d022226085~eHqL_ky1c0360503605euoutp02- for ; Tue, 16 Oct 2018 14:56:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181016145648euoutp02d266a5846082109c5c75c3d022226085~eHqL_ky1c0360503605euoutp02- DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1539701808; bh=BOkOCpgojR0VWlfu6jpqdT41Y6S6YdmRemCFrIlC7U0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gSRawi0ProiH4rEIdcGdP8F27v1XMquMx/yCh/K8oEijCuEVq2ncziQvhtJ2MxOO6 BlSxQcMaxFkxWzLHJ34Gp7Vfj2uEjcNbg8/aJFS4kLs29dksriy6o0gClVPsfWvKHf rm1Ji2L1JqDmujlEvzTAnSknIivo5WPZ20TyjRmE= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20181016145647eucas1p29516ccf330c223a9e3e0da7c0db72f0c~eHqLHNCJ42490424904eucas1p20; Tue, 16 Oct 2018 14:56:47 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 55.C2.04441.E2CF5CB5; Tue, 16 Oct 2018 15:56:46 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20181016145646eucas1p1bd4607c80258df10777ed111cf889fbc~eHqKU_F8K2225422254eucas1p1r; Tue, 16 Oct 2018 14:56:46 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20181016145645eusmtrp291620498e8b72aa9116c2ef8e4093fff~eHqKGFXy33061930619eusmtrp2U; Tue, 16 Oct 2018 14:56:45 +0000 (GMT) X-AuditID: cbfec7f2-5c9ff70000001159-cc-5bc5fc2e30f7 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 1E.AA.04128.D2CF5CB5; Tue, 16 Oct 2018 15:56:45 +0100 (BST) Received: from AMDC3778.DIGITAL.local (unknown [106.120.51.20]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20181016145645eusmtip238f12a9a5ecdce31860e26142dd6e19b~eHqJkEmd72715427154eusmtip2U; Tue, 16 Oct 2018 14:56:45 +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 05/11] Doc: DT: thermal: new irq-mode for trip point Date: Tue, 16 Oct 2018 16:56:16 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1539701782-26852-1-git-send-email-l.luba@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSe0hTYRjG+3a2s+NwepqaL2YKo6KyZkLQkUyK/OOQBEGElHSZebyQzrmj phY6gryhy7LUVKYySx2KeEXFInUm4i0vqa0izZkZZeC8pZl52qz/fu/leZ6Pj5fAJNUCFyJc EcOoFPIIKS7iN736OXBE9qsr8Khx0IOqza8RUKaXqYjSmvdQxYYBAVU8OiagjGpXqm56C0pT yvjUSGsRTpmzDIh6Oj7Eo+49Nwgp05QGPyWmq7RViG4p+CCkdW1zPLpOn47T78facLq+LJnW aXIEdPt8G4/WNOgRba5zOy+6LPIJZiLC4xiVp+91UVilbhBTFtnHL81Hq9Ej2wxkQwB5DN50 ZeEZSERIyAoE0/f7hJZiEcFy4ZK1MCPoW//M25asDWj5lkE5gtnaH/g/yebsDMpABIGTMmjW R3N9R7IQgfmF7q8VRvYgMJY38bglB9IPVrMVnCuf3AcbG53WBDd4O5COcWxD+oNxogTjtEC2 CiFLvyHkBmIyDjZyJ6wCP3iX+cnKDvC1u0FoYVfYbCm29lnoT9PjFr4DqT3N1p0T0Nk9JODe g5EHoabVk0MgT0Pj+jkL2sHE953cMraFD5vyMEtbDGkpEovHAWjIfG3N2QXlVblWbxo0i5uY 5Xe0CMZqhgTZyL3gf1YJQnrkzMSykaEM66VgbslYeSQbqwiV3YiKrENbR9T7u3uhGS0NB3Ug kkBSW/HquCFQIpDHsQmR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/qmYGvD27vsz7qoW8kKn2nNf8Ky4X9ifuq99j6fRFKeXA5lYnJff6rXN0qzicWs56Ubkj1 zzpyQYmlOCPRUIu5qDgRAOro82yhAgAA Message-Id: <20181016145646eucas1p1bd4607c80258df10777ed111cf889fbc~eHqKU_F8K2225422254eucas1p1r@eucas1p1.samsung.com> X-CMS-MailID: 20181016145646eucas1p1bd4607c80258df10777ed111cf889fbc X-Msg-Generator: CA X-RootMTR: 20181016145646eucas1p1bd4607c80258df10777ed111cf889fbc X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181016145646eucas1p1bd4607c80258df10777ed111cf889fbc References: <1539701782-26852-1-git-send-email-l.luba@partner.samsung.com> 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 Thermal trip point gets new flag in DT: irq-mode. Trip point may have a new explicit flag which indicate irq support when the temperature is met (so the thermal framework deos not need set polling for it). It is useful for 'passive' cooling trip point, which now will not register for polling the temperature. Update documentation about irq-mode for trip points. Cc: Zhang Rui Cc: Eduardo Valentin Cc: Daniel Lezcano Cc: Rob Herring Cc: Mark Rutland Cc: devicetree@vger.kernel.org Signed-off-by: Lukasz Luba --- Documentation/devicetree/bindings/thermal/thermal.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/thermal/thermal.txt b/Documentation/devicetree/bindings/thermal/thermal.txt index eb7ee91..c98a355 100644 --- a/Documentation/devicetree/bindings/thermal/thermal.txt +++ b/Documentation/devicetree/bindings/thermal/thermal.txt @@ -90,6 +90,10 @@ Required properties: "critical": Hardware not reliable. Type: string +- irq-mode: A flag indicating that trip rises irq, so there is no + Type: bool need of polling in thermal framework. + Size: one cell + * Cooling device maps The cooling device maps node is a node to describe how cooling devices @@ -256,16 +260,19 @@ thermal-zones { temperature = <90000>; /* millicelsius */ hysteresis = <2000>; /* millicelsius */ type = "active"; + irq-mode; }; cpu_alert1: cpu-alert1 { temperature = <100000>; /* millicelsius */ hysteresis = <2000>; /* millicelsius */ type = "passive"; + irq-mode; }; cpu_crit: cpu-crit { temperature = <125000>; /* millicelsius */ hysteresis = <2000>; /* millicelsius */ type = "critical"; + irq-mode; }; }; From patchwork Tue Oct 16 14:56:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Luba X-Patchwork-Id: 10643735 X-Patchwork-Delegate: rui.zhang@intel.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 2CF5413AD for ; Tue, 16 Oct 2018 14:57:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1950129119 for ; Tue, 16 Oct 2018 14:57:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D2BF29EFF; Tue, 16 Oct 2018 14:57:34 +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 56E9F29119 for ; Tue, 16 Oct 2018 14:57:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727338AbeJPWrk (ORCPT ); Tue, 16 Oct 2018 18:47:40 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:39274 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727242AbeJPWrj (ORCPT ); Tue, 16 Oct 2018 18:47:39 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20181016145649euoutp025ef149632476765a6ac6780481e7bba9~eHqNR6MUl0414504145euoutp02o for ; Tue, 16 Oct 2018 14:56:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181016145649euoutp025ef149632476765a6ac6780481e7bba9~eHqNR6MUl0414504145euoutp02o DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1539701809; bh=L5Sb/ZLzlpOiDv5hLen/XRBTb288danQReW3wRWro1o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pYRMY15YGUrGnDTwKJ1aZUiYrEyGHxksJ51GBm4dQEsUjnTx1iYuATO2PhNuTdPiO kvsWUbBctlqLK4NJ1F5rVfC3Xn4vQioOU5Jz4LbhdluynxJHu7SDniKH5IhefKPbNn MdKe4xKC7BqHd82HWwt9uxPV1MT7bCXLKjpwRMYE= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20181016145648eucas1p297686e627a910be675b7512fe654b96a~eHqMhkdIX0770807708eucas1p23; Tue, 16 Oct 2018 14:56:48 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 86.C2.04441.03CF5CB5; Tue, 16 Oct 2018 15:56:48 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20181016145647eucas1p206c068806214535da339588d77cbdfa5~eHqLYh2dR2135021350eucas1p2K; Tue, 16 Oct 2018 14:56:47 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20181016145647eusmtrp21dffceae8154169cfb7895d936ec1442~eHqLJnVPb3061930619eusmtrp2W; Tue, 16 Oct 2018 14:56:47 +0000 (GMT) X-AuditID: cbfec7f2-5e3ff70000001159-cf-5bc5fc30908e Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 9F.AA.04128.E2CF5CB5; Tue, 16 Oct 2018 15:56:47 +0100 (BST) Received: from AMDC3778.DIGITAL.local (unknown [106.120.51.20]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20181016145646eusmtip23755d3b877dda4c4502ba9ebc737f7d3~eHqKhgvCj2834528345eusmtip2F; Tue, 16 Oct 2018 14:56:46 +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 , Kukjin Kim , Krzysztof Kozlowski Subject: [PATCH 06/11] DT: arm64: exynos: add support for thermal trip irq-mode Date: Tue, 16 Oct 2018 16:56:17 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1539701782-26852-1-git-send-email-l.luba@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSa0hTYRjHec/ZuThcvq2LT1ZGq6AiLaMPB7QwMDqQVEJfSiGnHbTy1k5a dsGVmJfWyowUK52YGcMwLzmTqTWndrF5KZZd7LZRmSXoCjSk8nRmffs//+f5Pf+Hl5cl1c1U ALs/5bCgS9EmaWiloqlr0hG0bqozet2jDj+urqSW4tz3chFX5lnMldsdFFf+zElx510jJNfb e5vhXuoXcfWuaavizHUF97TlKs15ztkRV/W8n+ByWu0M535vpMP9+JqyGsTfLR1i+ErrMMHX m/Np/rXTSvMN17P4SmMRxd8ftRK8sdGMeE994E7lHmXYPiFpf4agW7spVpnoar9EpznDj+pd dqRH/cEFyIcFvA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B4iIC8xkljm66DFbELDCXSWJl w3ImkG5hAX+JzS9vsYE0sAioSvQ1SoGEeQW8JFZ+Xwm1QE7i5rlOZhCbU8Bb4taNBcwg5UJA NRcXM05g5FvAyLCKUSS1tDg3PbfYSK84Mbe4NC9dLzk/dxMjMFq2Hfu5ZQdj17vgQ4wCHIxK PLw/rh+JFmJNLCuuzD3EKMHBrCTCm37paLQQb0piZVVqUX58UWlOavEhRlOgkyYyS4km5wMj Oa8k3tDU0NzC0tDc2NzYzEJJnPe8QWWUkEB6YklqdmpqQWoRTB8TB6dUA+M0r6xD/aubujX3 zPH6GduxmCX6s/rHryVN+d5KU9ev2pr80pTzje/kAOnM+U0Hg9f9FQ8sVFnR8fV0aJLS2jnK ylfecLNfebX8roCzHKenmr7gBnGTvxNZmzl35G73jPt6QixeiuHZxK73VcK8XipPppo9ebpv X/aSaM8cqZbvk0V2qqx73KzEUpyRaKjFXFScCAAoqjGUrAIAAA== Message-Id: <20181016145647eucas1p206c068806214535da339588d77cbdfa5~eHqLYh2dR2135021350eucas1p2K@eucas1p2.samsung.com> X-CMS-MailID: 20181016145647eucas1p206c068806214535da339588d77cbdfa5 X-Msg-Generator: CA X-RootMTR: 20181016145647eucas1p206c068806214535da339588d77cbdfa5 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181016145647eucas1p206c068806214535da339588d77cbdfa5 References: <1539701782-26852-1-git-send-email-l.luba@partner.samsung.com> 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 This patch adds support for new flash which indicates that trip point triggers irq when temperature is met. Exynos5433 supports 8 trip point which will trigger irq. Above that number other trip points should be registered without 'irq-mode' flag. That will force the thermal framework to start polling the temperature sensor under configured conditions and handle the trip point. Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Lukasz Luba --- arch/arm64/boot/dts/exynos/exynos5433-tmu.dtsi | 105 ++++++++++++++++--------- 1 file changed, 70 insertions(+), 35 deletions(-) diff --git a/arch/arm64/boot/dts/exynos/exynos5433-tmu.dtsi b/arch/arm64/boot/dts/exynos/exynos5433-tmu.dtsi index fe3a0b1..c4330f6 100644 --- a/arch/arm64/boot/dts/exynos/exynos5433-tmu.dtsi +++ b/arch/arm64/boot/dts/exynos/exynos5433-tmu.dtsi @@ -17,37 +17,44 @@ thermal-zones { atlas0_alert_0: atlas0-alert-0 { temperature = <65000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; atlas0_alert_1: atlas0-alert-1 { temperature = <70000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; atlas0_alert_2: atlas0-alert-2 { temperature = <75000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; atlas0_alert_3: atlas0-alert-3 { temperature = <80000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; atlas0_alert_4: atlas0-alert-4 { temperature = <85000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; atlas0_alert_5: atlas0-alert-5 { temperature = <90000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; atlas0_alert_6: atlas0-alert-6 { temperature = <95000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; }; @@ -98,37 +105,44 @@ thermal-zones { atlas1_alert_0: atlas1-alert-0 { temperature = <65000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; atlas1_alert_1: atlas1-alert-1 { temperature = <70000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; atlas1_alert_2: atlas1-alert-2 { temperature = <75000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; atlas1_alert_3: atlas1-alert-3 { temperature = <80000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; atlas1_alert_4: atlas1-alert-4 { temperature = <85000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; atlas1_alert_5: atlas1-alert-5 { temperature = <90000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; atlas1_alert_6: atlas1-alert-6 { temperature = <95000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; }; }; @@ -141,37 +155,44 @@ thermal-zones { g3d_alert_0: g3d-alert-0 { temperature = <70000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; g3d_alert_1: g3d-alert-1 { temperature = <75000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; g3d_alert_2: g3d-alert-2 { temperature = <80000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; g3d_alert_3: g3d-alert-3 { temperature = <85000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; g3d_alert_4: g3d-alert-4 { temperature = <90000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; g3d_alert_5: g3d-alert-5 { temperature = <95000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; g3d_alert_6: g3d-alert-6 { temperature = <100000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; }; }; @@ -184,37 +205,44 @@ thermal-zones { apollo_alert_0: apollo-alert-0 { temperature = <65000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; apollo_alert_1: apollo-alert-1 { temperature = <70000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; apollo_alert_2: apollo-alert-2 { temperature = <75000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; apollo_alert_3: apollo-alert-3 { temperature = <80000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; apollo_alert_4: apollo-alert-4 { temperature = <85000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; apollo_alert_5: apollo-alert-5 { temperature = <90000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; apollo_alert_6: apollo-alert-6 { temperature = <95000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; }; @@ -255,37 +283,44 @@ thermal-zones { isp_alert_0: isp-alert-0 { temperature = <80000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; isp_alert_1: isp-alert-1 { temperature = <85000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; isp_alert_2: isp-alert-2 { temperature = <90000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; isp_alert_3: isp-alert-3 { temperature = <95000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; isp_alert_4: isp-alert-4 { temperature = <100000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; isp_alert_5: isp-alert-5 { temperature = <105000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; isp_alert_6: isp-alert-6 { temperature = <110000>; /* millicelsius */ hysteresis = <1000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; }; }; From patchwork Tue Oct 16 14:56:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Luba X-Patchwork-Id: 10643733 X-Patchwork-Delegate: rui.zhang@intel.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 83A6A13AD for ; Tue, 16 Oct 2018 14:57:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 70F3429119 for ; Tue, 16 Oct 2018 14:57:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 64EB629EFF; Tue, 16 Oct 2018 14:57:32 +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 44BA029119 for ; Tue, 16 Oct 2018 14:57:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727061AbeJPWrl (ORCPT ); Tue, 16 Oct 2018 18:47:41 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:57203 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727242AbeJPWrl (ORCPT ); Tue, 16 Oct 2018 18:47:41 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20181016145650euoutp01c28410cfcea9a1a09d4ee1f2e771277a~eHqOdNDbd0574905749euoutp01D for ; Tue, 16 Oct 2018 14:56:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20181016145650euoutp01c28410cfcea9a1a09d4ee1f2e771277a~eHqOdNDbd0574905749euoutp01D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1539701810; bh=jg7rb3XNh+fTjaJXSjAFMxa0KmfItCcYC/IdO2jxbJ4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hDa0FhZVPjAaIZnaG8mkF4bQisX9TTDMJetmcjSVskysE2JWP4avFukvsIpWyxxPl Fq9d0SheoaE5OQlS33j/4Bq5hAp1+B/05dTIndtuG+DiStP2EGFFlb3kY7DjAtap8q wTHpZNlIfn17xz8MHkom6iY6FgbtyxvcuN5br2Kg= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20181016145649eucas1p29698529ae8a7276dc10b5895f8a6e277~eHqNpUFoa0771607716eucas1p28; Tue, 16 Oct 2018 14:56:49 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id C9.C2.04441.13CF5CB5; Tue, 16 Oct 2018 15:56:49 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20181016145648eucas1p275ad5f845a04e40e5b9d0bbea624f34a~eHqM4Yhz82489624896eucas1p25; Tue, 16 Oct 2018 14:56:48 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20181016145648eusmtrp2cb8887df6ae686cb254f92c921622252~eHqMpGoOS3061930619eusmtrp2Z; Tue, 16 Oct 2018 14:56:48 +0000 (GMT) X-AuditID: cbfec7f2-5e3ff70000001159-d5-5bc5fc310c88 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 01.BA.04128.03CF5CB5; Tue, 16 Oct 2018 15:56:48 +0100 (BST) Received: from AMDC3778.DIGITAL.local (unknown [106.120.51.20]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20181016145647eusmtip2e1866afa6b261e9062fb6e64152f8bd5~eHqL6ygI22715427154eusmtip2W; Tue, 16 Oct 2018 14:56:47 +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 , Kukjin Kim , Krzysztof Kozlowski Subject: [PATCH 07/11] DT: arm64: exynos7: add support for thermal trip irq-mode Date: Tue, 16 Oct 2018 16:56:18 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1539701782-26852-1-git-send-email-l.luba@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSa0hTYRjHec/ZOTtOl8cp7cVbNIhupK2CDmil0IeTUZgUUftQKw9ectN2 vGQEGXjPlppmaE1LU1vSdJpNMavlFMu7ppuXKLTARBOXZpDZ5pn17fc87///fx4eXgIVGTBP IkoZz6iU8hgJLuA1tv/q2SX9bZLtnu72oeru6TBq6nUGoDRWH6q0rQejSoeGMer25AxK9fbW 8qnRFG9KP2lrPUyv4FGDzfdxynqrDVCPR/oRKu1lG5+a+qzGg1zpGk0NoJuKJ/h0ecs0Quu1 WTg9PtyC0/UV1+ly9R2MfjPXgtDqBi2grXrfUMFZQWA4ExOVyKj8D54XROomK5E4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CWeN78Fcjg42AT0JHasKgSJiwjMZ5Q4uukyWBGzwFwmiZUN y5lAuoUFAiRe7PjNBmKzCKhK9HzYwgTSzCvgJdHbbgqxQE7i5rlOsMWcAt4St24sYAYpEQIq ubiYcQIj3wJGhlWMIqmlxbnpucVGesWJucWleel6yfm5mxiB8bLt2M8tOxi73gUfYhTgYFTi 4f1x/Ui0EGtiWXFl7iFGCQ5mJRHe9EtHo4V4UxIrq1KL8uOLSnNSiw8xmgKdNJFZSjQ5HxjL eSXxhqaG5haWhubG5sZmFkrivOcNKqOEBNITS1KzU1MLUotg+pg4OKUaGMudshSq4ha7bVH/ fFkj87xm86KeEw9Sao0iNHi9nKRC077yzZcN5DOQciq5Epv71P508Y2JU4RDD23UK7ksKlTb vrDg29kcORebo9P2uO4pqJBiWLll1cQF66R0Vdbv5zJbxce+Yiq/RGRA6qzCxF8GFp2ca75P ZvrwLjWN41KDz528FZ6WSizFGYmGWsxFxYkAXpkFOa0CAAA= Message-Id: <20181016145648eucas1p275ad5f845a04e40e5b9d0bbea624f34a~eHqM4Yhz82489624896eucas1p25@eucas1p2.samsung.com> X-CMS-MailID: 20181016145648eucas1p275ad5f845a04e40e5b9d0bbea624f34a X-Msg-Generator: CA X-RootMTR: 20181016145648eucas1p275ad5f845a04e40e5b9d0bbea624f34a X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181016145648eucas1p275ad5f845a04e40e5b9d0bbea624f34a References: <1539701782-26852-1-git-send-email-l.luba@partner.samsung.com> 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 This patch adds support for new flash which indicates that trip point triggers irq when temperature is met. Exynos5433 supports 8 trip point which will trigger irq. Above that number other trip points should be registered without 'irq-mode' flag. That will force the thermal framework to start polling the temperature sensor under configured conditions and handle the trip point. Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Lukasz Luba --- arch/arm64/boot/dts/exynos/exynos7-trip-points.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/exynos7-trip-points.dtsi b/arch/arm64/boot/dts/exynos/exynos7-trip-points.dtsi index d3301b8..39185af 100644 --- a/arch/arm64/boot/dts/exynos/exynos7-trip-points.dtsi +++ b/arch/arm64/boot/dts/exynos/exynos7-trip-points.dtsi @@ -11,40 +11,48 @@ trips { temperature = <75000>; /* millicelsius */ hysteresis = <10000>; /* millicelsius */ type = "passive"; + irq-mode; }; cpu-alert-1 { temperature = <80000>; /* millicelsius */ hysteresis = <10000>; /* millicelsius */ type = "passive"; + irq-mode; }; cpu-alert-2 { temperature = <85000>; /* millicelsius */ hysteresis = <10000>; /* millicelsius */ type = "passive"; + irq-mode; }; cpu-alert-3 { temperature = <90000>; /* millicelsius */ hysteresis = <10000>; /* millicelsius */ type = "passive"; + irq-mode; }; cpu-alert-4 { temperature = <95000>; /* millicelsius */ hysteresis = <10000>; /* millicelsius */ type = "passive"; + irq-mode; }; cpu-alert-5 { temperature = <100000>; /* millicelsius */ hysteresis = <10000>; /* millicelsius */ type = "passive"; + irq-mode; }; cpu-alert-6 { temperature = <110000>; /* millicelsius */ hysteresis = <10000>; /* millicelsius */ type = "passive"; + irq-mode; }; cpu-crit-0 { temperature = <115000>; /* millicelsius */ hysteresis = <0>; /* millicelsius */ type = "critical"; + irq-mode; }; }; From patchwork Tue Oct 16 14:56:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Luba X-Patchwork-Id: 10643731 X-Patchwork-Delegate: rui.zhang@intel.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 784C317D4 for ; Tue, 16 Oct 2018 14:57:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 64D2F29119 for ; Tue, 16 Oct 2018 14:57:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 58BF629EFF; Tue, 16 Oct 2018 14:57:26 +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 CCEF129119 for ; Tue, 16 Oct 2018 14:57:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727051AbeJPWsN (ORCPT ); Tue, 16 Oct 2018 18:48:13 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:57225 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727213AbeJPWrm (ORCPT ); Tue, 16 Oct 2018 18:47:42 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20181016145652euoutp01e9b56dfd2653f7beb18c81247ff29209~eHqPzlNkW0465204652euoutp01Y for ; Tue, 16 Oct 2018 14:56:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20181016145652euoutp01e9b56dfd2653f7beb18c81247ff29209~eHqPzlNkW0465204652euoutp01Y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1539701812; bh=y7MF9kAG/z4G8E42/Z3AEQeoUsGLouZid29J2XiBp+o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PFQ0Vjt0WhKD3sxtO4KCaWuOHhQd7eGmHMYtdUKThlXD4P3s6iWJqSZzTD+KnMn6k 4qlmusR5OQEUJi0LXWTlfN3BXydPM79N003enmtjFpf+yAbFRWheSVuBfQBVOBvV5L VwDrrvKAQCNng6qzUFl3bgMpW62x8H7S6V+Ur/l8= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181016145651eucas1p1d65fd75ab153f72c55aed77baf105318~eHqPHWgua2005420054eucas1p1g; Tue, 16 Oct 2018 14:56:51 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id B3.31.04806.23CF5CB5; Tue, 16 Oct 2018 15:56:51 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20181016145650eucas1p2330e8d680b70acffaea223a5a8c51ca0~eHqOSKKqJ2135421354eucas1p2J; Tue, 16 Oct 2018 14:56:50 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20181016145650eusmtrp264e52f5fdb23d28255e0c19e252e3dd6~eHqODLtlz3061930619eusmtrp2c; Tue, 16 Oct 2018 14:56:50 +0000 (GMT) X-AuditID: cbfec7f5-34dff700000012c6-95-5bc5fc326091 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 92.BA.04128.13CF5CB5; Tue, 16 Oct 2018 15:56:49 +0100 (BST) Received: from AMDC3778.DIGITAL.local (unknown [106.120.51.20]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20181016145649eusmtip2c629b262ada1726386114c335e522aa0~eHqNR6rL92834528345eusmtip2G; Tue, 16 Oct 2018 14:56:49 +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 , Kukjin Kim , Krzysztof Kozlowski Subject: [PATCH 08/11] DT: arm: exynos4: add support for thermal trip irq-mode Date: Tue, 16 Oct 2018 16:56:19 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1539701782-26852-1-git-send-email-l.luba@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0VSfSyUcRzv9zz3PPe4dXkc049U27U22iKj9mzJWP3xTLXpz7o/dPIMyx3d g7AW2nCMk2pe607JS5eSIzviEofKvEXI0AsuoVYdW+Yij+eq/z7fz8v389t3PwKVGDF3IloZ z6iU8hgpLhI0da/2H/SzdckOlS4hVH1xHUbNtmcBSmvdTenM/RilGxnFqPyZRZQaGHgipCbS PCjDzCZ1N/O+gBpuuY1T1jwzoCrHhhAqo80spGY/avAgR7pWWwvo5tIpIV3R+gWhDfpsnJ4c bcXphvupdIXmJka/+NaK0JpGPaCthj2honOigAgmJjqRUfkEnhdFLY8Exv0WJ90zO6SBDVEO cCAg6Q/nF6cEOUBESMgaANeaLfZhGcBb08UYP1gBfJjOKXxkoWJSyAvVANoW1MJ/kcXn35Ec QBA46Q2N+ksc70KWAWg1VWyZULIAgQXVFoxb5UyGwrmlMZzDAnI/NKebhHzFHviuPxvlsAN5 Ek6Ml6NcGJKvhfDZgG7LJCYTobrqMcYHTsCy6ULAY2e40NNoX+QBN5p1CI9Z2KfW4zy+ArNe Ge2eo7CzZwjjXo2SXrCuxYeng2HRShXO0ZDcAce/OnE0uglvNBWhPC2G6kwJ7/aEjbmD9iJX WF1baF9Ow7YbjxD+PtrNk65okOtgb+n/snIA9GAnk8AqIhnWT8lc9mblCjZBGel9IVZhAJv/ qXe9Z8UITLbwDkASQLpd/GvMLJNg8kQ2WdEBIIFKXcSRb7pkEn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xyTU8ufNNdFS2meLFwy653xZL8pTo6Ew4F/q5Q8X4sfe3/h1UTZQycnCp/6PvU7Dvk ctzoqFDR/qe/bk9NPqNzJ1QJaESioRZzUXEiANFOkrCrAgAA Message-Id: <20181016145650eucas1p2330e8d680b70acffaea223a5a8c51ca0~eHqOSKKqJ2135421354eucas1p2J@eucas1p2.samsung.com> X-CMS-MailID: 20181016145650eucas1p2330e8d680b70acffaea223a5a8c51ca0 X-Msg-Generator: CA X-RootMTR: 20181016145650eucas1p2330e8d680b70acffaea223a5a8c51ca0 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181016145650eucas1p2330e8d680b70acffaea223a5a8c51ca0 References: <1539701782-26852-1-git-send-email-l.luba@partner.samsung.com> 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 This patch adds support for new flash which indicates that trip point triggers irq when temperature is met. Exynos5433 supports 8 trip point which will trigger irq. Above that number other trip points should be registered without 'irq-mode' flag. That will force the thermal framework to start polling the temperature sensor under configured conditions and handle the trip point. Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Lukasz Luba --- arch/arm/boot/dts/exynos4-cpu-thermal.dtsi | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/exynos4-cpu-thermal.dtsi b/arch/arm/boot/dts/exynos4-cpu-thermal.dtsi index 021d9fc..5e07289 100644 --- a/arch/arm/boot/dts/exynos4-cpu-thermal.dtsi +++ b/arch/arm/boot/dts/exynos4-cpu-thermal.dtsi @@ -17,22 +17,26 @@ thermal-zones { cpu_alert0: cpu-alert-0 { temperature = <70000>; /* millicelsius */ hysteresis = <10000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; cpu_alert1: cpu-alert-1 { temperature = <95000>; /* millicelsius */ hysteresis = <10000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; cpu_alert2: cpu-alert-2 { temperature = <110000>; /* millicelsius */ hysteresis = <10000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; cpu_crit0: cpu-crit-0 { temperature = <120000>; /* millicelsius */ hysteresis = <0>; /* millicelsius */ type = "critical"; + irq-mode; }; }; cooling-maps { From patchwork Tue Oct 16 14:56:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Luba X-Patchwork-Id: 10643729 X-Patchwork-Delegate: rui.zhang@intel.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 10F8917D4 for ; Tue, 16 Oct 2018 14:57:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F328029119 for ; Tue, 16 Oct 2018 14:57:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E703E29EFF; Tue, 16 Oct 2018 14:57:21 +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 7536B29119 for ; Tue, 16 Oct 2018 14:57:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726978AbeJPWsJ (ORCPT ); Tue, 16 Oct 2018 18:48:09 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:57190 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727366AbeJPWro (ORCPT ); Tue, 16 Oct 2018 18:47:44 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20181016145653euoutp01f9494ea489944688d07a2b57ce201e6a~eHqQ2lk7a0465204652euoutp01a for ; Tue, 16 Oct 2018 14:56:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20181016145653euoutp01f9494ea489944688d07a2b57ce201e6a~eHqQ2lk7a0465204652euoutp01a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1539701813; bh=sHvMKeTOPG+IldA992rEfPKQzvL1CjPS6hXEKMWqtj4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SZxoLXbZNkoRKuKjLLN1SHLBw/NIMtt1e4TPSAyr6MKQqrlV++MEMUUJ3BHBvgARy Dbd7XPqf0ZIvQo4QT+GXSSP2NtI7AliEcosBTepf+32zd/aphHjIyntR8xp1/0PrRw K1HonN7d5JN3FtEaVb7qFjq/nC4rWJzDye7MRzVc= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181016145652eucas1p1f5c98ae5ecc067e98bc9b89b589a921c~eHqP_eE-t2005420054eucas1p1i; Tue, 16 Oct 2018 14:56:52 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id CB.C2.04441.33CF5CB5; Tue, 16 Oct 2018 15:56:52 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20181016145651eucas1p1ea84684e37e67b4161548e6cff489cb8~eHqPK-tM31616816168eucas1p1y; Tue, 16 Oct 2018 14:56:51 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20181016145651eusmtrp2d8d81cdd81f631cc5052e64ea3c7c49d~eHqO8C9Y93061930619eusmtrp2f; Tue, 16 Oct 2018 14:56:51 +0000 (GMT) X-AuditID: cbfec7f2-5c9ff70000001159-df-5bc5fc332a16 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id E3.BA.04128.33CF5CB5; Tue, 16 Oct 2018 15:56:51 +0100 (BST) Received: from AMDC3778.DIGITAL.local (unknown [106.120.51.20]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20181016145650eusmtip263aa579161d6829f17331a9a964d8113~eHqOYAYyj2834528345eusmtip2H; Tue, 16 Oct 2018 14:56:50 +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 , Kukjin Kim , Krzysztof Kozlowski Subject: [PATCH 09/11] DT: arm: exynos: add support for thermal trip irq-mode Date: Tue, 16 Oct 2018 16:56:20 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1539701782-26852-1-git-send-email-l.luba@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSa0hTYRjHeXd2zo7T1XGKvt5hEKXkTJI4kGlaHw5I6IcK0g+19DRFnbrj HUODvKIzM6yWqDV1MczLNFOxTJ1KmnNeUBtKiCZoadJKZ3TzdBZ9+z+/5/J/3ocXR8TPUXc8 QZFOKxWyJAkm5HeP7hv9g36MxJwoyiI7HrSh5NrrYkDWWbzIeoMRJevn5lGycvUjQk5NtQtI c4EnqV89QI+LGvnkbF8tRloqDIBsWpjmkYUvDQJybUWFnT1MtdS1AKpXvSygNP0bPEqvK8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Opi5OCQEDCR+H4ppIuRi0NIYCmjxP1165i6GDmB 4mISk/ZtZ4ewhSX+XOtigyj6xCix6v4kJpBmNgE9iR2rCkHiIgLzGSWObroMVsQsMJdJYmXD crBJwgK+EhtWfGAFsVkEVCXed7aATeUV8Ja4M/8/G8QGOYmb5zqZQWxOoPitGwuYQRYICXhJ XFzMOIGRbwEjwypGkdTS4tz03GIjveLE3OLSvHS95PzcTYzAaNl27OeWHYxd74IPMQpwMCrx 8P64fiRaiDWxrLgy9xCjBAezkghv+qWj0UK8KYmVValF+fFFpTmpxYcYTYFumsgsJZqcD4zk vJJ4Q1NDcwtLQ3Njc2MzCyVx3vMGlVFCAumJJanZqakFqUUwfUwcnFINjOEv/JO68gQ2K/tZ iTE++HNRyuLvz1dbKmzn2rAtnqMva9Ummn8tnmuR4ZrmCDvHlr60jILbR64IbOmxPuJe7DzX gHnuqevsQoeYHPbo73c6fodr6eKp+7LiNM4428i5/y6MU2fbbdPJcXnD/Ndl/qom9ZrcGwt/ Obw6sqVWOiyOVfFo+lYRJZbijERDLeai4kQAgcsleqwCAAA= Message-Id: <20181016145651eucas1p1ea84684e37e67b4161548e6cff489cb8~eHqPK-tM31616816168eucas1p1y@eucas1p1.samsung.com> X-CMS-MailID: 20181016145651eucas1p1ea84684e37e67b4161548e6cff489cb8 X-Msg-Generator: CA X-RootMTR: 20181016145651eucas1p1ea84684e37e67b4161548e6cff489cb8 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181016145651eucas1p1ea84684e37e67b4161548e6cff489cb8 References: <1539701782-26852-1-git-send-email-l.luba@partner.samsung.com> 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 This patch adds support for new flash which indicates that trip point triggers irq when temperature is met. Exynos5433 supports 8 trip point which will trigger irq. Above that number other trip points should be registered without 'irq-mode' flag. That will force the thermal framework to start polling the temperature sensor under configured conditions and handle the trip point. Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Lukasz Luba --- arch/arm/boot/dts/exynos5420-trip-points.dtsi | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/exynos5420-trip-points.dtsi b/arch/arm/boot/dts/exynos5420-trip-points.dtsi index a67a3807..9e16970 100644 --- a/arch/arm/boot/dts/exynos5420-trip-points.dtsi +++ b/arch/arm/boot/dts/exynos5420-trip-points.dtsi @@ -11,21 +11,25 @@ trips { cpu-alert-0 { temperature = <85000>; /* millicelsius */ hysteresis = <10000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; cpu-alert-1 { temperature = <103000>; /* millicelsius */ hysteresis = <10000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; cpu-alert-2 { temperature = <110000>; /* millicelsius */ hysteresis = <10000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; cpu-crit-0 { temperature = <120000>; /* millicelsius */ hysteresis = <0>; /* millicelsius */ type = "critical"; + irq-mode; }; }; From patchwork Tue Oct 16 14:56:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Luba X-Patchwork-Id: 10643727 X-Patchwork-Delegate: rui.zhang@intel.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 159F913AD for ; Tue, 16 Oct 2018 14:57:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 01A3429119 for ; Tue, 16 Oct 2018 14:57:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E980329F2A; Tue, 16 Oct 2018 14:57:10 +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 6FFEC291DF for ; Tue, 16 Oct 2018 14:57:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727464AbeJPWrp (ORCPT ); Tue, 16 Oct 2018 18:47:45 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:39371 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727368AbeJPWrp (ORCPT ); Tue, 16 Oct 2018 18:47:45 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20181016145654euoutp02e5787624232cde41476fb8fedf09a892~eHqSIr0nx0469104691euoutp02M for ; Tue, 16 Oct 2018 14:56:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181016145654euoutp02e5787624232cde41476fb8fedf09a892~eHqSIr0nx0469104691euoutp02M DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1539701814; bh=U2hOpge9VBmw0XxT1DkaNEnI2no8yszC5mdL/pwknms=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WUZz3JwtzMdxBIuOMWcvT6VaDCkwaPaTpx8lMxG2gtopReyK29jYdIpgmcASE6ysd X6pI9IrSCQt6cFFZIQ8Q0TjQETPH/KtUsMvgEhOWmHkkIwPP89DRLZrG0l71+xcg6S AW/GBn64uKk7p1NUxmp/7PAe/yU99uyRpRdoVn00= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20181016145653eucas1p2cdd545dbf80ded7f565759167f084f43~eHqQ-S_vk2134621346eucas1p2_; Tue, 16 Oct 2018 14:56:53 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 50.70.04294.53CF5CB5; Tue, 16 Oct 2018 15:56:53 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20181016145652eucas1p2939c6aa628ba099c9609a8cbc17db1a4~eHqQRcy8z2133821338eucas1p2W; Tue, 16 Oct 2018 14:56:52 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20181016145652eusmtrp257236b9fc92a96606b332ab925f474d0~eHqP-x5Gf3061930619eusmtrp2h; Tue, 16 Oct 2018 14:56:52 +0000 (GMT) X-AuditID: cbfec7f4-84fff700000010c6-e9-5bc5fc359087 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 26.BA.04128.43CF5CB5; Tue, 16 Oct 2018 15:56:52 +0100 (BST) Received: from AMDC3778.DIGITAL.local (unknown [106.120.51.20]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20181016145651eusmtip2d94a58a1b23656f33f3e06b734c11ab2~eHqPazsgO2834828348eusmtip2E; Tue, 16 Oct 2018 14:56:51 +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 , Kukjin Kim , Krzysztof Kozlowski Subject: [PATCH 10/11] DT: arm: exynos: add support for thermal trip irq-mode Date: Tue, 16 Oct 2018 16:56:21 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1539701782-26852-1-git-send-email-l.luba@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA01Sa0hTYRju29m5OJwdp+SLqdEiqUAtMTpgZVLhgX5k/0IpXXmY4jZrR60k aFnehmkrynDlDC1tTMo5TGWazalZqa2LmTeQIsjo5grKLubxTOrfc3mf93n5+ChM0YGHUlm6 XE6vU2mUhEza2vdjOGrzr97Ujddu4Uzzlds486a7BDE13nDG4h7CGcvzEZypfP0eY4aH75DM mCGMsb9ekK4X10uZZx1XCcZ7zo2YGy89Eqao000yb6YriB3LWVuNDbHt1ZMkW+d8J2Ht1jKC nRhxEmxL/Sm2ruIizt7/6JSwFQ4rYr32iGRZimxrBqfJyuf0MdvTZZlN9ib8yOiq4+7KWdKA bCuMyI8COg7aWr4RRiSjFHQjgp5yk0QkXxEUto74iBdB0+NSyVKk0zKNiUYDgjlT4X+RLgNu RBRF0NHQZj0q6MG0GYG3q44UCEabJGBqeIsLq4LovTBfWoYELKXXwp05KyFWRMCroTJMwH70 HhgbrV2sA3qIhM+WRqlgyOl8OGOuwsXALmicPY1EHAQz/Q5SxGEw327x3c3DYOlSwUkoGWjz zcRDT79n8WqMXg+3O2JEORHcnzyEIAMdAKMfAgUZW4AXWqswUZZDabFCnF4HjvInvqIV0GC7 7FvOgmn8LC6+Tw0C15iLOI9WVf8rq0XIikK4PF6r5vhYHXcsmldp+TydOvpwjtaOFn7Uoz/9 X9tQx69DLkRTSOkv//7SnarAVfn8Ca0LAYUpg+Xqp72pCnmG6kQBp89J0+dpON6FVlJSZYj8 Zk1zqoJWq3K5bI47wumXXAnlF2pA5qmEgiRdwKZLA1/idhMhKZHhBqj8AOlp+eSlorN9PyMH OuH3A3yqaPWaiP3v7h28unV1lT0se/3OeCXcTXdOSgMCs79PJdUmmg7sT5h46NW1/3xR8UU9 4W/eUh0y2FU7MzIYaza+0LZ4zMnNtnGNNql7Hxa1xt6/zFro6NxmVEr5TNWmDZieV/0FF1SE x00DAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprNIsWRmVeSWpSXmKPExsVy+t/xe7omf45GGxw8JGixccZ6VosnB9oZ LeZ9lrWYf+Qcq8X8K9dYLfofv2a2OH9+A7vFrQYZi02PgUIL25awWFzeNYfN4nPvEUaLpdcv Mlm07j3CbvHkYR+bA7/HmnlrGD12zrrL7rF4z0smj02rOtk87lzbw+axeUm9x+K+yaweB9/t YfLo27KK0ePzJrkArig9m6L80pJUhYz84hJbpWhDCyM9Q0sLPSMTSz1DY/NYKyNTJX07m5TU nMyy1CJ9uwS9jLWb1rIW3JCvONL/ib2BcY1YFyMnh4SAicTe+Q+Zuxi5OIQEljJKdD6exQqR EJOYtG87O4QtLPHnWhcbRNEnRome341ADgcHm4CexI5VhSBxEYH5jBJHN10GK2IWmMsksbJh ORNIt7CAr8TRxk0sIDaLgKrEhl+r2EBsXgFvieY9e1kgNshJ3DzXyQxicwLFb91YwAyyQEjA S+LiYsYJjHwLGBlWMYqklhbnpucWG+kVJ+YWl+al6yXn525iBEbMtmM/t+xg7HoXfIhRgINR iYf3x/Uj0UKsiWXFlbmHGCU4mJVEeNMvHY0W4k1JrKxKLcqPLyrNSS0+xGgKdNNEZinR5Hxg NOeVxBuaGppbWBqaG5sbm1koifOeN6iMEhJITyxJzU5NLUgtgulj4uCUamDcFPk5VW7L7AsK u08cF1noJZL3quycc4rii/67O5nCXrvXXpKNS1whf+/u2z6tOfyq9b1W6tPyOYscvqWzCHqv eRBdfSjHraZCYXez/OHNmWVnyi+XrnPwWt3ezqTAzvRXo2a7dV297NQTfqx7fZ+J+Sluqqrb NbP1vsjVubvVpp1ke8VU+1CJpTgj0VCLuag4EQBG3YLSrgIAAA== Message-Id: <20181016145652eucas1p2939c6aa628ba099c9609a8cbc17db1a4~eHqQRcy8z2133821338eucas1p2W@eucas1p2.samsung.com> X-CMS-MailID: 20181016145652eucas1p2939c6aa628ba099c9609a8cbc17db1a4 X-Msg-Generator: CA X-RootMTR: 20181016145652eucas1p2939c6aa628ba099c9609a8cbc17db1a4 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181016145652eucas1p2939c6aa628ba099c9609a8cbc17db1a4 References: <1539701782-26852-1-git-send-email-l.luba@partner.samsung.com> 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 This patch adds support for new flash which indicates that trip point triggers irq when temperature is met. Exynos5433 supports 8 trip point which will trigger irq. Above that number other trip points should be registered without 'irq-mode' flag. That will force the thermal framework to start polling the temperature sensor under configured conditions and handle the trip point. Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Lukasz Luba --- arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 40 +++++++++++++++------- 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi index 96e281c..dbce706ed 100644 --- a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +++ b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi @@ -59,22 +59,26 @@ cpu0_alert0: cpu-alert-0 { temperature = <50000>; /* millicelsius */ hysteresis = <5000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; cpu0_alert1: cpu-alert-1 { temperature = <60000>; /* millicelsius */ hysteresis = <5000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; cpu0_alert2: cpu-alert-2 { temperature = <70000>; /* millicelsius */ hysteresis = <5000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; cpu0_crit0: cpu-crit-0 { temperature = <120000>; /* millicelsius */ hysteresis = <0>; /* millicelsius */ type = "critical"; + irq-mode; }; /* * Exynos542x supports only 4 trip-points @@ -142,22 +146,26 @@ cpu1_alert0: cpu-alert-0 { temperature = <50000>; hysteresis = <5000>; - type = "active"; + type = "passive"; + irq-mode; }; cpu1_alert1: cpu-alert-1 { temperature = <60000>; hysteresis = <5000>; - type = "active"; + type = "passive"; + irq-mode; }; cpu1_alert2: cpu-alert-2 { temperature = <70000>; hysteresis = <5000>; - type = "active"; + type = "passive"; + irq-mode; }; cpu1_crit0: cpu-crit-0 { temperature = <120000>; hysteresis = <0>; type = "critical"; + irq-mode; }; cpu1_alert3: cpu-alert-3 { temperature = <70000>; @@ -209,22 +217,26 @@ cpu2_alert0: cpu-alert-0 { temperature = <50000>; hysteresis = <5000>; - type = "active"; + type = "passive"; + irq-mode; }; cpu2_alert1: cpu-alert-1 { temperature = <60000>; hysteresis = <5000>; - type = "active"; + type = "passive"; + irq-mode; }; cpu2_alert2: cpu-alert-2 { temperature = <70000>; hysteresis = <5000>; - type = "active"; + type = "passive"; + irq-mode; }; cpu2_crit0: cpu-crit-0 { temperature = <120000>; hysteresis = <0>; type = "critical"; + irq-mode; }; cpu2_alert3: cpu-alert-3 { temperature = <70000>; @@ -276,22 +288,26 @@ cpu3_alert0: cpu-alert-0 { temperature = <50000>; hysteresis = <5000>; - type = "active"; + type = "passive"; + irq-mode; }; cpu3_alert1: cpu-alert-1 { temperature = <60000>; hysteresis = <5000>; - type = "active"; + type = "passive"; + irq-mode; }; cpu3_alert2: cpu-alert-2 { temperature = <70000>; hysteresis = <5000>; - type = "active"; + type = "passive"; + irq-mode; }; cpu3_crit0: cpu-crit-0 { temperature = <120000>; hysteresis = <0>; type = "critical"; + irq-mode; }; cpu3_alert3: cpu-alert-3 { temperature = <70000>; From patchwork Tue Oct 16 14:56:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Luba X-Patchwork-Id: 10643725 X-Patchwork-Delegate: rui.zhang@intel.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 CB16F18BC for ; Tue, 16 Oct 2018 14:57:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B724229119 for ; Tue, 16 Oct 2018 14:57:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AB15B2A02B; Tue, 16 Oct 2018 14:57:09 +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 39DEA29119 for ; Tue, 16 Oct 2018 14:57:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727223AbeJPWrw (ORCPT ); Tue, 16 Oct 2018 18:47:52 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:39373 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727461AbeJPWrp (ORCPT ); Tue, 16 Oct 2018 18:47:45 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20181016145655euoutp0227da8540317a4eba4de804cd917c5469~eHqTLEYXc0360503605euoutp02L for ; Tue, 16 Oct 2018 14:56:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181016145655euoutp0227da8540317a4eba4de804cd917c5469~eHqTLEYXc0360503605euoutp02L DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1539701815; bh=MnvpqqdEvGeEE5waFkqMHu3DJCETm0FWhKWgd8aEtK4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RIPxgin7wgBvBQojqPpNYDKe/flCEhUmlbhZwvdNIlz2X5zVOzIAzA9ncX/B13ODt dGJOlHlWqOKCCoEIf8gbey8petApoQ/3XWc1gkeyTkYCE75c1BLIS+IrNl0+wV1eBe T+DkSoExT3nIbs4RS3o9PD58LTm7csrNK8Ce5ZCg= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20181016145654eucas1p24158e64918caa0ee0a3214127dccd672~eHqSdMeav0771607716eucas1p2A; Tue, 16 Oct 2018 14:56:54 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 71.70.04294.63CF5CB5; Tue, 16 Oct 2018 15:56:54 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20181016145653eucas1p2c408ac952ed5c351c98398fa3df373e6~eHqRiOtv50773307733eucas1p20; Tue, 16 Oct 2018 14:56:53 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20181016145653eusmtrp160c0ae2dffad8701ad44be0ab0b29b3a~eHqRSP2hD1180411804eusmtrp1B; Tue, 16 Oct 2018 14:56:53 +0000 (GMT) X-AuditID: cbfec7f4-84fff700000010c6-ed-5bc5fc365541 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id A3.E9.04284.53CF5CB5; Tue, 16 Oct 2018 15:56:53 +0100 (BST) Received: from AMDC3778.DIGITAL.local (unknown [106.120.51.20]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20181016145653eusmtip29d4ab85755aa74dcf1929ad513e4f432~eHqQqdvox2834828348eusmtip2F; Tue, 16 Oct 2018 14:56:53 +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 , Kukjin Kim , Krzysztof Kozlowski Subject: [PATCH 11/11] DT: arm: exynos: add support for thermal trip irq-mode Date: Tue, 16 Oct 2018 16:56:22 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1539701782-26852-1-git-send-email-l.luba@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSa0hTYRjHfXe2s+NwepqWL15hEpjRrIg6UEn3TheoD33JQbrypJJT2/Ha BQeWl6nLGyZac+ZqtSTTpszhvelQSTNLzZwkimGSfpiFpmU7nlXffu//ef7P/+HhxRCRkeeD xcYnUYp4WZwYFXCbelYGduxd65bubFwNIerL63jETEc2IDR2f6LKMsAjqt6P8Ih70/MIMTj4 kk+MK/2IhmmHVJ2l4xLD5gcoYS+wAOLx6BCHuNtq4RMzU2r0kAdZq6kFZHOFjU/WtMxxyAZD LkpOjLSg5CtdBlmjLuGRnQstHFJtNADS3hBwXhAuOBBFxcWmUIrQsEhBjGphEU00C9O07SeV wCZQAQyD+B64rPdQAVdMhD8FMH/STQUEDl5ysKmDzxbsAD5c9WKY6ddWTfBYXQ+gdfnqP8Pn zgo+MxTFJdBkuM7oXnglgPa2Gj7zQPAiDizSz264PfFzsKPv0UYCF98KWwuGUTYhAH4cyEUY dsXPwPExLcKYId7Hh2U/KjlMQYinwF67EbCGY3C1sIjDsif8ajXyWfaD/SX5XJZp+CbH4Ay4 BbN7Tc6e/fC1dYjHbI3g22CdOZSVD8Oe5iUueyF3OPZtEyMjDixuuo+wshDmZInY7mBozH/r XGAL1NeWOYeT0Db/yXlDDYDVI3G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STQtyfmz 45Xrx1e6jsdnyd5L1Ut5bzx7QuO+N8rajpfS5vWx5p6w9BaRWCTRk+GeGfqqTi1yb5rfr6kb T287GbZefq5wZLTlDV6+m3kdAnHBUxaLK2563v4iYm3Ciige03f7sn/IfqlXs3ockLhlf1Cz /8SFYQ/PGAZUsFt17VBiKc5INNRiLipOBAB9BMAtqwIAAA== Message-Id: <20181016145653eucas1p2c408ac952ed5c351c98398fa3df373e6~eHqRiOtv50773307733eucas1p20@eucas1p2.samsung.com> X-CMS-MailID: 20181016145653eucas1p2c408ac952ed5c351c98398fa3df373e6 X-Msg-Generator: CA X-RootMTR: 20181016145653eucas1p2c408ac952ed5c351c98398fa3df373e6 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181016145653eucas1p2c408ac952ed5c351c98398fa3df373e6 References: <1539701782-26852-1-git-send-email-l.luba@partner.samsung.com> 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 This patch adds support for new flash which indicates that trip point triggers irq when temperature is met. Exynos5433 supports 8 trip point which will trigger irq. Above that number other trip points should be registered without 'irq-mode' flag. That will force the thermal framework to start polling the temperature sensor under configured conditions and handle the trip point. Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Lukasz Luba --- arch/arm/boot/dts/exynos5410-odroidxu.dts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/exynos5410-odroidxu.dts b/arch/arm/boot/dts/exynos5410-odroidxu.dts index a2046f5..c255466 100644 --- a/arch/arm/boot/dts/exynos5410-odroidxu.dts +++ b/arch/arm/boot/dts/exynos5410-odroidxu.dts @@ -121,22 +121,26 @@ cpu_alert0: cpu-alert-0 { temperature = <50000>; /* millicelsius */ hysteresis = <5000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; cpu_alert1: cpu-alert-1 { temperature = <60000>; /* millicelsius */ hysteresis = <5000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; cpu_alert2: cpu-alert-2 { temperature = <70000>; /* millicelsius */ hysteresis = <5000>; /* millicelsius */ - type = "active"; + type = "passive"; + irq-mode; }; cpu_crit0: cpu-crit-0 { temperature = <120000>; /* millicelsius */ hysteresis = <0>; /* millicelsius */ type = "critical"; + irq-mode; }; };