13 Nov, 2008

1 commit

  • The adt7468 is a follow-on to the adt7463, so plumb in adt7468 support
    along the same code paths.

    Signed-off-by: Darrick J. Wong
    Cc: Jean Delvare
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Darrick J. Wong
     

17 Oct, 2008

7 commits


01 Aug, 2008

5 commits

  • Clean up and simplify the device initialization function:
    * Degrade error messages to warnings - what they really are.
    * Stop warning about VxI mode, we don't really care.
    * Drop comment about lack of limit initialization - that's the standard
    way, all hardware monitoring drivers do that.
    * Only read the configuration register once.
    * Only write back to the configuration register if needed.
    * Don't attempt to clear the lock bit, it locks itself to 1.
    * Move the function to before it's called, so that we no longer need to
    forware declare it.

    Signed-off-by: Jean Delvare
    Signed-off-by: Mark M. Hoffman

    Jean Delvare
     
  • Misc cleanups to the lm85 hardware monitoring driver:
    * Mark constant arrays as const.
    * Remove useless masks.
    * Have lm85_write_value return void - nobody is checking the returned
    value anyway and in some cases it was plain wrong.
    * Remove useless initializations.
    * Rename new_client to client in lm85_detect.
    * Replace cascaded if/else with a switch/case in lm85_detect.
    * Group similar loops in lm85_update_device.
    * Remove legacy comments.

    Signed-off-by: Jean Delvare
    Acked-by: Juerg Haefliger
    Signed-off-by: Mark M. Hoffman

    Jean Delvare
     
  • In set_pwm_auto_pwm_minctl, we write cached register bits back to the
    chip. This is a bad idea as we have no guarantee that the cache is
    up-to-date. Better read a fresh register value from the chip, it's
    safer and in fact it is also more simple.

    Signed-off-by: Jean Delvare
    Acked-by: Juerg Haefliger
    Signed-off-by: Mark M. Hoffman

    Jean Delvare
     
  • Drop a lot of useless register defines, conversion macros, data structure
    members and update code. All these register values were read from the
    device but nothing is done out of them, so this is all dead code in
    practice.

    Signed-off-by: Jean Delvare
    Acked-by: Juerg Haefliger
    Signed-off-by: Mark M. Hoffman

    Jean Delvare
     
  • Fix most style issues reported by checkpatch, including:
    * Trailing, missing and extra whitespace
    * Extra parentheses, curly braces and semi-colons
    * Broken indentation
    * Lines too long

    I verified that the generated code is the same before and after
    these changes.

    Signed-off-by: Jean Delvare
    Acked-by: Juerg Haefliger
    Signed-off-by: Mark M. Hoffman

    Jean Delvare
     

19 Jun, 2008

1 commit

  • Function RANGE_TO_REG() is broken. For a requested range of 2000 (2
    degrees C), it will return an index value of 15, i.e. 80.0 degrees C,
    instead of the expected index value of 0. All other values are handled
    properly, just 2000 isn't.

    The bug was introduced back in November 2004 by this patch:
    http://git.kernel.org/?p=linux/kernel/git/tglx/history.git;a=commit;h=1c28d80f1992240373099d863e4996cdd5d646d0

    While this can be fixed easily with the current code, I'd rather
    rewrite the whole function in a way which is more obviously correct.

    Signed-off-by: Jean Delvare
    Cc: Justin Thiessen
    Signed-off-by: Mark M. Hoffman

    Jean Delvare
     

19 Feb, 2008

1 commit


08 Feb, 2008

4 commits

  • What was true of reading the VRM value is also true of writing it: not
    being a register value, it doesn't need hardware access, so we don't
    need a reference to the i2c client. This allows for a minor code
    cleanup. As gcc appears to be smart enough to simplify the generated
    code by itself, this cleanup only affects the source code, the
    generated binaries are unchanged.

    Signed-off-by: Jean Delvare
    Signed-off-by: Mark M. Hoffman

    Jean Delvare
     
  • Many I2C hwmon drivers define a driver ID but no other code references
    these, meaning that they are useless. Discard them, along with a few
    IDs which are defined but never used at all.

    Signed-off-by: Jean Delvare
    Signed-off-by: Mark M. Hoffman

    Jean Delvare
     
  • Make the pwmN_enable files writable. This makes it possible to use
    standard fan speed control tools (pwmconfig, fancontrol) with the lm85
    driver.

    I left the non-standard pwmN_auto_channels files in place, as they
    give additional control for the automatic mode, and some users might
    be used to them by now.

    Signed-off-by: Jean Delvare
    Signed-off-by: Mark M. Hoffman

    Jean Delvare
     
  • The values returned by the lm85 driver in pwmN_enable sysfs files do
    not match the standard. Fix that.

    Signed-off-by: Jean Delvare
    Signed-off-by: Mark M. Hoffman

    Jean Delvare
     

10 Oct, 2007

7 commits

  • The VRM value is not read from chip registers, so there's no need
    to update the device data cache before exporting the VRM value to
    user-space.

    Signed-off-by: Jean Delvare
    Acked-by: Hans de Goede
    Signed-off-by: Mark M. Hoffman

    Jean Delvare
     
  • Trying to set the fan min limit to 0 currently writes 0 to the
    register, which is an invalid value. It's read back as -1 and the
    alarm flag is raised. Instead we should write 0xffff (maximum
    value), which reads back as 0 and no alarm flag is raised.

    Signed-off-by: Jean Delvare
    Acked-by: Juerg Haefliger
    Signed-off-by: Mark M. Hoffman

    Jean Delvare
     
  • The way the lm85 driver currently handles the additional resolution
    bits some chips have for the voltage and temperature measurements is
    quite complex. This is my attempt to make it simpler.

    Signed-off-by: Jean Delvare
    Acked-by: Juerg Haefliger
    Signed-off-by: Mark M. Hoffman

    Jean Delvare
     
  • The future libsensors needs these individual alarm and fault files.

    Also delete old and unused alarm defines.

    Signed-off-by: Jean Delvare
    Acked-by: Juerg Haefliger
    Signed-off-by: Mark M. Hoffman

    Jean Delvare
     
  • The SMSC EMC6D100 supports 3 additional voltage channels. The lm85
    driver reads the register values for these, but doesn't create the
    corresponding sysfs files, so the user can't read the values nor write
    the limits. Create the missing sysfs files.

    Signed-off-by: Jean Delvare
    Acked-by: Juerg Haefliger
    Signed-off-by: Mark M. Hoffman

    Jean Delvare
     
  • This lets us get rid of macro-generated functions and shrinks the
    driver size by about 10%. I used a new style suggested by Mark M.
    Hoffman to retrieve the channel number. Instead of:

    struct sensor_device_attribute *sda = to_sensor_dev_attr(attr);
    int nr = sda->index;

    I do:

    int nr = to_sensor_dev_attr(attr)->index;

    This looks better, and even allows the compiler to do some minor
    optimizations.

    Signed-off-by: Jean Delvare
    Acked-by: Krzysztof Helt
    Signed-off-by: Mark M. Hoffman

    Jean Delvare
     
  • Convert from class_device to device for hwmon_device_register/unregister

    Signed-off-by: Tony Jones
    Signed-off-by: Greg Kroah-Hartman
    Signed-off-by: Kay Sievers
    Signed-off-by: Mark M. Hoffman

    Tony Jones
     

15 Feb, 2007

2 commits


29 Sep, 2006

1 commit


24 Mar, 2006

2 commits

  • "register" is a reserved keyword so using it as a parameter name
    can confuse some compilers, most notably ICC.

    The patch below just renames all occurences to reg which fits the actual
    function declarations.

    Signed-off-by: Darren Jenkins
    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Darren Jenkins
     
  • convert drivers/hwmon/*.c semaphore use to mutexes.

    the conversion was generated via scripts, and the result was validated
    automatically via a script as well.

    all affected hwmon drivers were build-tested.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Ingo Molnar
     

06 Jan, 2006

4 commits


29 Oct, 2005

2 commits


06 Sep, 2005

3 commits

  • The only part left in i2c-sensor is the VRM/VRD/VID handling code.
    This is in no way related to i2c, so it doesn't belong there. Move
    the code to hwmon, where it belongs.

    Note that not all hardware monitoring drivers do VRM/VRD/VID
    operations, so less drivers depend on hwmon-vid than there were
    depending on i2c-sensor.

    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Jean Delvare
     
  • The only thing left in i2c-sensor.h are module parameter definition
    macros. It's only an extension of what i2c.h offers, and this extension
    is not sensors-specific. As a matter of fact, a few non-sensors drivers
    use them. So we better merge them in i2c.h, and get rid of i2c-sensor.h
    altogether.

    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Jean Delvare
     
  • i2c_probe and i2c_detect now do the exact same thing and operate on
    the same data structure, so we can have everyone call i2c_probe.

    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Jean Delvare