From patchwork Thu Oct 31 18:37:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 178218 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3242256ill; Thu, 31 Oct 2019 11:37:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqwgnWaGciNKhFsI2If80cqy0TJEscQcD5opYQdQDPMKgYwPaaXXjNtizNG3NtRB4y9IZFiP X-Received: by 2002:a50:fc18:: with SMTP id i24mr7856774edr.42.1572547077535; Thu, 31 Oct 2019 11:37:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572547077; cv=none; d=google.com; s=arc-20160816; b=qqWncfYr+xiATedi1zn49wlC4NIsWG4CDPvtELUuHBNQBQJ8fqKxIWfG3qjB5HING2 8M4ou5pSieMNxHh1oM26PirZ7bA4LfwP7hQFDVE8GkQ1pJ9XYHaZ1GuZXvexjnZEiRsm ZBzacDQR04BycLcnZVDr5rFUimtStVW/oY9tKTm9Y8FSnE039Y88valUBwwQq4eYe4KL blb28XPlU2TY/Xwy46wL3Id9DA33Ek6XXCpTcEwYiIGvCuEjXnhCbn+5iCXXvVZYmv+g kAYIBenHqstE7MDpU50Q5PVsocxzstFO9At1bNm2iHGY0uBcKFBccYWl0uApx4/uITjY 1LGQ== 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:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=rO1z1JlGDHGdy6zVD5fls33iWqIXWjt9KmTfIa3Qj2w=; b=B4MDpXUN0X8VUfVD4FzqOMXwLp770TADJd+XR6+GOygR1SrpzjUtH4hT27Vnf+Hd1o JEIzFCMvgUJ20ZPJZCqgwDLGn2FbcY94Bk3UbPRG34ps4aWxchSMbaLptWP5yifnTXS5 iMT/oNWy/VCb0S1QFBKkYIY/tx05ZNpR7nZcFpyOV5YczxgyegRiHDRZ+XVYsCpCkL6p WBFYNKg4ZuoqQBBSGL/wi2T1ywqRyblxdRTQutUk23aM3wZjXFcWd3cC7WsvNnRN1H+W a85EZchi5tXYUcCigY5qkelkGd3Y6B9iTN7WwhdBgOm1aHJPl20vcQWMBdae0G+9ZBsM hrDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ORqnI9Il; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 y38si4897813edb.87.2019.10.31.11.37.57; Thu, 31 Oct 2019 11:37:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-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=ORqnI9Il; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1729332AbfJaShz (ORCPT + 15 others); Thu, 31 Oct 2019 14:37:55 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:44845 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729266AbfJaShz (ORCPT ); Thu, 31 Oct 2019 14:37:55 -0400 Received: by mail-pl1-f194.google.com with SMTP id q16so3066484pll.11 for ; Thu, 31 Oct 2019 11:37:55 -0700 (PDT) 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 :in-reply-to:references; bh=rO1z1JlGDHGdy6zVD5fls33iWqIXWjt9KmTfIa3Qj2w=; b=ORqnI9IlV/hEKajizXIQ38aByJEbH16XAIJ47m762ndSW+Cg7/flRjMn9Dex39IfBV fk/l/3LRz+65JvRSp7HpTojtAeLqCwLiCM/le6ZAdo+dg851R3QBk+A7Kdka/V0n/oad qQqdKuN/+MUc0OmepCu+YWZ3aEZsjh4F55BsTSnZk0pa9wsS+T9Ppjk9FZX65Agq1ZCR 0y5H4PCwSOodflkhRWihZLipb1RQMKN6J5jvZ7qelvK0F7iZnQAtqFGY8vuG+KwocAdI e3wbKqm4FhdhZskFhhNIQRdkmeFtiJcVU/VCoXt7oHb4wjZQbxbvu1x4USkKFXXr9X1Z vfgA== 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:in-reply-to:references; bh=rO1z1JlGDHGdy6zVD5fls33iWqIXWjt9KmTfIa3Qj2w=; b=O1STJZkYeQ2i0UCTvzwGFv+sCQreAh1a7u+98FzVBC4HUqcCX6A/Wu10jzP6ggXb6s zEiIg8oUxl7oXuBD8VtXxqZtGzjUPEO/sS32CadW6aOsScwqXsSyHRuGncM0TwFvA+WX J8th4wSsFtTUTtnIUC/kB9bDD97WbY9RcDypCIZKIOn9WVWkMhjHFA64Enz0+6SrjkO4 MWdHyK2kOZU+rvkSXLN5a/LCHbgrwPoeyoT1PNRGn8pJP5wN7xpKqP1rxu58kCKf2om/ pOW0RoCR9DOy0mTSsV6MRu1qsvl0GPm0Tocm0V0BeDP0Z1w1WsbemwzVw6q/oUs4wWaH QUXQ== X-Gm-Message-State: APjAAAX4DmBP5Mlr1ReIFA/xXOk+PddV88klf7Zqndh2BczL2BvDLdqY P0BX/ipSFj8vm0Vz5jbmRPRDfA== X-Received: by 2002:a17:902:9a88:: with SMTP id w8mr7780658plp.129.1572547074428; Thu, 31 Oct 2019 11:37:54 -0700 (PDT) Received: from localhost ([49.248.58.234]) by smtp.gmail.com with ESMTPSA id x14sm3744161pfm.96.2019.10.31.11.37.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Oct 2019 11:37:53 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, agross@kernel.org, masneyb@onstation.org, swboyd@chromium.org, julia.lawall@lip6.fr, Amit Kucheria , Daniel Lezcano , Mark Rutland , Rob Herring , Zhang Rui Cc: linux-pm@vger.kernel.org Subject: [PATCH v7 01/15] drivers: thermal: tsens: Get rid of id field in tsens_sensor Date: Fri, 1 Nov 2019 00:07:25 +0530 Message-Id: <30206cd47d303d2dcaef87f4e3c7173481a0bddd.1572526427.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org There are two fields - id and hw_id - to track what sensor an action was to performed on. This was because the sensors connected to a TSENS IP might not be contiguous i.e. 1, 2, 4, 5 with 3 being skipped. This causes confusion in the code which uses hw_id sometimes and id other times (tsens_get_temp, tsens_get_trend). Switch to only using the hw_id field to track the physical ID of the sensor. When we iterate through all the sensors connected to an IP block, we use an index i to loop through the list of sensors, and then return the actual hw_id that is registered on that index. Signed-off-by: Amit Kucheria Reviewed-by: Stephen Boyd Reviewed-by: Daniel Lezcano --- drivers/thermal/qcom/tsens-8960.c | 4 ++-- drivers/thermal/qcom/tsens-common.c | 16 +++++++++------- drivers/thermal/qcom/tsens.c | 11 +++++------ drivers/thermal/qcom/tsens.h | 10 ++++------ 4 files changed, 20 insertions(+), 21 deletions(-) -- 2.17.1 diff --git a/drivers/thermal/qcom/tsens-8960.c b/drivers/thermal/qcom/tsens-8960.c index e46a4e3f25c4..fb77acb8d13b 100644 --- a/drivers/thermal/qcom/tsens-8960.c +++ b/drivers/thermal/qcom/tsens-8960.c @@ -245,11 +245,11 @@ static inline int code_to_mdegC(u32 adc_code, const struct tsens_sensor *s) return adc_code * slope + offset; } -static int get_temp_8960(struct tsens_priv *priv, int id, int *temp) +static int get_temp_8960(struct tsens_sensor *s, int *temp) { int ret; u32 code, trdy; - const struct tsens_sensor *s = &priv->sensor[id]; + struct tsens_priv *priv = s->priv; unsigned long timeout; timeout = jiffies + usecs_to_jiffies(TIMEOUT_US); diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers/thermal/qcom/tsens-common.c index 528df8801254..c037bdf92c66 100644 --- a/drivers/thermal/qcom/tsens-common.c +++ b/drivers/thermal/qcom/tsens-common.c @@ -83,11 +83,12 @@ static inline int code_to_degc(u32 adc_code, const struct tsens_sensor *s) return degc; } -int get_temp_tsens_valid(struct tsens_priv *priv, int i, int *temp) +int get_temp_tsens_valid(struct tsens_sensor *s, int *temp) { - struct tsens_sensor *s = &priv->sensor[i]; - u32 temp_idx = LAST_TEMP_0 + s->hw_id; - u32 valid_idx = VALID_0 + s->hw_id; + struct tsens_priv *priv = s->priv; + int hw_id = s->hw_id; + u32 temp_idx = LAST_TEMP_0 + hw_id; + u32 valid_idx = VALID_0 + hw_id; u32 last_temp = 0, valid, mask; int ret; @@ -123,12 +124,13 @@ int get_temp_tsens_valid(struct tsens_priv *priv, int i, int *temp) return 0; } -int get_temp_common(struct tsens_priv *priv, int i, int *temp) +int get_temp_common(struct tsens_sensor *s, int *temp) { - struct tsens_sensor *s = &priv->sensor[i]; + struct tsens_priv *priv = s->priv; + int hw_id = s->hw_id; int last_temp = 0, ret; - ret = regmap_field_read(priv->rf[LAST_TEMP_0 + s->hw_id], &last_temp); + ret = regmap_field_read(priv->rf[LAST_TEMP_0 + hw_id], &last_temp); if (ret) return ret; diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index 0627d8615c30..6ed687a6e53c 100644 --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c @@ -14,19 +14,19 @@ static int tsens_get_temp(void *data, int *temp) { - const struct tsens_sensor *s = data; + struct tsens_sensor *s = data; struct tsens_priv *priv = s->priv; - return priv->ops->get_temp(priv, s->id, temp); + return priv->ops->get_temp(s, temp); } static int tsens_get_trend(void *data, int trip, enum thermal_trend *trend) { - const struct tsens_sensor *s = data; + struct tsens_sensor *s = data; struct tsens_priv *priv = s->priv; if (priv->ops->get_trend) - return priv->ops->get_trend(priv, s->id, trend); + return priv->ops->get_trend(s, trend); return -ENOTSUPP; } @@ -86,8 +86,7 @@ static int tsens_register(struct tsens_priv *priv) for (i = 0; i < priv->num_sensors; i++) { priv->sensor[i].priv = priv; - priv->sensor[i].id = i; - tzd = devm_thermal_zone_of_sensor_register(priv->dev, i, + tzd = devm_thermal_zone_of_sensor_register(priv->dev, priv->sensor[i].hw_id, &priv->sensor[i], &tsens_of_ops); if (IS_ERR(tzd)) diff --git a/drivers/thermal/qcom/tsens.h b/drivers/thermal/qcom/tsens.h index b89083b61c38..84e5447c5686 100644 --- a/drivers/thermal/qcom/tsens.h +++ b/drivers/thermal/qcom/tsens.h @@ -32,7 +32,6 @@ enum tsens_ver { * @priv: tsens device instance that this sensor is connected to * @tzd: pointer to the thermal zone that this sensor is in * @offset: offset of temperature adjustment curve - * @id: Sensor ID * @hw_id: HW ID can be used in case of platform-specific IDs * @slope: slope of temperature adjustment curve * @status: 8960-specific variable to track 8960 and 8660 status register offset @@ -41,7 +40,6 @@ struct tsens_sensor { struct tsens_priv *priv; struct thermal_zone_device *tzd; int offset; - unsigned int id; unsigned int hw_id; int slope; u32 status; @@ -62,13 +60,13 @@ struct tsens_ops { /* mandatory callbacks */ int (*init)(struct tsens_priv *priv); int (*calibrate)(struct tsens_priv *priv); - int (*get_temp)(struct tsens_priv *priv, int i, int *temp); + int (*get_temp)(struct tsens_sensor *s, int *temp); /* optional callbacks */ int (*enable)(struct tsens_priv *priv, int i); void (*disable)(struct tsens_priv *priv); int (*suspend)(struct tsens_priv *priv); int (*resume)(struct tsens_priv *priv); - int (*get_trend)(struct tsens_priv *priv, int i, enum thermal_trend *trend); + int (*get_trend)(struct tsens_sensor *s, enum thermal_trend *trend); }; #define REG_FIELD_FOR_EACH_SENSOR11(_name, _offset, _startbit, _stopbit) \ @@ -314,8 +312,8 @@ struct tsens_priv { char *qfprom_read(struct device *dev, const char *cname); void compute_intercept_slope(struct tsens_priv *priv, u32 *pt1, u32 *pt2, u32 mode); 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); +int get_temp_tsens_valid(struct tsens_sensor *s, int *temp); +int get_temp_common(struct tsens_sensor *s, int *temp); /* TSENS target */ extern const struct tsens_plat_data data_8960; From patchwork Thu Oct 31 18:37:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 178219 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3242354ill; Thu, 31 Oct 2019 11:38:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqwawq166U/wDqgmPEgLYZCNslOSVNBObmH9UIrTS662nJ6GmMFpcxfKc8qwztWeG9kvXoGt X-Received: by 2002:a50:d717:: with SMTP id t23mr7745878edi.231.1572547081994; Thu, 31 Oct 2019 11:38:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572547081; cv=none; d=google.com; s=arc-20160816; b=m7k5XsDf//dm02K9kySCbX6rSadgigKEJvOUkLoRah7HYOY7M6SuxzHQhszaskCrSb 5/7sWU4TT9nFiJoEwJMozeFAA91IrMsQ7wbZJr73j8gTB72PAU/hvsLKsUvt1KxYgZa9 VwDC15xNS08f5rMrLv1ALwUfwEQ/vqnv87ymyOVJOLCaJODqV422A70eGjXyZ2Hq4ekT mDnTJIY4W5VbMjxZqu4OuBQ6gxQOnPYvYHGNMXsKcjEGsNWn4ptE4BrBtu9IjNG3HuPJ 0JMYshM6nBpcanOONp5vpNySu0kOdofTf3Gfzh/SvyIDI/1RrKn2fT3KrQb5bbx7mfMc tsng== 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:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=BcKGfqptsJMIyqg8m+kdv7mwKKvvYfua8/fbCWYYrS8=; b=ws0AL3ISvkRVqxDeMhm1fumBfiAro/yWhaSQbjBwQtvS79xBO62frVzsymyFpglGqc fWzKWnjHRkNEyl0SkD8ydiA5L0wKpTdU97tOEBRbo9nTTJmCwEmFXZaU27Zp9t5b1+BM bq65jW2vMf8k6/2V2NDemTjFxuspT8q/zNlsFGilfauQtKgxBkhoU8sGzCIveW0JqHj7 mlDMP+RwyH97/sFCmxGx0PRAQP9btl9nR6H+UAVOml1P9ek1euIM1BfI3vpDIxWzgZtT 1gQnJjXfCVnghGVSrzxkdd3YRTcxNHow9hLiV+1tVnCqCrVo7lIPLGH3dcd0eLyLVaqd WnQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yzuWC7Dd; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 m1si4008702ejx.188.2019.10.31.11.38.01; Thu, 31 Oct 2019 11:38:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-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=yzuWC7Dd; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1729405AbfJaSiA (ORCPT + 15 others); Thu, 31 Oct 2019 14:38:00 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:46760 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729374AbfJaSh7 (ORCPT ); Thu, 31 Oct 2019 14:37:59 -0400 Received: by mail-pl1-f196.google.com with SMTP id q21so3057299plr.13 for ; Thu, 31 Oct 2019 11:37:59 -0700 (PDT) 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 :in-reply-to:references; bh=BcKGfqptsJMIyqg8m+kdv7mwKKvvYfua8/fbCWYYrS8=; b=yzuWC7DdKOymjQAIXS3fQpz/AFUyegTPXZiWYggYg5P3og3YOrYbQcc13K4j9/F7uQ 7hopJ+Gyy5MsAFQeGMVaFz7WSVTAQWBLfJ+T5TkFLTjurRkCAD9SXbgiqgP0S66K9OSG cJ9rjMQuiz3+5TzGmdw5xgOc82lXWYwfB4fBTmcvi+OUHRau8VHiADvu80vBzGzPh/Lm u3nrGZIBtRPgS+mVNXOXZSx5mfyPbr0maiB80XTi0eFoEsp3VKW0Cws1uCudUxG3rKqs 2BhXDJDV6z4X8NCLPnRP2yNCia8eNBrW5quyHRQMXq0XWFm76OhsTd3iCAHvWpN6DQWm ubbg== 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:in-reply-to:references; bh=BcKGfqptsJMIyqg8m+kdv7mwKKvvYfua8/fbCWYYrS8=; b=SiXMChXYPxeiGnF8Yr6mffckep9yDOMH3a4WkEJFgYrS8yUEwSZWbANYFSKDiYtG0T jm0fSySXdk57eTsorYJqQWvoH0BB+NAW3wQ6edzdVlhAy5cYI90DwpKAIlML9ZfH6OJf +g4MBd+X3RqY0HGOQQbrWmCeiME9B9A9dmSyrr6yN/mqFC1dvrf3xA+cRMDzf8aluIt6 NyS92Um92kJqPXte3lRgV3Y144zZMl0CuU+J91gxabRH7mMyXEmmMMLRxuFEpBmWvAj1 1YKXAMLRRKKCaFM39VY6tdM8SSwJWedZ64jZCmMzTsmMMHuCASKf60I+iHLadkk4nRDF iUbg== X-Gm-Message-State: APjAAAXuTVhLoRv41163gZiRazzVGIMjwZ3tsX1iXAew7vOmactuSYZk im/yo4P1WsTIBNavHBqNoIJYAw== X-Received: by 2002:a17:902:b7cb:: with SMTP id v11mr116253plz.176.1572547078664; Thu, 31 Oct 2019 11:37:58 -0700 (PDT) Received: from localhost ([49.248.58.234]) by smtp.gmail.com with ESMTPSA id t15sm4237531pfh.31.2019.10.31.11.37.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Oct 2019 11:37:58 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, agross@kernel.org, masneyb@onstation.org, swboyd@chromium.org, julia.lawall@lip6.fr, Amit Kucheria , Daniel Lezcano , Mark Rutland , Rob Herring , Zhang Rui Cc: linux-pm@vger.kernel.org Subject: [PATCH v7 02/15] drivers: thermal: tsens: Simplify code flow in tsens_probe Date: Fri, 1 Nov 2019 00:07:26 +0530 Message-Id: <184422dcc1c12553e71a58c62e01425fd7d1172a.1572526427.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Move platform_set_drvdata up to avoid an extra 'if (ret)' check after the call to tsens_register. Signed-off-by: Amit Kucheria Reviewed-by: Stephen Boyd Reviewed-by: Daniel Lezcano --- drivers/thermal/qcom/tsens.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) -- 2.17.1 diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index 6ed687a6e53c..542a7f8c3d96 100644 --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c @@ -149,6 +149,8 @@ static int tsens_probe(struct platform_device *pdev) priv->feat = data->feat; priv->fields = data->fields; + platform_set_drvdata(pdev, priv); + if (!priv->ops || !priv->ops->init || !priv->ops->get_temp) return -EINVAL; @@ -167,11 +169,7 @@ static int tsens_probe(struct platform_device *pdev) } } - ret = tsens_register(priv); - - platform_set_drvdata(pdev, priv); - - return ret; + return tsens_register(priv); } static int tsens_remove(struct platform_device *pdev) From patchwork Thu Oct 31 18:37:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 178223 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3242706ill; Thu, 31 Oct 2019 11:38:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqwePi9cnV0GTXuc4f/XVPfADgAysRg4s5OSzUfG3H9iUHL3XyWIxUe+n12Cg2HPhl/5aIrL X-Received: by 2002:a05:6402:b06:: with SMTP id bm6mr8004748edb.160.1572547098182; Thu, 31 Oct 2019 11:38:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572547098; cv=none; d=google.com; s=arc-20160816; b=F7hdBbUQYbN//ZCfL+CYX/RcwHVV2B0XzymGmvwKnwnWUpDCMZJ+OtreAq87ROstpU T5DK9QH2MCwEeLhfFkh+mPo5y5PSBfOjH4EIsQhegIy4BLsY5VNNk61I44uNET23u9n5 LduhHkJK2UI618Aovb5B2VxDgqaYyrEzuvZoAIAgroMwi+1nFjbpJkkgHbifzxZfE3aY wqtCOZ5x6YYYyozIPP8Z3ReyFMMjob682UCxokDEvh+WW8UiksfXYLFiltoi6peGppUK T0fd1B4hPbcblH8CAEjNb+DBLBAkQDZH1ZbVS4FTMTfxA7xuPTKqt2RF3K+OOgLbzx+Z oklA== 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:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=3aqllZnhirWen18NJ9rLavBCP+/YOWA9zZa8CCtZyTg=; b=RsgPGk/xPKzXxiwjvom/Vj7+yLYiJOQMgQHCfRK6HqND9NoMw4WEaNbmWp0ndiUNc9 5d8Y8h4Fnj3MhVdI1gjgKdOvTGQPXncqRsmdP474eW2O4H2SGQQYnBYgKu05BSW6JN+L iMi1LGQv5TFOQHSQCtmfrIUzXp0Fs5UPJ2lmPGcXHyNP+rw3ai17KQy4Tz4IHLFM4c9f +l+8bzxVYuOaOCHdfezyWVOLJiia2tY/j4Lgrjl3m6nWtDDZJwR0uyJPlJf34a7ZExh9 7+e4AqePw8fWTuPWd1+oR1XcDPK5/YlQnTx53uTdHKztiE7PPn+gyxAMb/UXshxdVJ+I iESw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=o+V8mfJn; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 w25si4593748edl.418.2019.10.31.11.38.18; Thu, 31 Oct 2019 11:38:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-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=o+V8mfJn; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1729453AbfJaSiR (ORCPT + 15 others); Thu, 31 Oct 2019 14:38:17 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:40927 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729429AbfJaSiQ (ORCPT ); Thu, 31 Oct 2019 14:38:16 -0400 Received: by mail-pg1-f193.google.com with SMTP id 15so4598676pgt.7 for ; Thu, 31 Oct 2019 11:38:15 -0700 (PDT) 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 :in-reply-to:references; bh=3aqllZnhirWen18NJ9rLavBCP+/YOWA9zZa8CCtZyTg=; b=o+V8mfJnGcNRBIysUz3ogBIYyeQLpvCAokFHFk3CcXJmiW1VMtm8jwXgA9ITcdbOCI dpipZiut4ELq+5dqxkkwzdTUrXo7h8QuxnXI7Gk9WFX9dM0I01JlXFDJ26LjFH/S9WFm 0OpbVc819QkOksWL7iNk56Dz0bIIFCZHmNaCURmU4P6hhV839a0frnrjNgJBdQxEqJI0 L98/m2btd3eRB44eNjWZcgdA89ZGW1DpgTK8oZ3bImEfQmqlBIL/h74wiRaJWWgUspXO qrXrNDh7dmNhxFZzL8ZmQcDW/K9VCUYJ4Wd/NbDhtvguNXKWvXIbKRbCvsVDTcKKhCH8 hSYQ== 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:in-reply-to:references; bh=3aqllZnhirWen18NJ9rLavBCP+/YOWA9zZa8CCtZyTg=; b=d2XFd9gP1Pi1SppiQA79uPWAREHfIQFtg5mZgR3ZZmhSEifFUQsW1qwSLhHS2Nck9I cKTmGRZXg9ddc+HEIqMaM6XmQOIEHnrhkprgA4P/xgknGSEGJO9Y30a9Uj55HrflRrt5 5ydHepmUbMeUjxjF+V7a5sLeR7OTO3X0XW9K15sgyEcNHUHxJs6iwNhFxlvX+os3vJuf YgDwYBIUKV2ZsfVVp1XJYMae34S5ZesL9jqXdy93NBO7JuZIN35tvaaNEM0RcKP1SACA a2Hievi6rMFwyxeT6Bf14UHJC41eh7bK9DIxUCwACJv8DSd8FOs9YG1LRG9LwSfAzrPc RYAA== X-Gm-Message-State: APjAAAVfeE4dEdQFwycA3gwcdj2rC7HC8XTtE7jHmv1VcZh2K+ppBFZK qEGXy2WhBuTkq78d4sETwpFsVA== X-Received: by 2002:a17:90a:9201:: with SMTP id m1mr9657985pjo.42.1572547095176; Thu, 31 Oct 2019 11:38:15 -0700 (PDT) Received: from localhost ([49.248.58.234]) by smtp.gmail.com with ESMTPSA id c34sm4206329pgb.35.2019.10.31.11.38.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Oct 2019 11:38:14 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, agross@kernel.org, masneyb@onstation.org, swboyd@chromium.org, julia.lawall@lip6.fr, Amit Kucheria , Daniel Lezcano , Mark Rutland , Rob Herring , Zhang Rui Cc: devicetree@vger.kernel.org Subject: [PATCH v7 06/15] arm64: dts: msm8916: thermal: Fixup HW ids for cpu sensors Date: Fri, 1 Nov 2019 00:07:30 +0530 Message-Id: <1726fdbf7cf7200ac5dc2a4c811aaee7edc47fd5.1572526427.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org msm8916 uses sensors 0, 1, 2, 4 and 5. Sensor 3 is NOT used. Fixup the device tree so that the correct sensor ID is used and as a result we can actually check the temperature for the cpu2_3 sensor. Signed-off-by: Amit Kucheria Reviewed-by: Daniel Lezcano Reviewed-by: Stephen Boyd --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index 5ea9fb8f2f87..8686e101905c 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -179,7 +179,7 @@ polling-delay-passive = <250>; polling-delay = <1000>; - thermal-sensors = <&tsens 4>; + thermal-sensors = <&tsens 5>; trips { cpu0_1_alert0: trip-point@0 { @@ -209,7 +209,7 @@ polling-delay-passive = <250>; polling-delay = <1000>; - thermal-sensors = <&tsens 3>; + thermal-sensors = <&tsens 4>; trips { cpu2_3_alert0: trip-point@0 { From patchwork Thu Oct 31 18:37:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 178225 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3242860ill; Thu, 31 Oct 2019 11:38:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqzvbmKFFClVuhre1fvH5grJruoesI1QG6NOPuPHkoBV5iZsLjMJhJ5ha4Dvz/C3c6BwJqf/ X-Received: by 2002:a17:906:76c9:: with SMTP id q9mr5688025ejn.53.1572547107188; Thu, 31 Oct 2019 11:38:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572547107; cv=none; d=google.com; s=arc-20160816; b=ZUvZRpBDJRbY/N1sQieo5btRyfvt163K6ZV7v0gflbSTEs2uDlT9v5PEkwUAGXU9O9 juOgMxx/9lIi3NHL4KmzzZB2EBPYG995edPufZIfm0RFO8uz4kVlwZc8YrNtJEneWkZA xHzCKeuYGafoYTQpu0/IKZm/91pod5q22vXxr+Y+CEu0i7NU5eyObZtTk8xt2vQzaUn5 NN677JhPUJOuSb+NCjodwRzyhik86mEf2Sjyi88pdG47MXsTFFxcc6ASHQckI/6TLWSB Xq22rTH5IiVV7JO0xQZVMz9gvk0Ka4PgNyB4qSi4j0/ldpW9EOSVLMmYWCOwe2fcoyLe Btpw== 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:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=G1RY5BCmh8InAkONRa9lruWuMsHWqlSh2+WDeebx0SM=; b=PPDZGG9lWOk+VwdZTphKSRqZv58c9DcuCvJZAXw9vz8YHwohHyVTm/7Mby9uDqqymf jp7nuO6ynxVakSSmeph0t7AEF/M3TYc7crmYycGb7uSkRgpm4PRMQ7af7lN/vMxyjw0u +uF/LQCGnjMWLARS2YtPjdK6gk8hdfAyRTqdPqdKd8mF/QXPo/TflvMyONRUsPgcv6yW d3uZqAyxWoAP8LDJ8JnkiZIYicUOlmTPxU3z8EU6NG8PLLkAHoj3aoJE38oZWg/1ACzU RzlK5nV3WayLect0ohYajCDlXJVz2Y3wrfpG8SNpAGSRcI7mzK+Q6wKrwtjDFgSZPf9a aW7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=m98kdvgI; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 m9si4055588ejo.46.2019.10.31.11.38.27; Thu, 31 Oct 2019 11:38:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-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=m98kdvgI; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1729482AbfJaSiZ (ORCPT + 15 others); Thu, 31 Oct 2019 14:38:25 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:46782 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729465AbfJaSiZ (ORCPT ); Thu, 31 Oct 2019 14:38:25 -0400 Received: by mail-pl1-f193.google.com with SMTP id q21so3057776plr.13 for ; Thu, 31 Oct 2019 11:38:24 -0700 (PDT) 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 :in-reply-to:references; bh=G1RY5BCmh8InAkONRa9lruWuMsHWqlSh2+WDeebx0SM=; b=m98kdvgI2S5N3BmltWHCwwfREQrCi3jfMjxrtZJQoT4Vuf7vAtpC/4SgaAghY1rIHz W5SlSO1a8egz+YPhwpCV2VFbOQI3JetjehPvT/rZcRaCMRYWQDl01crsyaz7YKQUwp3c uuZZVRFQWcRyEFxVU5DlE3VQ658SZxumOVmIIiCSydl8KrV0t4/iuNuiVWgMNBGcTwNK LDQKWnC+3Hv/1GDr91mhI9Svv6FFJOiTNy1KJAw59kmD6Qj6bw5gAabaHBEy3NRwdCVW zWru3O2N7V8t5tP3q7SCgoZe8xM0ApLmS8Jr+nI9PBp0PzsmnI2cBAE4LNTw/32CsT0C Skug== 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:in-reply-to:references; bh=G1RY5BCmh8InAkONRa9lruWuMsHWqlSh2+WDeebx0SM=; b=djFXMBxRPIO8f12bhofOVGV+WfR7q0EWTVf4ZbnQ64x8K0WoLuxYp+ShETlZBG+b4E pdpkUMk43vXoTAAdB2F6bP+I7+Ircq02cw5gzV7KnxjPkV/vL6cL7/ZCu6XL736sFLL7 gSGMMGT7RhjbZVSVElpmuVej60CY6/MaU1ANvMEtycAA0n2f8QJfjTzqTdcvqVIhcZSK x1q6ztDFzyq8t41rd37USb9IIxMM57DIbnR7+XC2ibwePE/IS5K5gD6d1flzZOTGjYa/ xPvX37uRMU3SEPZHP685v4Lp+sfi8MY6bSTRIav17xy1eVG4boeILMtcioE+WEuWNhLG fEbg== X-Gm-Message-State: APjAAAWT4GMsLQm8rT5YPPqSpnIkYHoQ7TsskAokNcC4482SuGt5hIfi Ft8J+5v7KoVPV9BApWdpZu/76J5BjcnKwQ== X-Received: by 2002:a17:902:6802:: with SMTP id h2mr7814361plk.135.1572547104331; Thu, 31 Oct 2019 11:38:24 -0700 (PDT) Received: from localhost ([49.248.58.234]) by smtp.gmail.com with ESMTPSA id d4sm6747792pjs.9.2019.10.31.11.38.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Oct 2019 11:38:23 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, agross@kernel.org, masneyb@onstation.org, swboyd@chromium.org, julia.lawall@lip6.fr, Amit Kucheria , Daniel Lezcano , Mark Rutland , Rob Herring , Zhang Rui Cc: devicetree@vger.kernel.org Subject: [PATCH v7 08/15] arm64: dts: sdm845: thermal: Add interrupt support Date: Fri, 1 Nov 2019 00:07:32 +0530 Message-Id: <5a96df48e546576f90081bbde218e7cff88ae8ce.1572526427.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Register upper-lower interrupts for each of the two tsens controllers. Signed-off-by: Amit Kucheria Reviewed-by: Stephen Boyd --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 4 ++++ 1 file changed, 4 insertions(+) -- 2.17.1 diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index f406a4340b05..0990d5761860 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -2950,6 +2950,8 @@ reg = <0 0x0c263000 0 0x1ff>, /* TM */ <0 0x0c222000 0 0x1ff>; /* SROT */ #qcom,sensors = <13>; + interrupts = ; + interrupt-names = "uplow"; #thermal-sensor-cells = <1>; }; @@ -2958,6 +2960,8 @@ reg = <0 0x0c265000 0 0x1ff>, /* TM */ <0 0x0c223000 0 0x1ff>; /* SROT */ #qcom,sensors = <8>; + interrupts = ; + interrupt-names = "uplow"; #thermal-sensor-cells = <1>; }; From patchwork Thu Oct 31 18:37:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 178226 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3242953ill; Thu, 31 Oct 2019 11:38:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqxE4Q/qKAnTL8IxO+B5vnxAzpzJuA+tav3eQeRuFH1+IA0nd0fadfxWWiSti2aLaDYdDZ1I X-Received: by 2002:a17:906:2ada:: with SMTP id m26mr5682749eje.87.1572547111136; Thu, 31 Oct 2019 11:38:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572547111; cv=none; d=google.com; s=arc-20160816; b=TRKtsiHiwKA6Jv3F65SjTL59oyDZL1i8y24biZ8niRiPnzQ/Zo57/CMk6ASvzB8/74 wikKbKa5RmTX1EEk2kuQ2UvjHGBiA1+IMLzwSCQw9i5DYlb30D3g6hYhvUMxHWxELoru 20DgZFRvIA3wXMdCnW+cZTac1Bu6RSkcIkpuT4YSYW5NxCbBZyXuD6OhCmeY0wBc/2VU /gN70tdvfeJsq+tCj5KnTbaO3zHLG465NRrYIDD2388kdL5i4M+z95HG5PBIinsrfCER ui2M3tzSqJGvnYqtIEPkpak7DQFKzo0RDOSfmBtKsojQl9+IctJ/qD1YL9D0Btcjr1j1 DNQg== 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:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=4K812X2lC+GYM/4odmaRwgr1rxs2vpAuXCpq25weRAs=; b=UCoIky8nBV2ieMDbms/BFO83APsDMJv3o0XBVKhXPvvn/4hBjr+cIva0zb/sUukMqy 0WaSiQiqkyCTHSLWOZT3I+0GxsFBB85uJA57jBRAVIzVkVcf4lyKk6QssVKa/M39gvBL ftJxp/Quq/99rA3ybzvE1A9Qhm+nBNN1bcJyQCcr71C2B7s2krFHlIEvbrUtXrPao1TE w1xanMVfOgB/msIqjXRIQg/grgMHi1nqXJkFLR6mmSrBYkiWxpVmGqx1wvkyRObLwu4d 0SrLZy+Znvergq6wjUCWaYKA8ZlV6Ze0HvfWNNJYjT01c2xK9zL3RqozKB4KqmFnequL QRzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gFcDJKmd; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 p5si4162638eja.141.2019.10.31.11.38.30; Thu, 31 Oct 2019 11:38:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-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=gFcDJKmd; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1729318AbfJaSi3 (ORCPT + 15 others); Thu, 31 Oct 2019 14:38:29 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:46253 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729495AbfJaSi3 (ORCPT ); Thu, 31 Oct 2019 14:38:29 -0400 Received: by mail-pf1-f194.google.com with SMTP id 193so3663955pfc.13 for ; Thu, 31 Oct 2019 11:38:28 -0700 (PDT) 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 :in-reply-to:references; bh=4K812X2lC+GYM/4odmaRwgr1rxs2vpAuXCpq25weRAs=; b=gFcDJKmdzDCTCrN5Bqc0J9Wxg5iBuZks5LfR8jEOR51AqOkrUdSqL2jW9DO736IDrR 5kv5ZKmMWMllB9GeqdtlSY8XL+y7S4xPg20W3Ob9XI+/3mrZsHXk/JeF6kMCTbWkL7bC jIpqxxlmvlM9gw8JjoECQUwU9rDZT5gWNGBKS2MrHlaT6AKGppA9Txt90Rx3I/D1feJF Z15u1LXHS+CPcKr4O+Iac2L4TzMC+V4bzeR83kB/WCL4TzZuw5rr3NHm7C/lUAXFBSbV lguSwIuIta+j7mpJ5XPHK6g3yd+NE6JXsZCwEKzpliO3RRCcBLOxggFBIBhLHlS7Gjwn MlUA== 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:in-reply-to:references; bh=4K812X2lC+GYM/4odmaRwgr1rxs2vpAuXCpq25weRAs=; b=gO6SJPHCz/nDcOaV+hHWK02MaIu0wOBrVSeoVY7rCu17PCIdz6XanAszz/Gp5wmhqJ TjxAH4SZd+Vjb74QQ7HhPQWsf0sdW5mRxrEdqVdJNG17KFfHh+JrR+Fpe66b5YrmWX6q weDicy4BDNjW6Eti3zP8h5y9YrMEQbx/b15X9DAkZtVUBRLFlEqvN2TAlWSvGXerNozq MSN4edBUun0FwUC5D8m+3BHdLz5JESNRQdHJQXRvrnBI75guPRRVNMIt6J185XghXpPo JgDXjREAZK7N6G5ZFOAU8Dub0qsUIDdXy5ePi+jOqO0TU/aARMzMhCXsVz0riRUEY4AT 38kA== X-Gm-Message-State: APjAAAWFXD2n7BMjPISz095XG0GCQrrf2Q/XaxyasgoXOlENeFqkJB+U 7Z0TFwKaS89oMXxxC5BX8tt0ug== X-Received: by 2002:a17:90a:6346:: with SMTP id v6mr9395570pjs.4.1572547108492; Thu, 31 Oct 2019 11:38:28 -0700 (PDT) Received: from localhost ([49.248.58.234]) by smtp.gmail.com with ESMTPSA id b26sm4073620pfo.179.2019.10.31.11.38.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Oct 2019 11:38:27 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, agross@kernel.org, masneyb@onstation.org, swboyd@chromium.org, julia.lawall@lip6.fr, Amit Kucheria , Daniel Lezcano , Mark Rutland , Rob Herring , Zhang Rui Cc: devicetree@vger.kernel.org Subject: [PATCH v7 09/15] arm64: dts: msm8996: thermal: Add interrupt support Date: Fri, 1 Nov 2019 00:07:33 +0530 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Register upper-lower interrupts for each of the two tsens controllers. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/msm8996.dtsi | 4 ++++ 1 file changed, 4 insertions(+) -- 2.17.1 diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi index 87f4d9c1b0d4..4ca2e7b44559 100644 --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi @@ -591,6 +591,8 @@ reg = <0x4a9000 0x1000>, /* TM */ <0x4a8000 0x1000>; /* SROT */ #qcom,sensors = <13>; + interrupts = ; + interrupt-names = "uplow"; #thermal-sensor-cells = <1>; }; @@ -599,6 +601,8 @@ reg = <0x4ad000 0x1000>, /* TM */ <0x4ac000 0x1000>; /* SROT */ #qcom,sensors = <8>; + interrupts = ; + interrupt-names = "uplow"; #thermal-sensor-cells = <1>; };