06 Jan, 2012

1 commit


25 Oct, 2011

4 commits

  • Always call _pmbus_read_byte() instead of pmbus_read_byte() in PMBus core
    driver. With this change, device specific read functions can be implemented for
    all registers.

    Since the device specific read_byte function is now always called, we need to be
    more careful with page validations. Only fail if the passed page number is larger
    than 0, since -1 means "current page".

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

    Guenter Roeck
     
  • ADM1276 is mostly compatible to ADM1275, with added support for input power
    measurement. Add support for it to the ADM1275 driver.

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

    Guenter Roeck
     
  • ADM1275 supports a second current limit, which can be configured as either lower
    or upper limit. Add support for it and report it as either lower or upper
    critical current limit.

    Also replace error return code EINVAL for unsupported pages with ENXIO as this
    is more appropriate for the observed condition.

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

    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
     

29 Jul, 2011

3 commits