devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Chris Packham <Chris.Packham@alliedtelesis.co.nz>
Cc: "linux-hwmon@vger.kernel.org" <linux-hwmon@vger.kernel.org>,
	Masahiko Iwamoto <iwamoto@allied-telesis.co.jp>,
	Joshua Scott <Joshua.Scott@alliedtelesis.co.nz>,
	Kevin Tsai <ktsai@capellamicro.com>,
	Wolfram Sang <wsa@the-dreams.de>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Jean Delvare <jdelvare@suse.com>,
	Jonathan Corbet <corbet@lwn.net>,
	"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>
Subject: Re: [PATCHv3] hwmon: Add tc654 driver
Date: Mon, 10 Oct 2016 13:59:26 -0700	[thread overview]
Message-ID: <20161010205926.GA16967@roeck-us.net> (raw)
In-Reply-To: <f82bbcd4330e4389990f95bd9d0d7b02@svr-chch-ex1.atlnz.lc>

On Mon, Oct 10, 2016 at 08:08:14PM +0000, Chris Packham wrote:
> 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?

Reading it would be better - that leaves the option open that it was configured
by ROMMON or BIOS.

Guenter

  reply	other threads:[~2016-10-10 20:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-06 22:57 [PATCHv1] hwmon: Add tc654 driver Guenter Roeck
2016-10-06 23:13 ` Chris Packham
2016-10-07  1:38 ` [PATCHv2] " Chris Packham
2016-10-07 18:29   ` Guenter Roeck
2016-10-09 21:21     ` Chris Packham
2016-10-09 22:12     ` [PATCHv3] " Chris Packham
     [not found]       ` <20161009221222.29409-1-chris.packham-6g8wRflRTwXFdCa3tKVlE6U/zSkkHjvu@public.gmane.org>
2016-10-10 13:21         ` Guenter Roeck
2016-10-10 20:08           ` Chris Packham
2016-10-10 20:59             ` Guenter Roeck [this message]
2016-10-10 21:26           ` [PATCHv4] " Chris Packham
2016-10-10 21:54             ` Rob Herring
2016-10-12 13:03             ` Guenter Roeck
2016-10-12 20:17               ` Chris Packham

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161010205926.GA16967@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=Chris.Packham@alliedtelesis.co.nz \
    --cc=Joshua.Scott@alliedtelesis.co.nz \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=iwamoto@allied-telesis.co.jp \
    --cc=jdelvare@suse.com \
    --cc=ktsai@capellamicro.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).