hwmon: pmbus: pxe1610: don't bail out when not all pages are active
PATCH 1/1 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.
--- drivers/hwmon/pmbus/pxe1610.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
drivers/hwmon/pmbus/pxe1610.c +10 -1
@@ -41,7 +41,16 @@ static int pxe1610_identify(struct i2c_client *client, info->vrm_version[i] = vr13;break ;default : -return -ENODEV ; +/* +* If prior pages are available limit operation +* to them +*/ +if (i !=0 ) { + info->pages = i; +return 0 ; + }else { +return -ENODEV ; + } } } }
Signature · 1 line
2.17.1
Guenter Roeck
maintainerQuoted 18 lines · Paul Fertser
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 b9fa0a3acfd8 ("hwmon: (pmbus/core) Add support for vid mode detection per page bases")Signed-off-by Paul Fertser <[email protected]>--- drivers/hwmon/pmbus/pxe1610.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)drivers/hwmon/pmbus/pxe1610.c +0
-1@@ -41,7 +41,16 @@ static int pxe1610_identify(struct i2c_client *client, info->vrm_version[i] = vr13;break ;default : -return -ENODEV ;
drivers/hwmon/pmbus/pxe1610.c static int pxe1610_identify(struct i2c_client *client, · line 53
Quoted 10 lines
drivers/hwmon/pmbus/pxe1610.c +10
-0+/* +* If prior pages are available limit operation +* to them +*/ +if (i !=0 ) { + info->pages = i; +return 0 ; + }else { +return -ENODEV ; + }
else after return is unnecessary.
Thanks,
Guenter
PATCH v2 1/1 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.
---
Notes:
Changes for v2:
- Use more imperative style
drivers/hwmon/pmbus/pxe1610.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/hwmon/pmbus/pxe1610.c +9 -0
@@ -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 ; } }
Signature · 1 line
2.20.1
Quoted 5 lines · Paul Fertser
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 b9fa0a3acfd8 ("hwmon: (pmbus/core) Add support for vid mode detection per page bases")Signed-off-by Paul Fertser <[email protected]>
Applied.
Thanks,
Guenter
Quoted 32 lines
---
Notes:
Changes for v2:
- Use more imperative styledrivers/hwmon/pmbus/pxe1610.c | 9 +++++++++ 1 file changed, 9 insertions(+)drivers/hwmon/pmbus/pxe1610.c +9
-0@@ -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 ; } }Signature · 1 line
2.20.1