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: 62919 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp502490lbc; Thu, 25 Feb 2016 19:46:04 -0800 (PST) X-Received: by 10.66.119.202 with SMTP id kw10mr62947848pab.110.1456458364136; Thu, 25 Feb 2016 19:46:04 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i10si2176460pfi.213.2016.02.25.19.46.03; Thu, 25 Feb 2016 19:46:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753290AbcBZDps (ORCPT + 6 others); Thu, 25 Feb 2016 22:45:48 -0500 Received: from mail-pf0-f171.google.com ([209.85.192.171]:32839 "EHLO mail-pf0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753277AbcBZDpq (ORCPT ); Thu, 25 Feb 2016 22:45:46 -0500 Received: by mail-pf0-f171.google.com with SMTP id q63so44343134pfb.0 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=AtOTGxDhTyyJSCJD7c8ifxa1puO00kvxLpgypUhBR6IwIaRv7p3qpN4yS1Bb5lFY7O 427zbumgxWKZ5cmpxwcvj1Aw/JObbjo6+Qx73udDxKgUbkJHHeZpkwoQF/sSBP8EvZCa 4Hyhsi33EZC+3SRYrzB9oXC7eLCJ1y968CfzGfLCpiAdbcypH9eDo00ZOPfIDyUR0LQD YSkGZHRIG6XU5bsUppGsMCw8POaMhl0YD0rkx8zd5l3VEcK2sowpcMdcO+WucU6IMyGX s0Lc2lZ9PRQnPHnuOoM9BKkwghcw1rKA4d7WaO5pI5r4IucWZHiaCGH0hZEj310P2VG1 ri9A== X-Gm-Message-State: AG10YOQQTMayxFNGTQKJxRe0HLl8IJJr7IoVdbHvPE5CqwyjCDvOcbOExQfZzZtFMcNEL220 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: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 --- Documentation/devicetree/bindings/thermal/thermal.txt | 9 +++++---- drivers/thermal/of-thermal.c | 9 ++++----- 2 files changed, 9 insertions(+), 9 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Acked-by: Javi Merino 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) {