hwmon: (pmbus/pxe1610) don't bail out when not all pages are active
[ Upstream commitf025314306] 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:b9fa0a3acf("hwmon: (pmbus/core) Add support for vid mode detection per page bases") Signed-off-by: Paul Fertser <fercerpav@gmail.com> Link: https://lore.kernel.org/r/20210416102926.13614-1-fercerpav@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
ee9bc379e4
commit
816fbc17cb
1 changed files with 9 additions and 0 deletions
|
|
@ -41,6 +41,15 @@ static int pxe1610_identify(struct i2c_client *client,
|
|||
info->vrm_version[i] = vr13;
|
||||
break;
|
||||
default:
|
||||
/*
|
||||
* If prior pages are available limit operation
|
||||
* to them
|
||||
*/
|
||||
if (i != 0) {
|
||||
info->pages = i;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -ENODEV;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue