File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -252,10 +252,11 @@ static int imx_get_temp(struct thermal_zone_device *tz, int *temp)
252
252
const struct thermal_soc_data * soc_data = data -> socdata ;
253
253
struct regmap * map = data -> tempmon ;
254
254
unsigned int n_meas ;
255
- bool wait ;
255
+ bool wait , run_measurement ;
256
256
u32 val ;
257
257
258
- if (thermal_zone_device_is_enabled (tz )) {
258
+ run_measurement = !data -> irq_enabled ;
259
+ if (!run_measurement ) {
259
260
/* Check if a measurement is currently in progress */
260
261
regmap_read (map , soc_data -> temp_data , & val );
261
262
wait = !(val & soc_data -> temp_valid_mask );
@@ -282,7 +283,7 @@ static int imx_get_temp(struct thermal_zone_device *tz, int *temp)
282
283
283
284
regmap_read (map , soc_data -> temp_data , & val );
284
285
285
- if (! thermal_zone_device_is_enabled ( tz ) ) {
286
+ if (run_measurement ) {
286
287
regmap_write (map , soc_data -> sensor_ctrl + REG_CLR ,
287
288
soc_data -> measure_temp_mask );
288
289
regmap_write (map , soc_data -> sensor_ctrl + REG_SET ,
You can’t perform that action at this time.
0 commit comments