linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hwmon: (max6650) Drop call to thermal_cdev_update
@ 2019-04-23 12:36 Guenter Roeck
  2019-04-23 12:42 ` Jean-Francois Dagenais
  0 siblings, 1 reply; 3+ messages in thread
From: Guenter Roeck @ 2019-04-23 12:36 UTC (permalink / raw)
  To: Hardware Monitoring; +Cc: Jean Delvare, Guenter Roeck, Jean-Francois Dagenais

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 <jeff.dagenais@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 drivers/hwmon/max6650.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/hwmon/max6650.c b/drivers/hwmon/max6650.c
index e977c2f2d74a..939953240827 100644
--- a/drivers/hwmon/max6650.c
+++ b/drivers/hwmon/max6650.c
@@ -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;
 }
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] hwmon: (max6650) Drop call to thermal_cdev_update
  2019-04-23 12:36 [PATCH] hwmon: (max6650) Drop call to thermal_cdev_update Guenter Roeck
@ 2019-04-23 12:42 ` Jean-Francois Dagenais
  2019-04-23 13:32   ` Guenter Roeck
  0 siblings, 1 reply; 3+ messages in thread
From: Jean-Francois Dagenais @ 2019-04-23 12:42 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Hardware Monitoring, Jean Delvare


> On Apr 23, 2019, at 08:36, Guenter Roeck <linux@roeck-us.net> wrote:
> 
> 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 <jeff.dagenais@gmail.com>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
> 
> ---
> drivers/hwmon/max6650.c | 2 --
> 1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/hwmon/max6650.c b/drivers/hwmon/max6650.c
> index e977c2f2d74a..939953240827 100644
> --- a/drivers/hwmon/max6650.c
> +++ b/drivers/hwmon/max6650.c
> @@ -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;
> }
> -- 
> 2.7.4
> 

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] hwmon: (max6650) Drop call to thermal_cdev_update
  2019-04-23 12:42 ` Jean-Francois Dagenais
@ 2019-04-23 13:32   ` Guenter Roeck
  0 siblings, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2019-04-23 13:32 UTC (permalink / raw)
  To: Jean-Francois Dagenais; +Cc: Hardware Monitoring, Jean Delvare

On 4/23/19 5:42 AM, Jean-Francois Dagenais wrote:
> 
>> On Apr 23, 2019, at 08:36, Guenter Roeck <linux@roeck-us.net> wrote:
>>
>> 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 <jeff.dagenais@gmail.com>
>> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> Tested-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com>

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-04-23 13:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-23 12:36 [PATCH] hwmon: (max6650) Drop call to thermal_cdev_update Guenter Roeck
2019-04-23 12:42 ` Jean-Francois Dagenais
2019-04-23 13:32   ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).