hwmon: (pmbus) More stringent checking of VOUT_MODE register
hwmon: (pmbus) More stringent checking of VOUT_MODE register

Some PMBus chips do not support the VOUT_MODE register. To make matters worse,
such chips may not return an error when reading the register either, but instead
return 0xff.

Check if the register exists using pmbus_check_byte_register() before reading
its value. In addition, validate the returned value and ignore it if it is 0xff
(which is invalid).

Reported-by: Greg Schnorr <cf116225fd1d27178a36045207dbd10ada379666@cisco.com>
Tested-by: Greg Schnorr <cf116225fd1d27178a36045207dbd10ada379666@cisco.com>
Signed-off-by: Guenter Roeck <32ce62c5480002985aec58d7044038218061ef55@ericsson.com>
Acked-by: Greg Schnorr <cf116225fd1d27178a36045207dbd10ada379666@cisco.com>

TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs