Skip to contentSkip to conversation

hwmon: (max6650) Drop call to thermal_cdev_update

PATCH In review Guenter Roeck 2 participants 3 messages Apr 23, 2019

Subsystems (2)
lore
Share & tools
lore

Guenter Roeck

author maintainer
#0 lore raw

PATCH 1/1 hwmon: (max6650) Drop call to thermal_cdev_update

The call to thermal_cdev_update() causes any fan connected to the chip to stop immediately. If the thermal subsystem is not set up to actually handle the chip as cooling device, the remains stopped until is is restarted manually with a write to a sysfs attribute.

There is evidence that thermal_cdev_update() should only be called from thermal governors, not from thermal cooling device drivers. Drop the call.

Cc Jean-Francois Dagenais <[email protected]>
---
 drivers/hwmon/max6650.c | 2 --
 1 file changed, 2 deletions(-)
drivers/hwmon/max6650.c +0 -2
index e977c2f2d74a..939953240827 100644
@@ -801,8 +801,6 @@ static int max6650_probe(struct i2c_client *client,
 		dev_warn(&client->dev,
 			 "thermal cooling device register failed: %ld\n",
 			 PTR_ERR(data->cooling_dev));
-	else
-		thermal_cdev_update(data->cooling_dev);
 #endif
 	return 0;
 }
Signature · 1 line
2.7.4
Tested-by on v1 1/1
#1 lore raw
Quoted 8 lines · Guenter Roeck

The call to thermal_cdev_update() causes any fan connected to the chip to stop immediately. If the thermal subsystem is not set up to actually handle the chip as cooling device, the remains stopped until is is restarted manually with a write to a sysfs attribute.

Quoted 5 lines

There is evidence that thermal_cdev_update() should only be called from thermal governors, not from thermal cooling device drivers. Drop the call.

Cc Jean-Francois Dagenais <[email protected]>
Quoted 21 lines

---
drivers/hwmon/max6650.c | 2 --

1 file changed, 2 deletions(-)
drivers/hwmon/max6650.c +0 -2
index e977c2f2d74a..939953240827 100644
@@ -801,8 +801,6 @@ static int max6650_probe(struct i2c_client *client,
 		dev_warn(&client->dev,
 			 "thermal cooling device register failed: %ld\n",
 			 PTR_ERR(data->cooling_dev));
-	else
-		thermal_cdev_update(data->cooling_dev);
 #endif
 	return 0;
 }
Signature · 1 line
2.7.4

I was just testing exactly this, and coming to the same conclusion and about to send a v6! ;) No need now.

author maintainer
#2 lore raw
Quoted 8 lines · Jean-Francois Dagenais
Quoted 8 lines · Guenter Roeck

The call to thermal_cdev_update() causes any fan connected to the chip to stop immediately. If the thermal subsystem is not set up to actually handle the chip as cooling device, the remains stopped until is is restarted manually with a write to a sysfs attribute.

Quoted 6 lines
Quoted 5 lines

There is evidence that thermal_cdev_update() should only be called from thermal governors, not from thermal cooling device drivers. Drop the call.

Cc Jean-Francois Dagenais <[email protected]>

Thanks a lot!

I thought about merging the two patches, but then concluded that your
Tested-by: and the thoughts behind removing the call are valuable, and decided to keep the patches separate after all.

Guenter