From patchwork Fri Feb 5 13:45:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 12071181 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=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 06749C433E0 for ; Fri, 5 Feb 2021 22:40:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AD5DB64FB9 for ; Fri, 5 Feb 2021 22:40:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231446AbhBEWjj (ORCPT ); Fri, 5 Feb 2021 17:39:39 -0500 Received: from muru.com ([72.249.23.125]:57620 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230264AbhBENqX (ORCPT ); Fri, 5 Feb 2021 08:46:23 -0500 Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id 281BD80F1; Fri, 5 Feb 2021 13:45:53 +0000 (UTC) From: Tony Lindgren To: Amit Kucheria , Daniel Lezcano , Zhang Rui Cc: Eduardo Valentin , Keerthy , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Adam Ford , Carl Philipp Klemm , "H . Nikolaus Schaller" , Merlijn Wajer , Pavel Machek , Peter Ujfalusi , Sebastian Reichel Subject: [PATCH 1/4] thermal: ti-soc-thermal: Skip pointless register access for dra7 Date: Fri, 5 Feb 2021 15:45:31 +0200 Message-Id: <20210205134534.49200-2-tony@atomide.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210205134534.49200-1-tony@atomide.com> References: <20210205134534.49200-1-tony@atomide.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org On dra7, there is no Start of Conversion (SOC) register bit and we have an empty bgap_soc_mask in the configuration for the thermal driver. Let's not do pointless reads and writes with the empty mask. There's also no point waiting for End of Conversion bit (EOCZ) to go high on dra7. We only care about it going down, and are now mostly timing out waiting for EOCZ high while it has already gone down. When we add checking for the timeout errors in a later patch, waiting for EOCZ high would cause bogus time out errors. Cc: Adam Ford Cc: Carl Philipp Klemm Cc: Eduardo Valentin Cc: H. Nikolaus Schaller Cc: Merlijn Wajer Cc: Pavel Machek Cc: Peter Ujfalusi Cc: Sebastian Reichel Signed-off-by: Tony Lindgren --- drivers/thermal/ti-soc-thermal/ti-bandgap.c | 29 +++++++++++---------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.c b/drivers/thermal/ti-soc-thermal/ti-bandgap.c --- a/drivers/thermal/ti-soc-thermal/ti-bandgap.c +++ b/drivers/thermal/ti-soc-thermal/ti-bandgap.c @@ -602,29 +602,30 @@ void *ti_bandgap_get_sensor_data(struct ti_bandgap *bgp, int id) static int ti_bandgap_force_single_read(struct ti_bandgap *bgp, int id) { - u32 counter = 1000; - struct temp_sensor_registers *tsr; + struct temp_sensor_registers *tsr = bgp->conf->sensors[id].registers; + u32 counter; /* Select single conversion mode */ if (TI_BANDGAP_HAS(bgp, MODE_CONFIG)) RMW_BITS(bgp, id, bgap_mode_ctrl, mode_ctrl_mask, 0); - /* Start of Conversion = 1 */ - RMW_BITS(bgp, id, temp_sensor_ctrl, bgap_soc_mask, 1); + /* Set Start of Conversion if available */ + if (tsr->bgap_soc_mask) { + RMW_BITS(bgp, id, temp_sensor_ctrl, bgap_soc_mask, 1); - /* Wait for EOCZ going up */ - tsr = bgp->conf->sensors[id].registers; + /* Wait for EOCZ going up */ + counter = 1000; + while (--counter) { + if (ti_bandgap_readl(bgp, tsr->temp_sensor_ctrl) & + tsr->bgap_eocz_mask) + break; + } - while (--counter) { - if (ti_bandgap_readl(bgp, tsr->temp_sensor_ctrl) & - tsr->bgap_eocz_mask) - break; + /* Clear Start of Conversion if available */ + RMW_BITS(bgp, id, temp_sensor_ctrl, bgap_soc_mask, 0); } - /* Start of Conversion = 0 */ - RMW_BITS(bgp, id, temp_sensor_ctrl, bgap_soc_mask, 0); - - /* Wait for EOCZ going down */ + /* Wait for EOCZ going down, always needed even if no bgap_soc_mask */ counter = 1000; while (--counter) { if (!(ti_bandgap_readl(bgp, tsr->temp_sensor_ctrl) & From patchwork Fri Feb 5 13:45:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 12070167 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=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 3552EC433E6 for ; Fri, 5 Feb 2021 13:49:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D443A64FC0 for ; Fri, 5 Feb 2021 13:49:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231480AbhBENsd (ORCPT ); Fri, 5 Feb 2021 08:48:33 -0500 Received: from muru.com ([72.249.23.125]:57646 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231380AbhBENq0 (ORCPT ); Fri, 5 Feb 2021 08:46:26 -0500 Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id 17B7F81A7; Fri, 5 Feb 2021 13:45:55 +0000 (UTC) From: Tony Lindgren To: Amit Kucheria , Daniel Lezcano , Zhang Rui Cc: Eduardo Valentin , Keerthy , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Adam Ford , Carl Philipp Klemm , "H . Nikolaus Schaller" , Merlijn Wajer , Pavel Machek , Peter Ujfalusi , Sebastian Reichel Subject: [PATCH 2/4] thermal: ti-soc-thermal: Fix stuck sensor with continuous mode for 4430 Date: Fri, 5 Feb 2021 15:45:32 +0200 Message-Id: <20210205134534.49200-3-tony@atomide.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210205134534.49200-1-tony@atomide.com> References: <20210205134534.49200-1-tony@atomide.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org At least for 4430, trying to use the single conversion mode eventually hangs the thermal sensor. This can be quite easily seen with errors: thermal thermal_zone0: failed to read out thermal zone (-5) Also, trying to read the temperature shows a stuck value with: $ while true; do cat /sys/class/thermal/thermal_zone0/temp; done Where the temperature is not rising at all with the busy loop. Additionally, the EOCZ (end of conversion) bit is not rising on 4430 in single conversion mode while it works fine in continuous conversion mode. It is also possible that the hung temperature sensor can affect the thermal shutdown alert too. Let's fix the issue by adding TI_BANDGAP_FEATURE_CONT_MODE_ONLY flag and use it for 4430. Note that we also need to add udelay to for the EOCZ (end of conversion) bit polling as otherwise we have it time out too early on 4430. We'll be changing the loop to use iopoll in the following clean-up patch. Cc: Adam Ford Cc: Carl Philipp Klemm Cc: Eduardo Valentin Cc: H. Nikolaus Schaller Cc: Merlijn Wajer Cc: Pavel Machek Cc: Peter Ujfalusi Cc: Sebastian Reichel Signed-off-by: Tony Lindgren --- drivers/thermal/ti-soc-thermal/omap4-thermal-data.c | 3 ++- drivers/thermal/ti-soc-thermal/ti-bandgap.c | 13 ++++++++++--- drivers/thermal/ti-soc-thermal/ti-bandgap.h | 2 ++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/ti-soc-thermal/omap4-thermal-data.c b/drivers/thermal/ti-soc-thermal/omap4-thermal-data.c --- a/drivers/thermal/ti-soc-thermal/omap4-thermal-data.c +++ b/drivers/thermal/ti-soc-thermal/omap4-thermal-data.c @@ -58,7 +58,8 @@ omap4430_adc_to_temp[OMAP4430_ADC_END_VALUE - OMAP4430_ADC_START_VALUE + 1] = { const struct ti_bandgap_data omap4430_data = { .features = TI_BANDGAP_FEATURE_MODE_CONFIG | TI_BANDGAP_FEATURE_CLK_CTRL | - TI_BANDGAP_FEATURE_POWER_SWITCH, + TI_BANDGAP_FEATURE_POWER_SWITCH | + TI_BANDGAP_FEATURE_CONT_MODE_ONLY, .fclock_name = "bandgap_fclk", .div_ck_name = "bandgap_fclk", .conv_table = omap4430_adc_to_temp, diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.c b/drivers/thermal/ti-soc-thermal/ti-bandgap.c --- a/drivers/thermal/ti-soc-thermal/ti-bandgap.c +++ b/drivers/thermal/ti-soc-thermal/ti-bandgap.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -605,9 +606,13 @@ ti_bandgap_force_single_read(struct ti_bandgap *bgp, int id) struct temp_sensor_registers *tsr = bgp->conf->sensors[id].registers; u32 counter; - /* Select single conversion mode */ - if (TI_BANDGAP_HAS(bgp, MODE_CONFIG)) - RMW_BITS(bgp, id, bgap_mode_ctrl, mode_ctrl_mask, 0); + /* Select continuous or single conversion mode */ + if (TI_BANDGAP_HAS(bgp, MODE_CONFIG)) { + if (TI_BANDGAP_HAS(bgp, CONT_MODE_ONLY)) + RMW_BITS(bgp, id, bgap_mode_ctrl, mode_ctrl_mask, 1); + else + RMW_BITS(bgp, id, bgap_mode_ctrl, mode_ctrl_mask, 0); + } /* Set Start of Conversion if available */ if (tsr->bgap_soc_mask) { @@ -619,6 +624,7 @@ ti_bandgap_force_single_read(struct ti_bandgap *bgp, int id) if (ti_bandgap_readl(bgp, tsr->temp_sensor_ctrl) & tsr->bgap_eocz_mask) break; + udelay(1); } /* Clear Start of Conversion if available */ @@ -631,6 +637,7 @@ ti_bandgap_force_single_read(struct ti_bandgap *bgp, int id) if (!(ti_bandgap_readl(bgp, tsr->temp_sensor_ctrl) & tsr->bgap_eocz_mask)) break; + udelay(1); } return 0; diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.h b/drivers/thermal/ti-soc-thermal/ti-bandgap.h --- a/drivers/thermal/ti-soc-thermal/ti-bandgap.h +++ b/drivers/thermal/ti-soc-thermal/ti-bandgap.h @@ -280,6 +280,7 @@ struct ti_temp_sensor { * has Errata 814 * TI_BANDGAP_FEATURE_UNRELIABLE - used when the sensor readings are too * inaccurate. + * TI_BANDGAP_FEATURE_CONT_MODE_ONLY - used when single mode hangs the sensor * TI_BANDGAP_HAS(b, f) - macro to check if a bandgap device is capable of a * specific feature (above) or not. Return non-zero, if yes. */ @@ -295,6 +296,7 @@ struct ti_temp_sensor { #define TI_BANDGAP_FEATURE_HISTORY_BUFFER BIT(9) #define TI_BANDGAP_FEATURE_ERRATA_814 BIT(10) #define TI_BANDGAP_FEATURE_UNRELIABLE BIT(11) +#define TI_BANDGAP_FEATURE_CONT_MODE_ONLY BIT(12) #define TI_BANDGAP_HAS(b, f) \ ((b)->conf->features & TI_BANDGAP_FEATURE_ ## f) From patchwork Fri Feb 5 13:45:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 12071183 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=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 906CDC433E6 for ; Fri, 5 Feb 2021 22:41:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5F8C964FEB for ; Fri, 5 Feb 2021 22:41:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231477AbhBEWjp (ORCPT ); Fri, 5 Feb 2021 17:39:45 -0500 Received: from muru.com ([72.249.23.125]:57664 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231421AbhBENq2 (ORCPT ); Fri, 5 Feb 2021 08:46:28 -0500 Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id 364CB81BC; Fri, 5 Feb 2021 13:45:59 +0000 (UTC) From: Tony Lindgren To: Amit Kucheria , Daniel Lezcano , Zhang Rui Cc: Eduardo Valentin , Keerthy , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Adam Ford , Carl Philipp Klemm , "H . Nikolaus Schaller" , Merlijn Wajer , Pavel Machek , Peter Ujfalusi , Sebastian Reichel Subject: [PATCH 3/4] thermal: ti-soc-thermal: Simplify polling with iopoll Date: Fri, 5 Feb 2021 15:45:33 +0200 Message-Id: <20210205134534.49200-4-tony@atomide.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210205134534.49200-1-tony@atomide.com> References: <20210205134534.49200-1-tony@atomide.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org We can use iopoll for checking the EOCZ (end of conversion) bit. And with this we now also want to handle the timeout errors properly. For omap3, we need about 1.2ms for the single mode sampling to wait for EOCZ down, so let's use 1.5ms timeout there. Waiting for sampling to start is faster and we can use 1ms timeout. Cc: Adam Ford Cc: Carl Philipp Klemm Cc: Eduardo Valentin Cc: H. Nikolaus Schaller Cc: Merlijn Wajer Cc: Pavel Machek Cc: Peter Ujfalusi Cc: Sebastian Reichel Signed-off-by: Tony Lindgren Tested-by: Adam Ford #logicpd-torpedo-37xx-devkit --- drivers/thermal/ti-soc-thermal/ti-bandgap.c | 30 ++++++++++----------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.c b/drivers/thermal/ti-soc-thermal/ti-bandgap.c --- a/drivers/thermal/ti-soc-thermal/ti-bandgap.c +++ b/drivers/thermal/ti-soc-thermal/ti-bandgap.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -27,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -604,7 +604,9 @@ static int ti_bandgap_force_single_read(struct ti_bandgap *bgp, int id) { struct temp_sensor_registers *tsr = bgp->conf->sensors[id].registers; - u32 counter; + void __iomem *temp_sensor_ctrl = bgp->base + tsr->temp_sensor_ctrl; + int error; + u32 val; /* Select continuous or single conversion mode */ if (TI_BANDGAP_HAS(bgp, MODE_CONFIG)) { @@ -619,26 +621,22 @@ ti_bandgap_force_single_read(struct ti_bandgap *bgp, int id) RMW_BITS(bgp, id, temp_sensor_ctrl, bgap_soc_mask, 1); /* Wait for EOCZ going up */ - counter = 1000; - while (--counter) { - if (ti_bandgap_readl(bgp, tsr->temp_sensor_ctrl) & - tsr->bgap_eocz_mask) - break; - udelay(1); - } + error = readl_poll_timeout_atomic(temp_sensor_ctrl, val, + val & tsr->bgap_eocz_mask, + 1, 1000); + if (error) + dev_warn(bgp->dev, "eocz timed out waiting high\n"); /* Clear Start of Conversion if available */ RMW_BITS(bgp, id, temp_sensor_ctrl, bgap_soc_mask, 0); } /* Wait for EOCZ going down, always needed even if no bgap_soc_mask */ - counter = 1000; - while (--counter) { - if (!(ti_bandgap_readl(bgp, tsr->temp_sensor_ctrl) & - tsr->bgap_eocz_mask)) - break; - udelay(1); - } + error = readl_poll_timeout_atomic(temp_sensor_ctrl, val, + !(val & tsr->bgap_eocz_mask), + 1, 1500); + if (error) + dev_warn(bgp->dev, "eocz timed out waiting low\n"); return 0; } From patchwork Fri Feb 5 13:45:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 12071185 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=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 A5881C433DB for ; Fri, 5 Feb 2021 22:41:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7B57564FEA for ; Fri, 5 Feb 2021 22:41:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231538AbhBEWjx (ORCPT ); Fri, 5 Feb 2021 17:39:53 -0500 Received: from muru.com ([72.249.23.125]:57682 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230315AbhBENqb (ORCPT ); Fri, 5 Feb 2021 08:46:31 -0500 Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id 46EE181BD; Fri, 5 Feb 2021 13:46:02 +0000 (UTC) From: Tony Lindgren To: Amit Kucheria , Daniel Lezcano , Zhang Rui Cc: Eduardo Valentin , Keerthy , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Adam Ford , Carl Philipp Klemm , "H . Nikolaus Schaller" , Merlijn Wajer , Pavel Machek , Peter Ujfalusi , Sebastian Reichel Subject: [PATCH 4/4] thermal: ti-soc-thermal: Use non-inverted define for omap4 Date: Fri, 5 Feb 2021 15:45:34 +0200 Message-Id: <20210205134534.49200-5-tony@atomide.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210205134534.49200-1-tony@atomide.com> References: <20210205134534.49200-1-tony@atomide.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org When we set bit 10 high we use continuous mode and not single mode. Let's correct this to avoid confusion. No functional changes here, the code does the right thing with bit 10. Cc: Adam Ford Cc: Carl Philipp Klemm Cc: Eduardo Valentin Cc: H. Nikolaus Schaller Cc: Merlijn Wajer Cc: Pavel Machek Cc: Peter Ujfalusi Cc: Sebastian Reichel Signed-off-by: Tony Lindgren Acked-by: Pavel Machek --- drivers/thermal/ti-soc-thermal/omap4-thermal-data.c | 4 ++-- drivers/thermal/ti-soc-thermal/omap4xxx-bandgap.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/ti-soc-thermal/omap4-thermal-data.c b/drivers/thermal/ti-soc-thermal/omap4-thermal-data.c --- a/drivers/thermal/ti-soc-thermal/omap4-thermal-data.c +++ b/drivers/thermal/ti-soc-thermal/omap4-thermal-data.c @@ -24,7 +24,7 @@ omap4430_mpu_temp_sensor_registers = { .bgap_dtemp_mask = OMAP4430_BGAP_TEMP_SENSOR_DTEMP_MASK, .bgap_mode_ctrl = OMAP4430_TEMP_SENSOR_CTRL_OFFSET, - .mode_ctrl_mask = OMAP4430_SINGLE_MODE_MASK, + .mode_ctrl_mask = OMAP4430_CONTINUOUS_MODE_MASK, .bgap_efuse = OMAP4430_FUSE_OPP_BGAP, }; @@ -97,7 +97,7 @@ omap4460_mpu_temp_sensor_registers = { .mask_cold_mask = OMAP4460_MASK_COLD_MASK, .bgap_mode_ctrl = OMAP4460_BGAP_CTRL_OFFSET, - .mode_ctrl_mask = OMAP4460_SINGLE_MODE_MASK, + .mode_ctrl_mask = OMAP4460_CONTINUOUS_MODE_MASK, .bgap_counter = OMAP4460_BGAP_COUNTER_OFFSET, .counter_mask = OMAP4460_COUNTER_MASK, diff --git a/drivers/thermal/ti-soc-thermal/omap4xxx-bandgap.h b/drivers/thermal/ti-soc-thermal/omap4xxx-bandgap.h --- a/drivers/thermal/ti-soc-thermal/omap4xxx-bandgap.h +++ b/drivers/thermal/ti-soc-thermal/omap4xxx-bandgap.h @@ -40,7 +40,7 @@ /* OMAP4430.TEMP_SENSOR bits */ #define OMAP4430_BGAP_TEMPSOFF_MASK BIT(12) #define OMAP4430_BGAP_TSHUT_MASK BIT(11) -#define OMAP4430_SINGLE_MODE_MASK BIT(10) +#define OMAP4430_CONTINUOUS_MODE_MASK BIT(10) #define OMAP4430_BGAP_TEMP_SENSOR_SOC_MASK BIT(9) #define OMAP4430_BGAP_TEMP_SENSOR_EOCZ_MASK BIT(8) #define OMAP4430_BGAP_TEMP_SENSOR_DTEMP_MASK (0xff << 0) @@ -113,7 +113,7 @@ #define OMAP4460_BGAP_TEMP_SENSOR_DTEMP_MASK (0x3ff << 0) /* OMAP4460.BANDGAP_CTRL bits */ -#define OMAP4460_SINGLE_MODE_MASK BIT(31) +#define OMAP4460_CONTINUOUS_MODE_MASK BIT(31) #define OMAP4460_MASK_HOT_MASK BIT(1) #define OMAP4460_MASK_COLD_MASK BIT(0)