From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753750AbcFGGvN (ORCPT ); Tue, 7 Jun 2016 02:51:13 -0400 Received: from hqemgate16.nvidia.com ([216.228.121.65]:4609 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753464AbcFGGvL (ORCPT ); Tue, 7 Jun 2016 02:51:11 -0400 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Mon, 06 Jun 2016 23:48:55 -0700 Message-ID: <57566BDF.3090100@nvidia.com> Date: Tue, 7 Jun 2016 12:08:23 +0530 From: Laxman Dewangan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Keerthy , , , CC: , , Subject: Re: [PATCH V3 1/2] thermal: max77620: Add DT binding doc for thermal driver References: <1465213467-23518-1-git-send-email-ldewangan@nvidia.com> <575645B8.5090709@ti.com> In-Reply-To: <575645B8.5090709@ti.com> X-Originating-IP: [10.19.65.30] X-ClientProxiedBy: DRHKMAIL101.nvidia.com (10.25.59.15) To bgmail102.nvidia.com (10.25.59.11) Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 07 June 2016 09:25 AM, Keerthy wrote: > > > On Monday 06 June 2016 05:14 PM, Laxman Dewangan wrote: >> Maxim Semiconductor MAX77620 supports alarm interrupts when >> its die temperature crosses 120C and 140C. These threshold >> temperatures are not configurable. >> >> Add DT binding document to details out the DT property related >> to MAX77620 thermal functionality. >> >> Signed-off-by: Laxman Dewangan >> --- >> .../bindings/thermal/thermal-max77620.txt | 64 >> ++++++++++++++++++++++ >> 1 file changed, 64 insertions(+) >> create mode 100644 >> Documentation/devicetree/bindings/thermal/thermal-max77620.txt >> >> diff --git >> a/Documentation/devicetree/bindings/thermal/thermal-max77620.txt >> b/Documentation/devicetree/bindings/thermal/thermal-max77620.txt >> new file mode 100644 >> index 0000000..5a500d5 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/thermal/thermal-max77620.txt >> @@ -0,0 +1,64 @@ >> +Thermal driver for MAX77620 Power management IC from Maxim >> Semiconductor. >> + >> +Maxim Semiconductor MAX77620 supports alarm interrupts when its >> +die temperature crosses 120C and 140C. These threshold temperatures >> +are not configurable. Device does not provide the real temperature >> +of die other than just indicating whether temperature is above or >> +below threshold level. >> + >> +Required properties: >> +------------------- >> +#thermal-sensor-cells: Please refer >> >> + for more details. >> + The value must be 0. >> + >> +For more details, please refer generic thermal DT binding document >> +. >> + >> +Please refer for mfd DT binding >> +document for the MAX77620. >> + >> +Example: >> +-------- >> +#include >> +#include >> +... >> + >> +i2c@7000d000 { >> + spmic: max77620@3c { >> + compatible = "maxim,max77620"; >> + ::::: >> + #thermal-sensor-cells = <0>; >> + ::: >> + }; >> +}; >> + >> +cool_dev: cool-dev { >> + compatible = "cooling-dev"; >> + #cooling-cells = <2>; >> +}; >> + >> +thermal-zones { >> + PMIC-Die { >> + polling-delay = <0>; >> + polling-delay-passive = <0>; >> + thermal-sensors = <&spmic>; >> + >> + trips { >> + die_temp_thresh: hot-die { >> + temperature = <120000>; >> + type = "active"; >> + hysteresis = <0>; >> + }; >> + }; > > What about 140C? Isn't that a critical trip point? Yes, it is there and it can be populated/extended on the same way and handled. This is just an example. > >> + >> + cooling-maps { >> + map0 { >> + trip = <&die_temp_thresh>; >> + cooling-device = <&cool_dev THERMAL_NO_LIMIT >> + THERMAL_NO_LIMIT>; >> + contribution = <100>; >> + }; >> + }; >> + }; >> +}; >>