All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] [PATCH] hwmon: (ds1621) Update zbits after conversion rate change
@ 2014-08-22 19:28 rob.coulson
  2014-08-23 15:13 ` Guenter Roeck
  2014-08-27 14:49 ` Robert Coulson
  0 siblings, 2 replies; 3+ messages in thread
From: rob.coulson @ 2014-08-22 19:28 UTC (permalink / raw)
  To: lm-sensors

From: Robert Coulson <rob.coulson@gmail.com>

After the conversion rate is changed, the zbits are not updated,
but should be, since they are used later in the set_temp function.

This issue was noticed and reported by Murat Ilsever.

Signed-off-by: Robert Coulson <rob.coulson@gmail.com>
---
 drivers/hwmon/ds1621.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/hwmon/ds1621.c b/drivers/hwmon/ds1621.c
index 872d767..b96d201 100644
--- a/drivers/hwmon/ds1621.c
+++ b/drivers/hwmon/ds1621.c
@@ -309,6 +309,7 @@ static ssize_t set_convrate(struct device *dev, struct device_attribute *da,
 	data->conf |= (resol << DS1621_REG_CONFIG_RESOL_SHIFT);
 	i2c_smbus_write_byte_data(client, DS1621_REG_CONF, data->conf);
 	data->update_interval = ds1721_convrates[resol];
+	data->zbits = 7 - resol;
 	mutex_unlock(&data->update_lock);
 
 	return count;
-- 
1.7.3.1


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

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

* Re: [lm-sensors] [PATCH] hwmon: (ds1621) Update zbits after conversion rate change
  2014-08-22 19:28 [lm-sensors] [PATCH] hwmon: (ds1621) Update zbits after conversion rate change rob.coulson
@ 2014-08-23 15:13 ` Guenter Roeck
  2014-08-27 14:49 ` Robert Coulson
  1 sibling, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2014-08-23 15:13 UTC (permalink / raw)
  To: lm-sensors

On 08/22/2014 12:28 PM, rob.coulson@gmail.com wrote:
> From: Robert Coulson <rob.coulson@gmail.com>
>
> After the conversion rate is changed, the zbits are not updated,
> but should be, since they are used later in the set_temp function.
>
> This issue was noticed and reported by Murat Ilsever.

Hi Rob,

good catch. Can you add the reporter with a Reported-by: tag
to give proper credit ?

Also, if possible, it would be great if you can add a Fixes: tag
showing the commit causing the problem. Search for existing Fixes:
tags to see how it is done.

Thanks,
Guenter

>
> Signed-off-by: Robert Coulson <rob.coulson@gmail.com>
> ---
>   drivers/hwmon/ds1621.c |    1 +
>   1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/hwmon/ds1621.c b/drivers/hwmon/ds1621.c
> index 872d767..b96d201 100644
> --- a/drivers/hwmon/ds1621.c
> +++ b/drivers/hwmon/ds1621.c
> @@ -309,6 +309,7 @@ static ssize_t set_convrate(struct device *dev, struct device_attribute *da,
>   	data->conf |= (resol << DS1621_REG_CONFIG_RESOL_SHIFT);
>   	i2c_smbus_write_byte_data(client, DS1621_REG_CONF, data->conf);
>   	data->update_interval = ds1721_convrates[resol];
> +	data->zbits = 7 - resol;
>   	mutex_unlock(&data->update_lock);
>
>   	return count;
>


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

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

* Re: [lm-sensors] [PATCH] hwmon: (ds1621) Update zbits after conversion rate change
  2014-08-22 19:28 [lm-sensors] [PATCH] hwmon: (ds1621) Update zbits after conversion rate change rob.coulson
  2014-08-23 15:13 ` Guenter Roeck
@ 2014-08-27 14:49 ` Robert Coulson
  1 sibling, 0 replies; 3+ messages in thread
From: Robert Coulson @ 2014-08-27 14:49 UTC (permalink / raw)
  To: lm-sensors

Good morning Guenter and thank you for taking the time to review this
patch, I appreciate it.

Yes, I will add the Reported-by and Fixes lines, then resend the updated
patch.

thanks again,

*** Rob.


On Sat, Aug 23, 2014 at 8:13 AM, Guenter Roeck <linux@roeck-us.net> wrote:

> On 08/22/2014 12:28 PM, rob.coulson@gmail.com wrote:
>
>> From: Robert Coulson <rob.coulson@gmail.com>
>>
>> After the conversion rate is changed, the zbits are not updated,
>> but should be, since they are used later in the set_temp function.
>>
>> This issue was noticed and reported by Murat Ilsever.
>>
>
> Hi Rob,
>
> good catch. Can you add the reporter with a Reported-by: tag
> to give proper credit ?
>
> Also, if possible, it would be great if you can add a Fixes: tag
> showing the commit causing the problem. Search for existing Fixes:
> tags to see how it is done.
>
> Thanks,
> Guenter
>
>
>
>> Signed-off-by: Robert Coulson <rob.coulson@gmail.com>
>> ---
>>   drivers/hwmon/ds1621.c |    1 +
>>   1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/hwmon/ds1621.c b/drivers/hwmon/ds1621.c
>> index 872d767..b96d201 100644
>> --- a/drivers/hwmon/ds1621.c
>> +++ b/drivers/hwmon/ds1621.c
>> @@ -309,6 +309,7 @@ static ssize_t set_convrate(struct device *dev,
>> struct device_attribute *da,
>>         data->conf |= (resol << DS1621_REG_CONFIG_RESOL_SHIFT);
>>         i2c_smbus_write_byte_data(client, DS1621_REG_CONF, data->conf);
>>         data->update_interval = ds1721_convrates[resol];
>> +       data->zbits = 7 - resol;
>>         mutex_unlock(&data->update_lock);
>>
>>         return count;
>>
>>
>
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

end of thread, other threads:[~2014-08-27 14:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-22 19:28 [lm-sensors] [PATCH] hwmon: (ds1621) Update zbits after conversion rate change rob.coulson
2014-08-23 15:13 ` Guenter Roeck
2014-08-27 14:49 ` Robert Coulson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.