Skip to content
Snippets Groups Projects
Commit f0253143 authored by Paul Fertser's avatar Paul Fertser Committed by Guenter Roeck
Browse files

hwmon: (pmbus/pxe1610) don't bail out when not all pages are active


Certain VRs might be configured to use only the first output channel and
so the mode for the second will be 0. Handle this gracefully.

Fixes: b9fa0a3a ("hwmon: (pmbus/core) Add support for vid mode detection per page bases")
Signed-off-by: default avatarPaul Fertser <fercerpav@gmail.com>
Link: https://lore.kernel.org/r/20210416102926.13614-1-fercerpav@gmail.com


Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 1734b413
No related branches found
No related tags found
No related merge requests found
...@@ -41,6 +41,15 @@ static int pxe1610_identify(struct i2c_client *client, ...@@ -41,6 +41,15 @@ static int pxe1610_identify(struct i2c_client *client,
info->vrm_version[i] = vr13; info->vrm_version[i] = vr13;
break; break;
default: default:
/*
* If prior pages are available limit operation
* to them
*/
if (i != 0) {
info->pages = i;
return 0;
}
return -ENODEV; return -ENODEV;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment