From patchwork Tue Aug 11 13:07:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 6992261 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 933289F402 for ; Tue, 11 Aug 2015 13:07:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BEFD9205EB for ; Tue, 11 Aug 2015 13:07:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D6C7E205F0 for ; Tue, 11 Aug 2015 13:07:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964993AbbHKNHh (ORCPT ); Tue, 11 Aug 2015 09:07:37 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:54909 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964989AbbHKNHg (ORCPT ); Tue, 11 Aug 2015 09:07:36 -0400 Received: from epcpsbgm1new.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NSX01NDP5S6NV20@mailout3.samsung.com>; Tue, 11 Aug 2015 22:07:34 +0900 (KST) X-AuditID: cbfee61a-f79a06d000005c6f-16-55c9f3965dca Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id D5.4F.23663.693F9C55; Tue, 11 Aug 2015 22:07:34 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NSX00KB95SBO250@mmp1.samsung.com>; Tue, 11 Aug 2015 22:07:34 +0900 (KST) From: Lukasz Majewski To: Eduardo Valentin , Krzysztof Kozlowski , Kukjin Kim , Kukjin Kim Cc: Linux PM list , "linux-samsung-soc@vger.kernel.org" , devicetree@vger.kernel.org, Lukasz Majewski , Lukasz Majewski Subject: [PATCH RESEND v6 1/3] Documentation: dts: Documentation entry to explain how to use PWM FAN as a cooling device Date: Tue, 11 Aug 2015 15:07:18 +0200 Message-id: <1439298440-15882-2-git-send-email-l.majewski@samsung.com> X-Mailer: git-send-email 1.7.10.4 In-reply-to: <1439298440-15882-1-git-send-email-l.majewski@samsung.com> References: <1425470624-25793-1-git-send-email-l.majewski@samsung.com> <1439298440-15882-1-git-send-email-l.majewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrELMWRmVeSWpSXmKPExsVy+t9jAd1pn0+GGtzZaGIx/8g5Vov5V66x Wrx+YWjRu+Aqm0X/49fMFm8ecVu8ebiZ0eJz7xFGixnn9zE5cHrsnHWX3WPTqk42j3XT3jJ7 9G1ZxejxeZNcAGsUl01Kak5mWWqRvl0CV8akxqNsBVt4K15tX87UwNjF1cXIySEhYCLx4dAN RghbTOLCvfVsXYxcHEICSxkldl29xQLh/GGUaJrWzQxSxSagJ/H57lMmkISIwAJGidnf1zOD OMwCLxkljt2BqBIWqJL4duUpO4jNIqAqce3ZVbAdvAJuEvvuTWCC2Kco0f1sAhuIzSngLrH9 3hF2iHXNQIOWPGWewMi7gJFhFaNEakFyQXFSeq5hXmq5XnFibnFpXrpecn7uJkZwyD2T2sF4 cJf7IUYBDkYlHl4Bz5OhQqyJZcWVuYcYJTiYlUR4OU4DhXhTEiurUovy44tKc1KLDzFKc7Ao ifPKbtgcKiSQnliSmp2aWpBaBJNl4uCUamBkCTe/psXW8Oqf4N5XL/rEYtRW6V3u8+1xC5I9 enUL/wq5pNN7pxV4liSpfg5Jicx+LbciST1s498TOXcOp80Tt5hXef2HALvHlk8CKqFV6/lW bd6ks73T/GTP9dkWNpFdH3aJv80J4fwmG3fLf1tzuA67edA6AdHwVIUX25iSOfc6rllnNkmJ pTgj0VCLuag4EQAa1xO1NQIAAA== Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Explanation of several properties, which allow PWM fan working as a cooling device, have been embraced in this commit. Signed-off-by: Lukasz Majewski Acked-by: Eduardo Valentin Acked-by: Krzysztof Kozlowski --- .../devicetree/bindings/hwmon/pwm-fan.txt | 29 ++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/hwmon/pwm-fan.txt b/Documentation/devicetree/bindings/hwmon/pwm-fan.txt index 610757c..c6d5332 100644 --- a/Documentation/devicetree/bindings/hwmon/pwm-fan.txt +++ b/Documentation/devicetree/bindings/hwmon/pwm-fan.txt @@ -3,10 +3,35 @@ Bindings for a fan connected to the PWM lines Required properties: - compatible : "pwm-fan" - pwms : the PWM that is used to control the PWM fan +- cooling-levels : PWM duty cycle values in a range from 0 to 255 + which correspond to thermal cooling states Example: - pwm-fan { + fan0: pwm-fan { compatible = "pwm-fan"; - status = "okay"; + cooling-min-state = <0>; + cooling-max-state = <3>; + #cooling-cells = <2>; pwms = <&pwm 0 10000 0>; + cooling-levels = <0 102 170 230>; }; + + thermal-zones { + cpu_thermal: cpu-thermal { + thermal-sensors = <&tmu 0>; + polling-delay-passive = <0>; + polling-delay = <0>; + trips { + cpu_alert1: cpu-alert1 { + temperature = <100000>; /* millicelsius */ + hysteresis = <2000>; /* millicelsius */ + type = "passive"; + }; + }; + cooling-maps { + map0 { + trip = <&cpu_alert1>; + cooling-device = <&fan0 0 1>; + }; + }; + };