From patchwork Tue Feb 18 18:12:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 212815 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5167DC34047 for ; Tue, 18 Feb 2020 18:12:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2E89124655 for ; Tue, 18 Feb 2020 18:12:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="W268SDix" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726651AbgBRSM3 (ORCPT ); Tue, 18 Feb 2020 13:12:29 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:46025 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726609AbgBRSM2 (ORCPT ); Tue, 18 Feb 2020 13:12:28 -0500 Received: by mail-pl1-f196.google.com with SMTP id b22so8383251pls.12 for ; Tue, 18 Feb 2020 10:12:28 -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=ZKYoguQk13R1R6X/M6A9IECv/eepHjjlH+2aj8UhmqM=; b=W268SDix97CRWyl+d0m85sr5bFwu72b2+9zePGaxrsUCg5VAjYivguyWHDaPGajrM+ fJqMSqkgdGWwdXy3eYD2Qbv5WZ42Smj1AVAFAgVePj6qZg6qD4ASb3ZRhjNGl8KiCWjG W1NR9WrNqrIzNA5vXMQ/rwb2jgINDLfcfe12Lo4azuzGlQARbNdw+J1ScWFu/KhMHGIa xKNGVCD6VmuvgK9rrOktH/EqSjYkdcTDRlneUPTWnD5WUQblBR9bGrfiHZPqJ93Tgi8r rcDTLUJO3SDfFG2OGyqILKvCsndyBqv2h0e/mrr6733q3bZvyV03OOWDKMqwMHtX1vXn je0w== 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=ZKYoguQk13R1R6X/M6A9IECv/eepHjjlH+2aj8UhmqM=; b=RUFIbv9sNiYgHeH5znObP8h+/vnytT8wfHh3nXP6F/Omp0s06meZm9U/GrC0/tGfic /W/CAJyUFsO0d2Xo/LHJXIhaG9QFMkUJETTaF4Nru2eUWtzRX/IRh5e/DpFu3xEL5wuA ohSSzIdCrQ2aa1CW+9wJ0FfU7NzRSViyat/saKyY2mC0cSMF6wLypSt9LOImGAyBLIHi ETlZuDWi/7vVz7aOoSRnfPHdfkncM27LKcFQZJMAEnhVRxAU0+h+80KYIpNv9Bj33t6+ YRXPme71VAFVT/YsqpfrmlXtN6yft0ZOSWHWyET/lbFPq+mTualkf8IibVa55NeJJhVS f1iA== X-Gm-Message-State: APjAAAX511W4CxcYNuynRc9qtfSQiz0Lj/HzdB+Rasg8xY5anol4L6V/ mxWbJIulJG0jM7vElsd6VTfI6g== X-Google-Smtp-Source: APXvYqwlohYw/lEoFIgrL8HOrHiCAH3DKWh2vpNzoHIEq965sJTl1xtu+Y6INsZjy2qs/EPR4tUpKQ== X-Received: by 2002:a17:90a:af81:: with SMTP id w1mr4288662pjq.14.1582049547643; Tue, 18 Feb 2020 10:12:27 -0800 (PST) Received: from localhost ([103.195.202.120]) by smtp.gmail.com with ESMTPSA id gc1sm4068991pjb.20.2020.02.18.10.12.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 10:12:26 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, daniel.lezcano@linaro.org, bjorn.andersson@linaro.org, swboyd@chromium.org, sivaa@codeaurora.org, Andy Gross Cc: Amit Kucheria , linux-pm@vger.kernel.org Subject: [PATCH v5 2/8] drivers: thermal: tsens: Pass around struct tsens_sensor as a constant Date: Tue, 18 Feb 2020 23:42:06 +0530 Message-Id: <57f5fd302213d30b53d9d6b3624758180e8df48b.1582048155.git.amit.kucheria@linaro.org> 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 All the sensor data is initialised at init time. Lock it down by passing it to functions as a constant. Signed-off-by: Amit Kucheria Reviewed-by: Bjorn Andersson --- drivers/thermal/qcom/tsens-8960.c | 2 +- drivers/thermal/qcom/tsens-common.c | 14 +++++++------- drivers/thermal/qcom/tsens.h | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/thermal/qcom/tsens-8960.c b/drivers/thermal/qcom/tsens-8960.c index a383a57cfbbc..2a28a5af209e 100644 --- a/drivers/thermal/qcom/tsens-8960.c +++ b/drivers/thermal/qcom/tsens-8960.c @@ -245,7 +245,7 @@ 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_sensor *s, int *temp) +static int get_temp_8960(const struct tsens_sensor *s, int *temp) { int ret; u32 code, trdy; diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers/thermal/qcom/tsens-common.c index c8d57ee0a5bb..c2df30a08b9e 100644 --- a/drivers/thermal/qcom/tsens-common.c +++ b/drivers/thermal/qcom/tsens-common.c @@ -128,7 +128,7 @@ static inline int code_to_degc(u32 adc_code, const struct tsens_sensor *s) * Return: Temperature in milliCelsius on success, a negative errno will * be returned in error cases */ -static int tsens_hw_to_mC(struct tsens_sensor *s, int field) +static int tsens_hw_to_mC(const struct tsens_sensor *s, int field) { struct tsens_priv *priv = s->priv; u32 resolution; @@ -160,7 +160,7 @@ static int tsens_hw_to_mC(struct tsens_sensor *s, int field) * * Return: ADC code or temperature in deciCelsius. */ -static int tsens_mC_to_hw(struct tsens_sensor *s, int temp) +static int tsens_mC_to_hw(const struct tsens_sensor *s, int temp) { struct tsens_priv *priv = s->priv; @@ -275,7 +275,7 @@ static int tsens_threshold_violated(struct tsens_priv *priv, u32 hw_id, } static int tsens_read_irq_state(struct tsens_priv *priv, u32 hw_id, - struct tsens_sensor *s, struct tsens_irq_data *d) + const struct tsens_sensor *s, struct tsens_irq_data *d) { int ret; @@ -346,10 +346,10 @@ irqreturn_t tsens_irq_thread(int irq, void *data) for (i = 0; i < priv->num_sensors; i++) { bool trigger = false; - struct tsens_sensor *s = &priv->sensor[i]; + const struct tsens_sensor *s = &priv->sensor[i]; u32 hw_id = s->hw_id; - if (IS_ERR(priv->sensor[i].tzd)) + if (IS_ERR(s->tzd)) continue; if (!tsens_threshold_violated(priv, hw_id, &d)) continue; @@ -457,7 +457,7 @@ void tsens_disable_irq(struct tsens_priv *priv) regmap_field_write(priv->rf[INT_EN], 0); } -int get_temp_tsens_valid(struct tsens_sensor *s, int *temp) +int get_temp_tsens_valid(const struct tsens_sensor *s, int *temp) { struct tsens_priv *priv = s->priv; int hw_id = s->hw_id; @@ -486,7 +486,7 @@ int get_temp_tsens_valid(struct tsens_sensor *s, int *temp) return 0; } -int get_temp_common(struct tsens_sensor *s, int *temp) +int get_temp_common(const struct tsens_sensor *s, int *temp) { struct tsens_priv *priv = s->priv; int hw_id = s->hw_id; diff --git a/drivers/thermal/qcom/tsens.h b/drivers/thermal/qcom/tsens.h index be364bf1d5a6..70dc34c80537 100644 --- a/drivers/thermal/qcom/tsens.h +++ b/drivers/thermal/qcom/tsens.h @@ -67,7 +67,7 @@ struct tsens_ops { /* mandatory callbacks */ int (*init)(struct tsens_priv *priv); int (*calibrate)(struct tsens_priv *priv); - int (*get_temp)(struct tsens_sensor *s, int *temp); + int (*get_temp)(const struct tsens_sensor *s, int *temp); /* optional callbacks */ int (*enable)(struct tsens_priv *priv, int i); void (*disable)(struct tsens_priv *priv); @@ -494,8 +494,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_sensor *s, int *temp); -int get_temp_common(struct tsens_sensor *s, int *temp); +int get_temp_tsens_valid(const struct tsens_sensor *s, int *temp); +int get_temp_common(const struct tsens_sensor *s, int *temp); int tsens_enable_irq(struct tsens_priv *priv); void tsens_disable_irq(struct tsens_priv *priv); int tsens_set_trips(void *_sensor, int low, int high); From patchwork Tue Feb 18 18:12:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 212814 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3429C3404C for ; Tue, 18 Feb 2020 18:12:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A666C21D56 for ; Tue, 18 Feb 2020 18:12:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="XYBtK0lD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726682AbgBRSMe (ORCPT ); Tue, 18 Feb 2020 13:12:34 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:38923 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726645AbgBRSMe (ORCPT ); Tue, 18 Feb 2020 13:12:34 -0500 Received: by mail-pf1-f196.google.com with SMTP id 84so11045726pfy.6 for ; Tue, 18 Feb 2020 10:12:32 -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=2g1a3kPECY0SwtktiXEAx2+VymT6TSEtxyFnQIHuwSE=; b=XYBtK0lDc+i9XpbQ3KXGLCZs9+u+sWHPT6T1LmGaOCH7G1NQ5X5lSoJgPuZZfK2O+L puVxOcavVuwMQ7t9EoegMH26Oac5NZWdOyuwj2HrWhbNiRuJTvRc4At3YOjl8my0totF ALzpbFhLtsHPUndNqscINNHtp0dTGHMw63/GI2GPTC5/5+MWCwx/MJwTyJaebzSQwdpP JVQhS4wb7Q3gS7yvcfBn8wE8ril+TnjldyzhsFDEJU/4esxNeEr70ODYfC3tYzy+LTHj /KmWUEflKZIwy2NZC+4zbmwYL5OUxqivWoRsv9gSeoccGCi8n7C76cAmNWyOIMWD6nrh tq2w== 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=2g1a3kPECY0SwtktiXEAx2+VymT6TSEtxyFnQIHuwSE=; b=PBkbLpJmFqzr3QFiG+HA02JGag0wiXAUxvbxFsqEr/m2IuzRR+FKclMafPCkk+jWyL 0lQ9QWw0xlSpohLaqV+XXjTVYwk0afovdDH+0mulHq9q+TyqX0U6SK8xdqkndL86YXdz rUOMUbAqsRwe8PBlOPEbulPgObAyWrZhparYHRpXE3fcZOL+fuMs70GWLnpsb/frofgg 4YGxujmBP+/DsGaby3R6f51A3u0WJ1aGmMK/Dmw6Uhpk0zYOCP0cqMg//FO7iucEkoRB 8BlZvCyPZiuB40opZ+Vzf4u4Wq/Pm0EXlyEE9KZQEyhShksw6EghmPNcE5JHMYPj4WJl weSQ== X-Gm-Message-State: APjAAAWnym7wQlXuY//7Q3J+T+3clRCBGh6JgJ7qAODkXM5xl3eWJx0t DHdAc0ludzQdmS5sELLngXRNow== X-Google-Smtp-Source: APXvYqx8P2zCz7bhavy9435/1qyFLHOrPScTrC7ZsvvXMwAlxLnGR9dlBAapR9f63mzLt/nZpsugtg== X-Received: by 2002:a62:4e4e:: with SMTP id c75mr18956427pfb.227.1582049552272; Tue, 18 Feb 2020 10:12:32 -0800 (PST) Received: from localhost ([103.195.202.120]) by smtp.gmail.com with ESMTPSA id 11sm5012088pfz.25.2020.02.18.10.12.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 10:12:30 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, daniel.lezcano@linaro.org, bjorn.andersson@linaro.org, swboyd@chromium.org, sivaa@codeaurora.org, Andy Gross Cc: Amit Kucheria , linux-pm@vger.kernel.org Subject: [PATCH v5 3/8] drivers: thermal: tsens: use simpler variables Date: Tue, 18 Feb 2020 23:42:07 +0530 Message-Id: <6f95b3f0d39433c7e6b01094bdb200a7ac8e9f0d.1582048155.git.amit.kucheria@linaro.org> 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 We already dereference the sensor and save it into a variable. Use the variable directly to make the code easier to read. Signed-off-by: Amit Kucheria Reviewed-by: Bjorn Andersson --- drivers/thermal/qcom/tsens-common.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers/thermal/qcom/tsens-common.c index c2df30a08b9e..1cbc5a6e5b4f 100644 --- a/drivers/thermal/qcom/tsens-common.c +++ b/drivers/thermal/qcom/tsens-common.c @@ -368,7 +368,7 @@ irqreturn_t tsens_irq_thread(int irq, void *data) tsens_set_interrupt(priv, hw_id, UPPER, disable); if (d.up_thresh > temp) { dev_dbg(priv->dev, "[%u] %s: re-arm upper\n", - priv->sensor[i].hw_id, __func__); + hw_id, __func__); tsens_set_interrupt(priv, hw_id, UPPER, enable); } else { trigger = true; @@ -379,7 +379,7 @@ irqreturn_t tsens_irq_thread(int irq, void *data) tsens_set_interrupt(priv, hw_id, LOWER, disable); if (d.low_thresh < temp) { dev_dbg(priv->dev, "[%u] %s: re-arm low\n", - priv->sensor[i].hw_id, __func__); + hw_id, __func__); tsens_set_interrupt(priv, hw_id, LOWER, enable); } else { trigger = true; @@ -392,7 +392,7 @@ irqreturn_t tsens_irq_thread(int irq, void *data) if (trigger) { dev_dbg(priv->dev, "[%u] %s: TZ update trigger (%d mC)\n", hw_id, __func__, temp); - thermal_zone_device_update(priv->sensor[i].tzd, + thermal_zone_device_update(s->tzd, THERMAL_EVENT_UNSPECIFIED); } else { dev_dbg(priv->dev, "[%u] %s: no violation: %d\n", @@ -435,7 +435,7 @@ int tsens_set_trips(void *_sensor, int low, int high) spin_unlock_irqrestore(&priv->ul_lock, flags); dev_dbg(dev, "[%u] %s: (%d:%d)->(%d:%d)\n", - s->hw_id, __func__, d.low_thresh, d.up_thresh, cl_low, cl_high); + hw_id, __func__, d.low_thresh, d.up_thresh, cl_low, cl_high); return 0; } From patchwork Tue Feb 18 18:12:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 212813 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15DDCC34049 for ; Tue, 18 Feb 2020 18:12:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E429724649 for ; Tue, 18 Feb 2020 18:12:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="cZf5qStk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726772AbgBRSMu (ORCPT ); Tue, 18 Feb 2020 13:12:50 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:34139 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726734AbgBRSMt (ORCPT ); Tue, 18 Feb 2020 13:12:49 -0500 Received: by mail-pf1-f193.google.com with SMTP id i6so11066335pfc.1 for ; Tue, 18 Feb 2020 10:12:48 -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=tzP6DDxjNOEcRZc6aP2dcvH1CJqWKtefu5asJA+DstU=; b=cZf5qStkhDbF+2285LVwTF25BVh9UjH/fnLeRooy56tUNVAhSwMt3dFT7KK5QHfbKn YOa5d7141qV+nMVIFog2MWchsku1UWXSC14D8Z7+Zt9t+EBvT9fytkk/dcq9kegDWOi6 G5kiHKRudS09kb7+8HVKHOSvnTemXYK4JBUwdnuTBosulCv1XxM9dRcqTKuI4f9BAGnb 3cn7d5GHivpsGz4GZdP+jtxsV06IKzBiGEmuRob0eDLeeWJkvIpqjEpE+qbhZEpgVxCC v6vjaZzp3/XALSSX2zxRJvS/139lii4oiJGEn8XFs9blYtIuhqVShVLBKpcu5/ZvlcH/ zguw== 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=tzP6DDxjNOEcRZc6aP2dcvH1CJqWKtefu5asJA+DstU=; b=T4b05qrs6mHGW+bg1ZqKCCJmRe0I5QBhhL+UmkqyVHMZWjX0yMOIcIShzWha0v/dCk MmwgQun/31a4gd21wdRDudDO+uNTg7NsCxXM9nyb8uiugDjW6nXOStOxc5AcYi+WBGhT nkR5b4UCw8w0vTB0C5iZg2krY98VnQo9C8Z+jwjAUIcw0I2bxtISBtxDJB0uORbN6PAm BLvZf3x53Hz3z9BWWB6tTA6txZxEtzPFTvreKFC5CPBAHNU/YrjOrkwZmrS3AXDFQrjz FYTNcE/fa+737Go6VGxLcoYwK8MfoJD2PrKuvqRucjpIqqfiwIKGQkDOMhW1Lmfair5G Kg3A== X-Gm-Message-State: APjAAAUieuqTbuRP8qIiqTf82zjfhtpNwIVnDqoF4pWaVmwcY7xz7edL thBZAP+y3s1OuZXlzKt6kIv7oQ== X-Google-Smtp-Source: APXvYqzRmHIQixHL/dT3g9+URkrEvbTD1662LCKASj2k0uJ6uY3NugxAdfAfz04HmHTeYWl0Y6pjGA== X-Received: by 2002:a62:1402:: with SMTP id 2mr22863254pfu.126.1582049568452; Tue, 18 Feb 2020 10:12:48 -0800 (PST) Received: from localhost ([103.195.202.120]) by smtp.gmail.com with ESMTPSA id j17sm4952292pfa.16.2020.02.18.10.12.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 10:12:47 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, daniel.lezcano@linaro.org, bjorn.andersson@linaro.org, swboyd@chromium.org, sivaa@codeaurora.org, Andy Gross Cc: Amit Kucheria , linux-pm@vger.kernel.org Subject: [PATCH v5 7/8] drivers: thermal: tsens: kernel-doc fixup Date: Tue, 18 Feb 2020 23:42:11 +0530 Message-Id: <8990f5cd5ec2bc2aa0f13c0ad5cd41b8d1a5632e.1582048155.git.amit.kucheria@linaro.org> 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 Document ul_lock, threshold and control structure members and make the following kernel-doc invocation happy: $ scripts/kernel-doc -v -none drivers/thermal/qcom/* drivers/thermal/qcom/qcom-spmi-temp-alarm.c:105: info: Scanning doc for qpnp_tm_get_temp_stage drivers/thermal/qcom/tsens-common.c:18: info: Scanning doc for struct tsens_irq_data drivers/thermal/qcom/tsens-common.c:130: info: Scanning doc for tsens_hw_to_mC drivers/thermal/qcom/tsens-common.c:163: info: Scanning doc for tsens_mC_to_hw drivers/thermal/qcom/tsens-common.c:245: info: Scanning doc for tsens_set_interrupt drivers/thermal/qcom/tsens-common.c:268: info: Scanning doc for tsens_threshold_violated drivers/thermal/qcom/tsens-common.c:362: info: Scanning doc for tsens_critical_irq_thread drivers/thermal/qcom/tsens-common.c:438: info: Scanning doc for tsens_irq_thread drivers/thermal/qcom/tsens.h:41: info: Scanning doc for struct tsens_sensor drivers/thermal/qcom/tsens.h:59: info: Scanning doc for struct tsens_ops drivers/thermal/qcom/tsens.h:494: info: Scanning doc for struct tsens_features drivers/thermal/qcom/tsens.h:513: info: Scanning doc for struct tsens_plat_data drivers/thermal/qcom/tsens.h:529: info: Scanning doc for struct tsens_context Signed-off-by: Amit Kucheria Reviewed-by: Bjorn Andersson --- drivers/thermal/qcom/tsens.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/thermal/qcom/tsens.h b/drivers/thermal/qcom/tsens.h index ad7574fe0811..f49e516b3458 100644 --- a/drivers/thermal/qcom/tsens.h +++ b/drivers/thermal/qcom/tsens.h @@ -526,6 +526,8 @@ struct tsens_plat_data { /** * struct tsens_context - Registers to be saved/restored across a context loss + * @threshold: Threshold register value + * @control: Control register value */ struct tsens_context { int threshold; @@ -540,6 +542,7 @@ struct tsens_context { * @srot_map: pointer to SROT register address space * @tm_offset: deal with old device trees that don't address TM and SROT * address space separately + * @ul_lock: lock while processing upper/lower threshold interrupts * @crit_lock: lock while processing critical threshold interrupts * @rf: array of regmap_fields used to store value of the field * @ctx: registers to be saved and restored during suspend/resume From patchwork Tue Feb 18 18:12:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 212812 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 696E1C34047 for ; Tue, 18 Feb 2020 18:12:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 433CF21D56 for ; Tue, 18 Feb 2020 18:12:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="VFZj2Ssq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726799AbgBRSM4 (ORCPT ); Tue, 18 Feb 2020 13:12:56 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:38941 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726774AbgBRSMx (ORCPT ); Tue, 18 Feb 2020 13:12:53 -0500 Received: by mail-pl1-f193.google.com with SMTP id g6so8402870plp.6 for ; Tue, 18 Feb 2020 10:12:53 -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=oLeONphgN8bI3yXOD6b6adnLltoiWoWgl8XWN+7QgxY=; b=VFZj2SsqMCbIShucyuZlAHB1hbUvkl/E0khDnin9ueeSQG3ICe56NLzND/ROolqv75 PZZ9/TYDfmZ9pqyrg0NxDm8rItdRvQFa7QGeBPRtCKN1XuOk6ngqul1pfAFXiY1bXifU SXBqfoKKQP3z7DfVjxeiRZPKL/YfhK57cBLYhoPLyaOUvYLFEaQU7v4eMLtWgO9RlyuM 9jLWV6VYMNO14UpvFfy6IFOmnxkaTmtdqRSjbrOfkaDevdhUYK0q6V0aLEj1F23fyCPA t41CTKy627ZQrELEExiV+bG7DcAUzoygNamg/ZgSVmVbjBF58ki6jVazVq3iLe/oIQ/y 7z7g== 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=oLeONphgN8bI3yXOD6b6adnLltoiWoWgl8XWN+7QgxY=; b=Yy1z5fFvoSHnx8/EyjlTGR5hRNuMuWHQvsf48j7lkY6CeP/VFWD6h75IX66+eL984F 7ugQCBxvr+WeSKqDfHyM61DvlvxqCYFi2meU5SSMHuvCJai7YIihfHbdP9wDBDYVGJuG LD7ExmNl8pNsXORiL7c/h7z5TZp9S/C8LwwBXpCOjd4/03DT9DpyaiRdMo2LSxx4NNYm jFhnhJ/0mkAz9/pCRazd73WnpJMqMDfZ3Sh/QEgJxu9tnFU3sTKZaXpqsGc3VaJzf7C9 IWLeUbQAiJcGXd3Ys2k150nTdL6ephwe1uNmsVUMqqSRNHeGzvdvwAtuUR6KjJv2EBkk NP/w== X-Gm-Message-State: APjAAAXDDnRaTbyksCvUr5OryOSL5ue5zDsLFxCpLbHWHe2+DPxrBvap euljWweNZ1aXFK57royrPaYcSA== X-Google-Smtp-Source: APXvYqxiNPa/1gH9eAM7SpBofRF5udb8qqSPMvgm5ozyIY2/qfio9pHlLjFssqaOxPtTkBAL38KDCw== X-Received: by 2002:a17:90a:cb11:: with SMTP id z17mr4153616pjt.122.1582049572841; Tue, 18 Feb 2020 10:12:52 -0800 (PST) Received: from localhost ([103.195.202.120]) by smtp.gmail.com with ESMTPSA id t66sm5185236pgb.91.2020.02.18.10.12.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 10:12:51 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, daniel.lezcano@linaro.org, bjorn.andersson@linaro.org, swboyd@chromium.org, sivaa@codeaurora.org, Andy Gross Cc: Amit Kucheria , linux-pm@vger.kernel.org Subject: [PATCH v5 8/8] drivers: thermal: tsens: Remove unnecessary irq flag Date: Tue, 18 Feb 2020 23:42:12 +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 IRQF_TRIGGER_HIGH is already specified through devicetree interrupts property. Remove it from code. Signed-off-by: Amit Kucheria Reviewed-by: Bjorn Andersson --- drivers/thermal/qcom/tsens.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index 5b003d598234..9ee00c67144c 100644 --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c @@ -118,7 +118,7 @@ static int tsens_register(struct tsens_priv *priv) ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, tsens_irq_thread, - IRQF_TRIGGER_HIGH | IRQF_ONESHOT, + IRQF_ONESHOT, dev_name(&pdev->dev), priv); if (ret) { dev_err(&pdev->dev, "%s: failed to get irq\n", __func__);