From patchwork Thu Dec 12 10:38:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 181461 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp714526ile; Thu, 12 Dec 2019 02:47:05 -0800 (PST) X-Google-Smtp-Source: APXvYqwAk2kXZv3YdQ4At4JSljwuJRiJM8YCVy2Lj/5A9O1PQolB/H603kaGPPGKwp+ocOn10cjO X-Received: by 2002:aca:c692:: with SMTP id w140mr4862215oif.139.1576147624950; Thu, 12 Dec 2019 02:47:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576147624; cv=none; d=google.com; s=arc-20160816; b=PKwaZ4zC6ImQmdIhFZmUvNbpqu0VvQgduX7M1seb8i+itGlUrp79+0tMBS2/PQj+yL Z76aTyvO/IgkGF2pUV6IUKrWgxy1B3VKvjyHQwZxgtlV8Fcx/nczJAgJRMep3SdtRWjr P1LaxjntXJy7nfl1NG2epM/+z8YdL1G0z5cpiHrZe6pkawpXa6fiylVdRmhmRC1VOZj9 Az9LIrQj05zuOkI0o/9U0kgwC1NSP62JZUDRcL1kO23g0f1vyaUvhvIVJ7KKD+b0dAUt +pvVjogREfHIBPMf52ukQkhy1YyVJ4PrVCkZhlwsUKkcYTbM7LM37rbnUQWbZxRe0CZw Mtfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fE7IMePVLjFQjnYVNQlVTOVLLvpMYOoKCNMHpXwByQE=; b=ExVz0Cz0QyQdBpWqEycaAxLIOZf1a9dA4RSXCThrAXMBSjJeEo3Iu5YAklYMB1M3cW zdIw6tb1gdAgepEzbnJMR8mnvlaavuCxW7UCWS0MGWc9a5zE/Eh1f9x7kVpSdwVfnbNd KIr1pM9Zf4kf/tZx6fiDzFyfB13XOnahTf3baQMtbn/4UQiaLI401KSMUa5GTkFRqhcY xFMG7ws66r2EgB4grXf0sODNDLNpY7mDouKwnnA6nC6p3EedjEqxcC9NmGZ4+L6TtUZc LxcjM6rtEhghKXNYt1kKnRqU3ZPo5CjgEFkK50GcoOm8irM7YnnQR96KDq5+BWNQgfCq c8/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EuHUCtrp; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x68si2982125oia.227.2019.12.12.02.47.04; Thu, 12 Dec 2019 02:47:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EuHUCtrp; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728823AbfLLKrE (ORCPT + 10 others); Thu, 12 Dec 2019 05:47:04 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:36925 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728648AbfLLKrE (ORCPT ); Thu, 12 Dec 2019 05:47:04 -0500 Received: by mail-pf1-f195.google.com with SMTP id p14so556759pfn.4 for ; Thu, 12 Dec 2019 02:47:03 -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 :mime-version:content-transfer-encoding; bh=fE7IMePVLjFQjnYVNQlVTOVLLvpMYOoKCNMHpXwByQE=; b=EuHUCtrpzZjIKeMwhyCsgclqRS53cCfdpAYCbWldWKNmcScTnhi64z/RsE/aA7VEer JKH2n3QfWHAZO28XgcsvBHEQJPoYGcg9YOKnqK+7pDBpG/EUxUUZOpuQm8Q80v7zyfxc MTGN7mlm6lLZIDLT5z/C7rnQoGiaqMzvW6BJ1Lls4ayKIcHpMeul81N28pNEGZcL+psH PhnxGIS7CM+IOCWsw9hFgcQ/MObEgHI15ge06gpvLvgZHmuuHZvr6Gosd9TvAeU7SrDQ wYZYG10uF7xzX7QooSfVLM3Xsu0/33f1xiGwHcM+iZXwFtL5TEwSdoE+V4VBoACMRQQE 4h6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fE7IMePVLjFQjnYVNQlVTOVLLvpMYOoKCNMHpXwByQE=; b=Cvm3eYkicb0ArSM4KkG1IdrsDvEbK/SZ6hpV8JQR8Dm6oznYc4yVy8GruyIUXoHh4c q5r6qxWGkmG/vguqWOXN67xxV6+CitvceqeZNaoMfvOnxxCBu3eklAhx4yJnwpTMHGm1 8rycUEB/o3fYHxWEtm9kLROPQcvlq50Xpbx9oov2BYYibodfPZGvw5dYbeiWHFL81PWb W0d74b+o3SlNpfi64hZqhCpW+hD0xQJaNx6L3qcMykrn80LPwCt9zAvYVmA2M53fmnTr CG+g1RvQLEuz0NLHFY0OT+OB7GEehap37ywh60wqbrpMFcP2horcjGYpUOGNNIlMnUaQ ivtw== X-Gm-Message-State: APjAAAUzYeG1sutYdfCsdM+7i4lIKY1N8PxLVlK+93uU6wumhjMHmehX 8y7BY759JYnyGOo0Ooj1MvOKbQ== X-Received: by 2002:aa7:850c:: with SMTP id v12mr9061225pfn.188.1576147623344; Thu, 12 Dec 2019 02:47:03 -0800 (PST) Received: from localhost ([14.96.118.80]) by smtp.gmail.com with ESMTPSA id l18sm6635869pff.79.2019.12.12.02.47.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2019 02:47:02 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, agross@kernel.org, swboyd@chromium.org, stephan@gerhold.net, olof@lixom.net, Daniel Lezcano Cc: linux-pm@vger.kernel.org Subject: [PATCH v2] drivers: thermal: tsens: Work with old DTBs Date: Thu, 12 Dec 2019 16:08:14 +0530 Message-Id: X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org In order for the old DTBs to continue working, the new interrupt code must not return an error if interrupts are not defined. Don't return an error in case of -ENXIO. Fixes: 634e11d5b450a ("drivers: thermal: tsens: Add interrupt support") Suggested-by: Stephan Gerhold Signed-off-by: Amit Kucheria --- drivers/thermal/qcom/tsens.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.20.1 diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index 015e7d2015985..0e7cf52369326 100644 --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c @@ -110,6 +110,9 @@ static int tsens_register(struct tsens_priv *priv) irq = platform_get_irq_byname(pdev, "uplow"); if (irq < 0) { ret = irq; + /* For old DTs with no IRQ defined */ + if (irq == -ENXIO) + ret = 0; goto err_put_device; }