• Marius Zachmann's avatar
    hwmon: (corsair-cpro) add reading pwm values · fa4dac3e
    Marius Zachmann authored
    This adds the possibility for reading pwm values.
    These can not be read if the device is controlled via
    fan_target or a fan curve and will return an error in
    this case. Since an error is expected, this adds some
    rudimentary error handling.
    
    Changes:
    - add CTL_GET_FAN_PWM and use it via get_data
    - pwm returns -ENODATA if the device returns error 0x12
    - fan_target now returns -ENODATA when the driver is
      started or a pwm value is set.
    - add ccp_get_errno to determine errno from device error.
    - get_data now has a parameter to determine whether
      to read one or two bytes of data.
    - update documentation
    - fix missing surname in MAINTAINERS
    Signed-off-by: default avatarMarius Zachmann <mail@mariuszachmann.de>
    Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
    fa4dac3e
corsair-cpro.rst 1.27 KB