Currently there is an assumption that 'input', 'limits' and 'history' registers use the same conversion format within the sensor class. However some devices could be configured with different format for reading 'input' and 'limits' or 'history' registers. Patch#1 adds reg2data() callback. Patch#2 utilizes this callback for 'xdpe12284' driver. Vadim Pasternak (2): hwmon: (pmbus/core) Add callback for register to data conversion hwmon: (pmbus/xdpe12284) Add custom format for vout limits conversion drivers/hwmon/pmbus/pmbus.h | 1 + drivers/hwmon/pmbus/pmbus_core.c | 4 ++++ drivers/hwmon/pmbus/xdpe12284.c | 23 +++++++++++++++++++++++ 3 files changed, 28 insertions(+) -- 2.11.0