Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5761297ybi; Tue, 28 May 2019 19:36:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/8V8W2DKPIkioTvhvFEyNIdz7+B4a5ZSr3ATXhgRvCwSG4PVDjUTwRLrMRrhEyCJwwyTC X-Received: by 2002:a63:10d:: with SMTP id 13mr108890063pgb.176.1559097371527; Tue, 28 May 2019 19:36:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559097371; cv=none; d=google.com; s=arc-20160816; b=OM9aY/ilL21fUHHrHUp4fLJTQLtVkmTEXesaSlH86S5rrB8WlG/uWfMo97DlZcjlbh QZS2B+P2oPJKtjqZGe76j+PgADRjd/wQirXvl0AQJBfUs5ld194+vzKMsOgPZFBhVsNX 4j3usMUNXM3QXVIFB30dFDuBvdIotmJ8RO/pcvqBqNHyX0QwDqWhklpnZ5H2mwO0YCrf Pu82V/NkFbM3BcdispqxzSw0BWSfpeNi0ciTfyiNQp5W2qGjrjEnlVvTMvmHa8suD9sZ DJscc2jS89NhWymxqJVSCnx8dfZo+yo/m0EpeASBb10NGeG2pOl/bBKjAnAKVrMone4n Y5Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=h4HAswLo5xWylyhxHYQaGkQiPnSlTO4ftDNVwHlm10E=; b=H/Xy8CvyhC/NJkQiStBQ9GsJuUVk4jOtRsHyd45ffveeh0sm61q75aWiZ0CikrYUam 8xHW29AROql2QUUYIIL7V/5l5BE87ecqchiDLF3UFaoxM6zRgbPGs3/UdQ6OaKjgWIuZ 2rs1XeJCFWXwrWGxzaEcTdZi0xeqtchTImISpDpD1bSMfPWVRh6R96ep5joGHETr/X/K Qh054mxLZKtUrLDjisTEYnGKWPq+1HdbWakF7TAYIr6MMc4M+ITb3jPieiX866TFwblV 9boWzBg36X8+JfNQSIMpJeSYpMPFwNpwLwWAVgb+GF/WLpR2F+8CmBgoqjvOVf/bvjqN a68Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BdijjK50; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 133si22991036pga.130.2019.05.28.19.35.54; Tue, 28 May 2019 19:36:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@gmail.com header.s=20161025 header.b=BdijjK50; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726474AbfE2Ceg (ORCPT + 99 others); Tue, 28 May 2019 22:34:36 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:40072 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725816AbfE2Cef (ORCPT ); Tue, 28 May 2019 22:34:35 -0400 Received: by mail-pg1-f196.google.com with SMTP id d30so384549pgm.7; Tue, 28 May 2019 19:34:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=h4HAswLo5xWylyhxHYQaGkQiPnSlTO4ftDNVwHlm10E=; b=BdijjK50B4yGs2xl1j13xH1Nea+/zyun0B4RhsO/A6piYaISkz9mwd6HXAxV2giSbx /ZctzsJGZcwcb6rR1cXFLB1ORIxZInUr8qObA+0Kc2EYTzos0bOxznQKvBWp52FWx9sU dnZT37oa67uXnAM/fpDYfj0b63duM6O86iOG2MbrtN7xzw8H1zqf1S/r2YbZVQ1VQgI8 n5kAWrQxtAejzSfZs3Z4sO6CqokjNVtnhS1DKQAIEdsxXdif1mpd0D5V2ffK+dMgFlZG 0BoOpbnAoycIkR4BoAZZc6Dso7Syz39z8/EDZykdtz1XupQSyrcCYH8MkVG1A1s3PRLt cz6g== 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; bh=h4HAswLo5xWylyhxHYQaGkQiPnSlTO4ftDNVwHlm10E=; b=paCgnMLxpKyv0pmSoa2JWUak+oZ8gMSTgvXlpxFr6FiAu9wtqhRBHrPdSeRS8fNkSV 4u0JO8L58yepnHuAmepNd9snKraSf8AUGDbBQxhyzEsVTUhg8IRTsDiCc2rgriTEQjIt f4mgmpXwaRsKt7yw+mtBPLLduN/38+N50RoBlixHGJu2Yh/eECHem7yOiFLGjdjLbYNw cVFXfW6PHT6yaCnjbQvKxfq8U7OAZ5M54LVKJepiprs6P6lPYRBkFMU0xwkCuvsHoKkj RyaJ9nTUeVY+pHxJGvuWXrTSdSpc3DasJLNZjuzBKjrw4NIYgNBGxW/yXvbHtln8jb3Z NTVg== X-Gm-Message-State: APjAAAU5MEPc5eKLTxCoWn8yVQvsnQ2QcMcQ3sCayghYVO2UZioHV2Ht qBMHwxIEykc7j4RQgOXwUYFpun3+ X-Received: by 2002:a17:90a:ae10:: with SMTP id t16mr9470350pjq.51.1559097274267; Tue, 28 May 2019 19:34:34 -0700 (PDT) Received: from localhost ([2601:644:8201:32e0:7256:81ff:febd:926d]) by smtp.gmail.com with ESMTPSA id f16sm10422064pja.18.2019.05.28.19.34.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 May 2019 19:34:32 -0700 (PDT) From: Eduardo Valentin To: linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Stephen Boyd , bot@kernelci.org, Kevin Hilman , kernel-build-reports@lists.linaro.org, Bjorn Andersson , Eduardo Valentin , Andy Gross , David Brown , Amit Kucheria , Zhang Rui , Daniel Lezcano Subject: [PATCH 1/1] Revert "drivers: thermal: tsens: Add new operation to check if a sensor is enabled" Date: Tue, 28 May 2019 19:34:26 -0700 Message-Id: <1559097266-12780-1-git-send-email-edubezval@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit 3e6a8fb3308419129c7a52de6eb42feef5a919a0. Cc: Andy Gross Cc: David Brown Cc: Amit Kucheria Cc: Zhang Rui Cc: Daniel Lezcano Suggested-by: Amit Kucheria Reported-by: Andy Gross Signed-off-by: Eduardo Valentin --- Added this for next -rc, as per request. drivers/thermal/qcom/tsens-common.c | 14 -------------- drivers/thermal/qcom/tsens-v0_1.c | 1 - drivers/thermal/qcom/tsens-v2.c | 1 - drivers/thermal/qcom/tsens.c | 5 ----- drivers/thermal/qcom/tsens.h | 1 - 5 files changed, 22 deletions(-) diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers/thermal/qcom/tsens-common.c index 928e8e8..528df88 100644 --- a/drivers/thermal/qcom/tsens-common.c +++ b/drivers/thermal/qcom/tsens-common.c @@ -64,20 +64,6 @@ void compute_intercept_slope(struct tsens_priv *priv, u32 *p1, } } -bool is_sensor_enabled(struct tsens_priv *priv, u32 hw_id) -{ - u32 val; - int ret; - - if ((hw_id > (priv->num_sensors - 1)) || (hw_id < 0)) - return -EINVAL; - ret = regmap_field_read(priv->rf[SENSOR_EN], &val); - if (ret) - return ret; - - return val & (1 << hw_id); -} - static inline int code_to_degc(u32 adc_code, const struct tsens_sensor *s) { int degc, num, den; diff --git a/drivers/thermal/qcom/tsens-v0_1.c b/drivers/thermal/qcom/tsens-v0_1.c index a319283..6f26fad 100644 --- a/drivers/thermal/qcom/tsens-v0_1.c +++ b/drivers/thermal/qcom/tsens-v0_1.c @@ -334,7 +334,6 @@ static const struct reg_field tsens_v0_1_regfields[MAX_REGFIELDS] = { /* CTRL_OFFSET */ [TSENS_EN] = REG_FIELD(SROT_CTRL_OFF, 0, 0), [TSENS_SW_RST] = REG_FIELD(SROT_CTRL_OFF, 1, 1), - [SENSOR_EN] = REG_FIELD(SROT_CTRL_OFF, 3, 13), /* ----- TM ------ */ /* INTERRUPT ENABLE */ diff --git a/drivers/thermal/qcom/tsens-v2.c b/drivers/thermal/qcom/tsens-v2.c index 1099069..0a4f2b8 100644 --- a/drivers/thermal/qcom/tsens-v2.c +++ b/drivers/thermal/qcom/tsens-v2.c @@ -44,7 +44,6 @@ static const struct reg_field tsens_v2_regfields[MAX_REGFIELDS] = { /* CTRL_OFF */ [TSENS_EN] = REG_FIELD(SROT_CTRL_OFF, 0, 0), [TSENS_SW_RST] = REG_FIELD(SROT_CTRL_OFF, 1, 1), - [SENSOR_EN] = REG_FIELD(SROT_CTRL_OFF, 3, 18), /* ----- TM ------ */ /* INTERRUPT ENABLE */ diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index 36b0b52..0627d86 100644 --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c @@ -85,11 +85,6 @@ static int tsens_register(struct tsens_priv *priv) struct thermal_zone_device *tzd; for (i = 0; i < priv->num_sensors; i++) { - if (!is_sensor_enabled(priv, priv->sensor[i].hw_id)) { - dev_err(priv->dev, "sensor %d: disabled\n", - priv->sensor[i].hw_id); - continue; - } priv->sensor[i].priv = priv; priv->sensor[i].id = i; tzd = devm_thermal_zone_of_sensor_register(priv->dev, i, diff --git a/drivers/thermal/qcom/tsens.h b/drivers/thermal/qcom/tsens.h index eefe384..2fd9499 100644 --- a/drivers/thermal/qcom/tsens.h +++ b/drivers/thermal/qcom/tsens.h @@ -315,7 +315,6 @@ void compute_intercept_slope(struct tsens_priv *priv, u32 *pt1, u32 *pt2, u32 mo int init_common(struct tsens_priv *priv); int get_temp_tsens_valid(struct tsens_priv *priv, int i, int *temp); int get_temp_common(struct tsens_priv *priv, int i, int *temp); -bool is_sensor_enabled(struct tsens_priv *priv, u32 hw_id); /* TSENS target */ extern const struct tsens_plat_data data_8960; -- 2.1.4