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: 8431211 Return-Path: X-Original-To: patchwork-linux-arm@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 B453B9F314 for ; Fri, 26 Feb 2016 03:48:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D7D6320392 for ; Fri, 26 Feb 2016 03:48:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ECDCF20361 for ; Fri, 26 Feb 2016 03:48:09 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aZ9MA-0001fu-Hf; Fri, 26 Feb 2016 03:46:18 +0000 Received: from mail-pf0-x22d.google.com ([2607:f8b0:400e:c00::22d]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aZ9Ly-0001UR-FZ for linux-arm-kernel@lists.infradead.org; Fri, 26 Feb 2016 03:46:07 +0000 Received: by mail-pf0-x22d.google.com with SMTP id e127so44423456pfe.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=JLkaNAe1I/FxmRlFK1Bsr9dxZpoGdTvKzRXI2yPM2xfdchm/pIEmfebznc/9LtaHeG z6IthbVXrk4OUnq3HSxmZYCksgYv3R46heLFbTqQUTnDndtk7FEU9TQLECNXqV2M4meI x1ekuQA+Slu+yCCvDgc3rFnBEKonkVdNhqn93SvSYMIB0WGKYuSLi51pj9IqVM9icVbZ qJCgdiVGCMETyDHwOvGAoEWTsMc5LFSv/L8vnDvMjkKU2nfsZJOjnL+p7cr/nOY7pX8B goIvLfEdnteQXx0O2B0h8Wd4ptz/sV5eHVmpg3z9IKMCZv+Prrdw57aVH2dH+maaBEnI ntzQ== X-Gm-Message-State: AG10YOT5lwerF3Ks2FnJVEnJ1fkLCxVF/zSaIPNiFM+PAxUMCj//0qZjKsjkImrkxuYP54Jq 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160225_194606_639983_60DABC0D X-CRM114-Status: GOOD ( 13.60 ) X-Spam-Score: -2.0 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Leo Yan , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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) {