Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1498532

Re: [PATCHv3] hwmon: Add tc654 driver

From Guenter Roeck <linux@roeck-us.net>
Newsgroups linux.kernel
Subject Re: [PATCHv3] hwmon: Add tc654 driver
Date 2016-10-10 23:10 +0200
Message-ID <sqPZD-6bP-3@gated-at.bofh.it> (permalink)
References <spI4a-4kf-21@gated-at.bofh.it> <squBP-1uX-1@gated-at.bofh.it> <sqIOu-1Mr-21@gated-at.bofh.it> <sqP3A-5Ds-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCHv1] hwmon: Add tc654 driver Guenter Roeck <linux@roeck-us.net> - 2016-10-07 01:00 +0200
  Re: [PATCHv1] hwmon: Add tc654 driver Chris Packham <Chris.Packham@alliedtelesis.co.nz> - 2016-10-07 01:30 +0200
  [PATCHv2] hwmon: Add tc654 driver Chris Packham <chris.packham@alliedtelesis.co.nz> - 2016-10-07 03:40 +0200
    Re: [PATCHv2] hwmon: Add tc654 driver Guenter Roeck <linux@roeck-us.net> - 2016-10-07 20:30 +0200
      Re: [PATCHv2] hwmon: Add tc654 driver Chris Packham <Chris.Packham@alliedtelesis.co.nz> - 2016-10-09 23:30 +0200
      [PATCHv3] hwmon: Add tc654 driver Chris Packham <chris.packham@alliedtelesis.co.nz> - 2016-10-10 00:20 +0200
        Re: [PATCHv3] hwmon: Add tc654 driver Guenter Roeck <linux@roeck-us.net> - 2016-10-10 15:30 +0200
          Re: [PATCHv3] hwmon: Add tc654 driver Chris Packham <Chris.Packham@alliedtelesis.co.nz> - 2016-10-10 22:10 +0200
            Re: [PATCHv3] hwmon: Add tc654 driver Guenter Roeck <linux@roeck-us.net> - 2016-10-10 23:10 +0200
          [PATCHv4] hwmon: Add tc654 driver Chris Packham <chris.packham@alliedtelesis.co.nz> - 2016-10-10 23:30 +0200
            Re: [PATCHv4] hwmon: Add tc654 driver Rob Herring <robh@kernel.org> - 2016-10-11 00:00 +0200
            Re: [PATCHv4] hwmon: Add tc654 driver Guenter Roeck <linux@roeck-us.net> - 2016-10-12 15:10 +0200
              Re: [PATCHv4] hwmon: Add tc654 driver Chris Packham <Chris.Packham@alliedtelesis.co.nz> - 2016-10-12 22:20 +0200

csiph-web