20 Oct, 2011

1 commit

  • Since 8-bit temperature values are now handled in 16-bit struct
    members, values have to be cast to s8 for negative temperatures to be
    properly handled. This is broken since kernel version 2.6.39
    (commit bce26c58df86599c9570cee83eac58bdaae760e4.)

    Signed-off-by: Jean Delvare
    Cc: Guenter Roeck
    Cc: stable@kernel.org # 2.6.39+
    Signed-off-by: Guenter Roeck

    Jean Delvare
     

14 Oct, 2011

1 commit

  • The w83627ehf driver is improperly reporting thermal diode sensors as
    type 2, instead of 3. This caused "sensors" and possibly other
    monitoring tools to report these sensors as "transistor" instead of
    "thermal diode".

    Furthermore, diode subtype selection (CPU vs. external) is only
    supported by the original W83627EHF/EHG. All later models only support
    CPU diode type, and some (NCT6776F) don't even have the register in
    question so we should avoid reading from it.

    Signed-off-by: Jean Delvare
    Cc: stable@kernel.org
    Signed-off-by: Guenter Roeck

    Jean Delvare
     

28 Sep, 2011

2 commits

  • Storing the struct temp_data pointer allocated from create_core_data()
    when returning an error has the potential of leaving around a pointer
    to freed memory. Reset it to NULL for error returns.

    Reported-by: Jan Beulich
    Signed-off-by: Guenter Roeck
    Acked-by: Jean Delvare

    Guenter Roeck
     
  • With recent change "hwmon: (coretemp) don't use kernel assigned CPU
    number as platform device ID", the microcode check is now running on
    random CPU. Fix that by checking the microcode before creating the
    platform device rather than at probe time.

    Also avoid calling TO_PHYS_ID(cpu) twice in the same function, it's
    expensive.

    Signed-off-by: Jean Delvare
    Cc: Jan Beulich
    Cc: Guenter Roeck
    Signed-off-by: Guenter Roeck

    Jean Delvare
     

24 Sep, 2011

3 commits


22 Sep, 2011

5 commits

  • Signed (negative) temperatures were not handled correctly.

    Signed-off-by: Roland Stigge
    Signed-off-by: Guenter Roeck
    Cc: stable@kernel.org # v2.6.38+

    Roland Stigge
     
  • gcc -Wextra warns "register is not at beginning of declaration" because the
    compiler thinks the parameter has been marked as a 'register' variable, but
    the function prototype intended to name the parameter "register" (which is a
    reserved keyword).

    Signed-off-by: Chris Peterson
    Acked-by: Marc Hulsman
    Signed-off-by: Guenter Roeck

    Chris Peterson
     
  • With commit c814a4c7c4aad795835583344353963a0a673eb0, the meaning of tempX_max
    was changed. It no longer returns the value of bits 8:15 of
    MSR_IA32_TEMPERATURE_TARGET, but instead returns the value of CPU threshold
    register T1. tempX_max_hyst was added to reflect the value of temperature
    threshold register T0.

    As it turns out, T0 and T1 are used on some systems, presumably by the BIOS.
    Also, T0 and T1 don't have a well defined meaning. The thresholds may be used
    as upper or lower limits, and it is not guaranteed that T0
    Cc: Fenghua Yu
    Cc: Durgadoss R
    Acked-by: Jean Delvare

    Guenter Roeck
     
  • On old CPUs (and even some recent Atom CPUs) TjMax can't be read from
    the CPU registers, so it is guessed by the driver using a complex
    heuristic which isn't reliable. So let users who know their CPU's
    TjMax pass it as a module parameter.

    Signed-off-by: Jean Delvare
    Cc: Fenghua Yu
    Cc: "R, Durgadoss"
    Cc: Guenter Roeck
    Cc: Alexander Stein
    Acked-by: Fenghua Yu
    Signed-off-by: Guenter Roeck

    Jean Delvare
     
  • Function get_pkg_tjmax is a simplified copy of get_tjmax. Drop it and
    always use get_tjmax, result is the same and this avoids code
    duplication.

    Also make get_tjmax less verbose: don't warn about MSR read failure
    when failure was expected, and don't report TjMax in the logs unless
    debugging is enabled.

    Signed-off-by: Jean Delvare
    Cc: Fenghua Yu
    Cc: Guenter Roeck
    Cc: Durgadoss R
    Acked-by: Fenghua Yu
    Signed-off-by: Guenter Roeck

    Jean Delvare
     

14 Sep, 2011

1 commit

  • ttarget is initialized when the driver is loaded, but tmin is not.
    As a result, tempX_max_hyst attributes read 0. Fix this.

    Also use THERM_*_THRESHOLD* constants in these initializations instead
    of hard-coding the constants.

    Signed-off-by: Jean Delvare
    Cc: "R, Durgadoss"
    Cc: Guenter Roeck
    Cc: Fenghua Yu
    Signed-off-by: Guenter Roeck

    Jean Delvare
     

13 Sep, 2011

1 commit

  • Temperature alarms are detected by checking the alarm bit and comparing
    temperature limits against the current temperature. For low limits, this
    comparison needs to be reversed (temp < limit instead of temp > limit).
    This was not taken into account, resulting in wrong alarms if a temperature
    fell below a low limit.

    Fix by adding a low limit flag in the limit data structure. When creating the
    sensor entry, the order of registers to compare is now reversed for low limits.

    Signed-off-by: Guenter Roeck
    Acked-by: Jean Delvare
    Cc: stable@kernel.org # 3.0+

    Guenter Roeck
     

06 Sep, 2011

2 commits


24 Aug, 2011

1 commit


23 Aug, 2011

1 commit

  • Replace unnecessary if with else statement.

    This fixes the following (false) compile warning reported with some combinations
    of C compiler version and configuration.

    drivers/hwmon/ntc_thermistor.c: In function 'ntc_show_temp':
    drivers/hwmon/ntc_thermistor.c:225: warning: 'low' may be used uninitialized in
    this function
    drivers/hwmon/ntc_thermistor.c:225: note: 'low' was declared here
    drivers/hwmon/ntc_thermistor.c:225: warning: 'high' may be used uninitialized in
    this function
    drivers/hwmon/ntc_thermistor.c:225: note: 'high' was declared here
    drivers/hwmon/ntc_thermistor.c:294: warning: 'temp' may be used uninitialized in
    this function

    Signed-off-by: Guenter Roeck
    Acked-by: Jean Delvare

    Guenter Roeck
     

12 Aug, 2011

3 commits

  • rs_resp is dynamically allocated in aem_read_sensor(), so it should be freed
    before exiting in every case. This collects the kfree and the return at
    the end of the function.

    Signed-off-by: Julia Lawall
    Signed-off-by: Guenter Roeck
    Cc: stable@kernel.org # 2.6.27+

    Julia Lawall
     
  • pmbus_clear_faults() attempts to clear faults on non-existing real pages.
    As a result, the command error bit in the status register is set, and faults
    are not really cleared.

    All byte writes to non-zero pages are requests to clear the status register
    on that page. Since non-zero pages are virtual and do not exist on the chip,
    there is nothing to do, and such requests have to be ignored. This fixes
    above problem.

    Signed-off-by: Guenter Roeck
    Reviewed-by: Robert Coulson

    Guenter Roeck
     
  • With virtual pages and to be able to handle more chips, it is necessary to
    virtualise pmbus_write_byte().

    Signed-off-by: Guenter Roeck
    Reviewed-by: Robert Coulson

    Guenter Roeck
     

31 Jul, 2011

1 commit

  • * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging: (24 commits)
    hwmon: (lm90) Refactor reading of config2 register
    hwmon: (lm90) Make SA56004 detection more robust
    hwmon: (lm90) Simplify handling of extended local temp register
    hwmon: (pmbus) Add client driver for LM25066, LM5064, and LM5066
    hwmon: (max34440) Add support for peak attributes
    hwmon: (max8688) Add support for peak attributes
    hwmon: (max16064) Add support for peak attributes
    hwmon: (adm1275) Add support for peak attributes
    hwmon: (pmbus) Add support for peak attributes
    hwmon: Add new attributes to sysfs ABI
    hwmon: (pmbus) Strengthen check for status register existence
    hwmon: (pmbus) Add support for virtual pages
    hwmon: (pmbus) Support reading and writing of word registers in device specific code
    hwmon: (pmbus) Increase attribute name size
    hwmon: (pmbus) Add ADP4000, NCP4200 and NCP4208 to list of supported devices
    hwmon: (pmbus) Add support for VID output voltage mode
    hwmon: (pmbus) Move PMBus drivers to drivers/hwmon/pmbus
    hwmon: (coretemp) Add core/pkg threshold support to Coretemp
    hwmon: (lm95241) Add support for LM95231
    hwmon: LM95245 driver
    ...

    Linus Torvalds
     

29 Jul, 2011

16 commits


28 Jul, 2011

2 commits

  • This patch adds the core and pkg support to coretemp.
    These thresholds can be configured via the sysfs interfaces tempX_max
    and tempX_max_hyst. An interrupt is generated when CPU temperature reaches
    or crosses above tempX_max OR drops below tempX_max_hyst.

    This patch is based on the documentation in IA Manual vol 3A, that can be
    downloaded from here:
    http://download.intel.com/design/processor/manuals/253668.pdf

    Signed-off-by: Durgadoss R
    Signed-off-by: Guenter Roeck

    Durgadoss R
     
  • LM95231 is fully compatible to LM95241; only necessary change is to add
    chip detection.

    Signed-off-by: Guenter Roeck
    Acked-by: Jean Delvare

    Guenter Roeck