Re: [PATCH v4] hwmon: Add support for MAX6642

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Per,

On Wed, Apr 06, 2011 at 02:29:44PM -0400, Per Dalén wrote:
> First a big thanks to Guenter Roeck for helping me (allot) to cleanup
> this driver
> 
> v3 -> v4:
>  * Removed "data->valid = 0;" (missed that in v3 ;)
>  * only read the limits once
>  * changed the temp_input and temp_high as suggested by Guenter, also
> changed the functions/macros related to that change

> MAX6642 is a SMBus-Compatible Remote/Local Temperature Sensor with Overtemperature Alarm from Maxim.
>  
> Signed-off-by: Per Dalen <per.dalen@xxxxxxxxxxxx>
> 
Sorry, one more detail I just noticed. More of a question.

[ ... ]
> +
> +static struct max6642_data *max6642_update_device(struct device *dev)
> +{
> +	struct i2c_client *client = to_i2c_client(dev);
> +	struct max6642_data *data = i2c_get_clientdata(client);
> +	u16 val, tmp;
> +
> +	mutex_lock(&data->update_lock);
> +
> +	if (time_after(jiffies, data->last_updated + HZ * 8) || !data->valid) {

Are you sure you only want to update readings every 8 seconds ?

Also, after spending all this time on this driver (and after falling into
the same trap last night with another driver ;), it looks like this is really
just another variant of the lm90, and adding support for max6642 to the lm90
driver might be quite trivial. Have you considered this ?

Thanks,
Guenter


_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors



[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux