From patchwork Fri Feb 26 03:43:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 8431201 X-Patchwork-Delegate: eduardo.valentin@ti.com 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 204149F314 for ; Fri, 26 Feb 2016 03:47:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6D73D20392 for ; Fri, 26 Feb 2016 03:47:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 889C120361 for ; Fri, 26 Feb 2016 03:47:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753291AbcBZDps (ORCPT ); Thu, 25 Feb 2016 22:45:48 -0500 Received: from mail-pf0-f178.google.com ([209.85.192.178]:36441 "EHLO mail-pf0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753289AbcBZDpq (ORCPT ); Thu, 25 Feb 2016 22:45:46 -0500 Received: by mail-pf0-f178.google.com with SMTP id e127so44423457pfe.3 for ; Thu, 25 Feb 2016 19:45:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/hD+7r+fB2Eq+k4w3vLTDcsj8XyIIAM0bJpB+KnYZA8=; b=fK9C9bgikJE14tC+rypZdGg5ddPva+iUq8JhHPLopnH/NJdGtdbPESQfgaK2c1OYO2 4hBC+lCTzRlZym+npRuc9SXi/piDSo2cSM1ZDsxvsX1oMwAtm2wcAquP/BapKIlv8mIo 0PPh28vIyEM/ACB/9Ji5Wv7OwYOuRUfI0ChKg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/hD+7r+fB2Eq+k4w3vLTDcsj8XyIIAM0bJpB+KnYZA8=; b=AudLwLF/RO7C/PYszh2Oi8auPFxA9QvLPgy5U21wd0q7gj6he3JVvM/Y0L1VwsdG5w Kgp3OQYlJIQtmOMnYWjtAb3epELnlx4a3gNrkcqgx0w8zIGGM70UWDP/Wg4fIhoD0iJO WI03iKK1kwEw+DOQOxKFQXOUQ0XAHs+N2zc8xJ4tsZbZ6HII21FCb7YH/oRHwNKsmHuK KQ6fZBgFiW8rkpMznPozg2La5yDmgrTdGTrb56mtOxHhliiZYXEuGaiojZpj+ox2ns6s 44Qb2xXNXI990jZpFsqMsmxNO+vtzwOvxhAkumw09qZAuJzDM64qbFKioSI6ZS87bXEv c68A== X-Gm-Message-State: AG10YORY7BR7ppwxXubWtv0Zi8LfapXhlOyeNhuHxzxVZ+HlJkXCG1HTqdCg0HOInGPDDFyJ X-Received: by 10.98.1.197 with SMTP id 188mr68190397pfb.8.1456458345748; Thu, 25 Feb 2016 19:45:45 -0800 (PST) Received: from leoy-linaro.a1.60in.com (li401-178.members.linode.com. [106.187.51.178]) by smtp.gmail.com with ESMTPSA id fn3sm15295884pab.20.2016.02.25.19.45.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 25 Feb 2016 19:45:44 -0800 (PST) From: Leo Yan To: Wei Xu , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Catalin Marinas , Will Deacon , Zhang Rui , Eduardo Valentin , kongxinwei , Javi Merino , Punit Agrawal Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Leo Yan Subject: [PATCH v2 1/5] thermal: change "hysteresis" as optional property Date: Fri, 26 Feb 2016 11:43:43 +0800 Message-Id: <1456458227-12950-2-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1456458227-12950-1-git-send-email-leo.yan@linaro.org> References: <1456458227-12950-1-git-send-email-leo.yan@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, UNPARSEABLE_RELAY autolearn=no 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 The property "hysteresis" is mandatory for trip points, so if without it the thermal zone cannot register successfully. But "hysteresis" is ignored in the thermal subsystem and only inquired by several thermal sensor drivers. So change "hysteresis" as optional properties. Signed-off-by: Leo Yan Acked-by: Javi Merino --- Documentation/devicetree/bindings/thermal/thermal.txt | 9 +++++---- drivers/thermal/of-thermal.c | 9 ++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Documentation/devicetree/bindings/thermal/thermal.txt b/Documentation/devicetree/bindings/thermal/thermal.txt index 41b817f..7d79e77 100644 --- a/Documentation/devicetree/bindings/thermal/thermal.txt +++ b/Documentation/devicetree/bindings/thermal/thermal.txt @@ -89,10 +89,6 @@ Required properties: Type: signed in millicelsius. Size: one cell -- hysteresis: A low hysteresis value on temperature property (above). - Type: unsigned This is a relative value, in millicelsius. - Size: one cell - - type: a string containing the trip type. Expected values are: "active": A trip point to enable active cooling "passive": A trip point to enable passive cooling @@ -100,6 +96,11 @@ Required properties: "critical": Hardware not reliable. Type: string +Optional properties: +- hysteresis: A low hysteresis value on temperature property (above). + Type: unsigned This is a relative value, in millicelsius. + Size: one cell + * Cooling device maps The cooling device maps node is a node to describe how cooling devices diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c index 9043f8f..ab05500 100644 --- a/drivers/thermal/of-thermal.c +++ b/drivers/thermal/of-thermal.c @@ -689,11 +689,10 @@ static int thermal_of_populate_trip(struct device_node *np, trip->temperature = prop; ret = of_property_read_u32(np, "hysteresis", &prop); - if (ret < 0) { - pr_err("missing hysteresis property\n"); - return ret; - } - trip->hysteresis = prop; + if (ret < 0) + pr_warning("missing hysteresis property\n"); + else + trip->hysteresis = prop; ret = thermal_of_get_trip_type(np, &trip->type); if (ret < 0) {