[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 10 Oct 2016 20:08:14 +0000
From: Chris Packham <Chris.Packham@...iedtelesis.co.nz>
To: Guenter Roeck <linux@...ck-us.net>,
"linux-hwmon@...r.kernel.org" <linux-hwmon@...r.kernel.org>
CC: Masahiko Iwamoto <iwamoto@...ied-telesis.co.jp>,
Joshua Scott <Joshua.Scott@...iedtelesis.co.nz>,
Kevin Tsai <ktsai@...ellamicro.com>,
Wolfram Sang <wsa@...-dreams.de>,
Rob Herring <robh+dt@...nel.org>,
"Mark Rutland" <mark.rutland@....com>,
Jean Delvare <jdelvare@...e.com>,
"Jonathan Corbet" <corbet@....net>,
"linux-i2c@...r.kernel.org" <linux-i2c@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>
Subject: Re: [PATCHv3] hwmon: Add tc654 driver
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?
Powered by blists - more mailing lists