Thread (13 messages) 13 messages, 3 authors, 2016-10-12

Re: [PATCHv3] hwmon: Add tc654 driver

From: Chris Packham <Chris.Packham@alliedtelesis.co.nz>
Date: 2016-10-10 20:08:27
Also in: linux-hwmon, linux-i2c, lkml

On 10/11/2016 02:22 AM, Guenter Roeck wrote:
quoted
+	if (val)
quoted
+		data->config |= TC654_REG_CONFIG_DUTYC;
+	else
+		data->config &= ~TC654_REG_CONFIG_DUTYC;
I just realized that this won't work as intended. Problem is that you
only fill data->config when reading an attribute. So, if a set function
is called prior to reading an attribute, data->config will be 0, and
you end up overwriting the original configuration.
Should I just read it in the probe function or fill it in with the 
documented hardware defaults?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help