Skip to content
Snippets Groups Projects
  • Hans de Goede's avatar
    7669896f
    hwmon: (f71882fg) Add support for the f71889fg (version 2) · 7669896f
    Hans de Goede authored
    
    This adds support for the Fintek f71889fg to the f71882fg driver,
    many thanks to Gerd v. Egidy for providing (remote) access to a
    machine which such an ic.
    
    Note that this bit of the patch:
    -	val = SENSORS_LIMIT(val, 0, 255);
    +
    +	if (data->type == f71889fg)
    +		val = SENSORS_LIMIT(val, -128, 127);
    +	else
    +		val = SENSORS_LIMIT(val, 0, 127);
    
    Changes behaviour for already supported models, the new behaviour is correct
    as the already supported models have bit 7 of the involved registers fixed at
    0, so the previous behaviour which allowed setting temp zone limits > 127
    was not correct.
    
    Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
    Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
    7669896f
    History
    hwmon: (f71882fg) Add support for the f71889fg (version 2)
    Hans de Goede authored
    
    This adds support for the Fintek f71889fg to the f71882fg driver,
    many thanks to Gerd v. Egidy for providing (remote) access to a
    machine which such an ic.
    
    Note that this bit of the patch:
    -	val = SENSORS_LIMIT(val, 0, 255);
    +
    +	if (data->type == f71889fg)
    +		val = SENSORS_LIMIT(val, -128, 127);
    +	else
    +		val = SENSORS_LIMIT(val, 0, 127);
    
    Changes behaviour for already supported models, the new behaviour is correct
    as the already supported models have bit 7 of the involved registers fixed at
    0, so the previous behaviour which allowed setting temp zone limits > 127
    was not correct.
    
    Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
    Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>