07 Feb, 2013

2 commits

  • For PMBus chips, modifying one limit register may affect other limits.
    Since limits are all cached in the PMBus core driver, related changes
    are not reflected in reported limits.

    Introduce function to clear the attribute cache. After calling this function,
    the core pmbus driver re-reads all cached values.

    Signed-off-by: Guenter Roeck

    Guenter Roeck
     
  • Some PMBus chips support monitoring an additional non-standard voltage. While
    this voltage can in many cases be supported by simulating an additional sensor
    page, this does not work in all cases. Specifically, it is problematic if the
    data format is linear and the voltage is reported in LINEAR11 format. Since
    output voltages use LINEAR16, and the exponent for LINEAR16 data is chip-wide
    and fixed, this can result in overflows.

    To solve this problem, add support for an additional virtual input voltage,
    call it 'vmon', and treat this voltage as input voltage (which, when the chip
    supports linear data format, uses LINEAR11).

    Signed-off-by: Guenter Roeck

    Guenter Roeck
     

19 Mar, 2012

2 commits


25 Oct, 2011

3 commits

  • At least one PMBus chip supports peak attributes for READ_TEMPERATURE2.
    Add virtual registers to be able to report it to the user.

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

    Guenter Roeck
     
  • Driver remove functions have an error return value, but rarely return an error
    in practice. If a driver does return an error from its remove function, the
    driver won't be unloaded and is expected to stay alive.

    pmbus_do_remove() is defined as returning an int, but always returns 0 (no
    error). Calling code passes that return value on to high level driver
    remove functions, but does not evaluate it and removes driver data even if
    pmbus_do_remove() returned an error (which it in practice never does). Even if
    this code could never cause a real problem, it is nevertheless conceptually
    wrong.

    To reduce confusion and simplify the code, change pmbus_do_remove() to be a void
    function, and have PMBus client drivers always return zero in their driver
    remove functions.

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

    Guenter Roeck
     
  • Return values for functions reading/writing manufacturer specific registers are
    poorly explained. Add comments to improve documentation.

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

    Guenter Roeck
     

12 Aug, 2011

1 commit


29 Jul, 2011

6 commits

  • PMBus client driver supporting National Semiconductor LM25066, LM5064, and LM5066.

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

    Guenter Roeck
     
  • Most PMBus devices provide manufacturer specific commands to read low and/or
    high peak values for some or all of its sensors.

    To support providing those values as lowest/highest attributes to the user,
    introduce virtual PMBus commands. Those commands reside outside the normal
    command set and have to be implemented in device specific code, which map the
    virtual commands to device specific commands.

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

    Guenter Roeck
     
  • Some PMBus chips have non-standard sensor registers. An easy way to
    support such sensors is to introduce virtual pages and map the non-standard
    registers into standard registers on an extra page.

    For this to work, the code verifying if the configured number of pages exists
    has to be removed. Since a wrong number of pages can only be configured in a
    front-end driver, this should not have a practical impact since the resulting
    errors should be found during development and testing.

    Also, functions to read the chip status while checking if a command register
    exists must be modified to no longer set the page register before reading the
    status, since the physical page associated with the checked register may not
    exist. This does not make a functional difference since the page was already set
    when the attempt to read the register was made.

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

    Guenter Roeck
     
  • Some PMBus devices use non-standard registers for some of the sensors and/or
    limits. To support such devices, add code to support reading and writing of word
    size registers in device specific code.

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

    Guenter Roeck
     
  • In VID mode, output voltages are measured and reported as VID values, and
    have to be converted to voltages using VID conversion tables or functions.
    Support is added for VR11 only at this time.

    This patch enables support for PMBus devices supporting VID VR11 based output
    voltage selection such as NCP4200 and NCP4208.

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

    Guenter Roeck
     
  • Since the number of PMBus drivers is getting large, move them into
    directory drivers/hwmon/pmbus to improve readability and scalability.

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

    Guenter Roeck