diff mbox

[04/14] thermal: ti-soc-thermal: cleanup COUNTER feature handling for OMAP5

Message ID 1526298141-14045-5-git-send-email-b.zolnierkie@samsung.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Bartlomiej Zolnierkiewicz May 14, 2018, 11:42 a.m. UTC
OMAP5 sensors don't claim COUNTER feature support (they use
COUNTER_DELAY feature instead) so there is no need to set fields
of struct temp_sensor_registers which are only used for COUNTER
feature.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
 drivers/thermal/ti-soc-thermal/omap5-thermal-data.c | 9 ---------
 drivers/thermal/ti-soc-thermal/omap5xxx-bandgap.h   | 3 ---
 2 files changed, 12 deletions(-)

Comments

J, KEERTHY July 11, 2018, 3:38 a.m. UTC | #1
On 5/14/2018 5:12 PM, Bartlomiej Zolnierkiewicz wrote:
> OMAP5 sensors don't claim COUNTER feature support (they use
> COUNTER_DELAY feature instead) so there is no need to set fields
> of struct temp_sensor_registers which are only used for COUNTER
> feature.
> 
> There should be no functional changes caused by this patch.

Acked-by: Keerthy <j-keerthy@ti.com>

> 
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> ---
>   drivers/thermal/ti-soc-thermal/omap5-thermal-data.c | 9 ---------
>   drivers/thermal/ti-soc-thermal/omap5xxx-bandgap.h   | 3 ---
>   2 files changed, 12 deletions(-)
> 
> diff --git a/drivers/thermal/ti-soc-thermal/omap5-thermal-data.c b/drivers/thermal/ti-soc-thermal/omap5-thermal-data.c
> index 8191bae..e384be1 100644
> --- a/drivers/thermal/ti-soc-thermal/omap5-thermal-data.c
> +++ b/drivers/thermal/ti-soc-thermal/omap5-thermal-data.c
> @@ -41,9 +41,6 @@
>   	.mask_counter_delay_mask = OMAP5430_MASK_COUNTER_DELAY_MASK,
>   	.mask_freeze_mask = OMAP5430_MASK_FREEZE_MPU_MASK,
>   
> -	.bgap_counter = OMAP5430_BGAP_CTRL_OFFSET,
> -	.counter_mask = OMAP5430_COUNTER_MASK,
> -
>   	.bgap_threshold = OMAP5430_BGAP_THRESHOLD_MPU_OFFSET,
>   	.threshold_thot_mask = OMAP5430_T_HOT_MASK,
>   	.threshold_tcold_mask = OMAP5430_T_COLD_MASK,
> @@ -77,9 +74,6 @@
>   	.mask_counter_delay_mask = OMAP5430_MASK_COUNTER_DELAY_MASK,
>   	.mask_freeze_mask = OMAP5430_MASK_FREEZE_GPU_MASK,
>   
> -	.bgap_counter = OMAP5430_BGAP_CTRL_OFFSET,
> -	.counter_mask = OMAP5430_COUNTER_MASK,
> -
>   	.bgap_threshold = OMAP5430_BGAP_THRESHOLD_GPU_OFFSET,
>   	.threshold_thot_mask = OMAP5430_T_HOT_MASK,
>   	.threshold_tcold_mask = OMAP5430_T_COLD_MASK,
> @@ -114,9 +108,6 @@
>   	.mask_counter_delay_mask = OMAP5430_MASK_COUNTER_DELAY_MASK,
>   	.mask_freeze_mask = OMAP5430_MASK_FREEZE_CORE_MASK,
>   
> -	.bgap_counter = OMAP5430_BGAP_CTRL_OFFSET,
> -	.counter_mask = OMAP5430_COUNTER_MASK,
> -
>   	.bgap_threshold = OMAP5430_BGAP_THRESHOLD_CORE_OFFSET,
>   	.threshold_thot_mask = OMAP5430_T_HOT_MASK,
>   	.threshold_tcold_mask = OMAP5430_T_COLD_MASK,
> diff --git a/drivers/thermal/ti-soc-thermal/omap5xxx-bandgap.h b/drivers/thermal/ti-soc-thermal/omap5xxx-bandgap.h
> index dcbf903..223c7a8 100644
> --- a/drivers/thermal/ti-soc-thermal/omap5xxx-bandgap.h
> +++ b/drivers/thermal/ti-soc-thermal/omap5xxx-bandgap.h
> @@ -93,9 +93,6 @@
>   #define OMAP5430_MASK_HOT_MPU_MASK			BIT(1)
>   #define OMAP5430_MASK_COLD_MPU_MASK			BIT(0)
>   
> -/* OMAP5430.BANDGAP_COUNTER */
> -#define OMAP5430_COUNTER_MASK				(0xffffff << 0)
> -
>   /* OMAP5430.BANDGAP_THRESHOLD */
>   #define OMAP5430_T_HOT_MASK				(0x3ff << 16)
>   #define OMAP5430_T_COLD_MASK				(0x3ff << 0)
>
Bartlomiej Zolnierkiewicz July 25, 2018, 2:28 p.m. UTC | #2
On Wednesday, July 11, 2018 09:08:29 AM J, KEERTHY wrote:
> 
> On 5/14/2018 5:12 PM, Bartlomiej Zolnierkiewicz wrote:
> > OMAP5 sensors don't claim COUNTER feature support (they use
> > COUNTER_DELAY feature instead) so there is no need to set fields
> > of struct temp_sensor_registers which are only used for COUNTER
> > feature.
> > 
> > There should be no functional changes caused by this patch.
> 
> Acked-by: Keerthy <j-keerthy@ti.com>

Thank you! Could you please also review/verify patches 5-14?

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
diff mbox

Patch

diff --git a/drivers/thermal/ti-soc-thermal/omap5-thermal-data.c b/drivers/thermal/ti-soc-thermal/omap5-thermal-data.c
index 8191bae..e384be1 100644
--- a/drivers/thermal/ti-soc-thermal/omap5-thermal-data.c
+++ b/drivers/thermal/ti-soc-thermal/omap5-thermal-data.c
@@ -41,9 +41,6 @@ 
 	.mask_counter_delay_mask = OMAP5430_MASK_COUNTER_DELAY_MASK,
 	.mask_freeze_mask = OMAP5430_MASK_FREEZE_MPU_MASK,
 
-	.bgap_counter = OMAP5430_BGAP_CTRL_OFFSET,
-	.counter_mask = OMAP5430_COUNTER_MASK,
-
 	.bgap_threshold = OMAP5430_BGAP_THRESHOLD_MPU_OFFSET,
 	.threshold_thot_mask = OMAP5430_T_HOT_MASK,
 	.threshold_tcold_mask = OMAP5430_T_COLD_MASK,
@@ -77,9 +74,6 @@ 
 	.mask_counter_delay_mask = OMAP5430_MASK_COUNTER_DELAY_MASK,
 	.mask_freeze_mask = OMAP5430_MASK_FREEZE_GPU_MASK,
 
-	.bgap_counter = OMAP5430_BGAP_CTRL_OFFSET,
-	.counter_mask = OMAP5430_COUNTER_MASK,
-
 	.bgap_threshold = OMAP5430_BGAP_THRESHOLD_GPU_OFFSET,
 	.threshold_thot_mask = OMAP5430_T_HOT_MASK,
 	.threshold_tcold_mask = OMAP5430_T_COLD_MASK,
@@ -114,9 +108,6 @@ 
 	.mask_counter_delay_mask = OMAP5430_MASK_COUNTER_DELAY_MASK,
 	.mask_freeze_mask = OMAP5430_MASK_FREEZE_CORE_MASK,
 
-	.bgap_counter = OMAP5430_BGAP_CTRL_OFFSET,
-	.counter_mask = OMAP5430_COUNTER_MASK,
-
 	.bgap_threshold = OMAP5430_BGAP_THRESHOLD_CORE_OFFSET,
 	.threshold_thot_mask = OMAP5430_T_HOT_MASK,
 	.threshold_tcold_mask = OMAP5430_T_COLD_MASK,
diff --git a/drivers/thermal/ti-soc-thermal/omap5xxx-bandgap.h b/drivers/thermal/ti-soc-thermal/omap5xxx-bandgap.h
index dcbf903..223c7a8 100644
--- a/drivers/thermal/ti-soc-thermal/omap5xxx-bandgap.h
+++ b/drivers/thermal/ti-soc-thermal/omap5xxx-bandgap.h
@@ -93,9 +93,6 @@ 
 #define OMAP5430_MASK_HOT_MPU_MASK			BIT(1)
 #define OMAP5430_MASK_COLD_MPU_MASK			BIT(0)
 
-/* OMAP5430.BANDGAP_COUNTER */
-#define OMAP5430_COUNTER_MASK				(0xffffff << 0)
-
 /* OMAP5430.BANDGAP_THRESHOLD */
 #define OMAP5430_T_HOT_MASK				(0x3ff << 16)
 #define OMAP5430_T_COLD_MASK				(0x3ff << 0)