lkml.org 
[lkml]   [2016]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCHv3] hwmon: Add tc654 driver
Date
On 10/11/2016 02:22 AM, Guenter Roeck wrote:
>> + if (val)
>> > + 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?

\
 
 \ /
  Last update: 2016-10-10 22:09    [W:0.072 / U:0.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site