diff mbox series

hwmon: (pmbus/mp2975) Correct comment inside 'mp2975_read_byte_data'

Message ID 20240127154844.989-1-aladyshev22@gmail.com (mailing list archive)
State Accepted
Headers show
Series hwmon: (pmbus/mp2975) Correct comment inside 'mp2975_read_byte_data' | expand

Commit Message

Konstantin Aladyshev Jan. 27, 2024, 3:48 p.m. UTC
The current driver code no longer perfrom internal conversion from
VID to direct. Instead it configures READ_VOUT using MFR_DC_LOOP_CTRL.
Correct the comment message inside the 'mp2975_read_byte_data'
function to comply with the driver logic.

Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
---
 drivers/hwmon/pmbus/mp2975.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Comments

Guenter Roeck Jan. 27, 2024, 4:04 p.m. UTC | #1
On Sat, Jan 27, 2024 at 06:48:44PM +0300, Konstantin Aladyshev wrote:
> The current driver code no longer perfrom internal conversion from
> VID to direct. Instead it configures READ_VOUT using MFR_DC_LOOP_CTRL.
> Correct the comment message inside the 'mp2975_read_byte_data'
> function to comply with the driver logic.
> 
> Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>

Applied.

Thanks,
Guenter
diff mbox series

Patch

diff --git a/drivers/hwmon/pmbus/mp2975.c b/drivers/hwmon/pmbus/mp2975.c
index 5bbfdacb61a7..e5fa10b3b8bc 100644
--- a/drivers/hwmon/pmbus/mp2975.c
+++ b/drivers/hwmon/pmbus/mp2975.c
@@ -131,10 +131,9 @@  static int mp2975_read_byte_data(struct i2c_client *client, int page, int reg)
 	switch (reg) {
 	case PMBUS_VOUT_MODE:
 		/*
-		 * Enforce VOUT direct format, since device allows to set the
-		 * different formats for the different rails. Conversion from
-		 * VID to direct provided by driver internally, in case it is
-		 * necessary.
+		 * Report direct format as configured by MFR_DC_LOOP_CTRL.
+		 * Unlike on MP2971/MP2973 the reported VOUT_MODE isn't automatically
+		 * internally updated, but always reads as PB_VOUT_MODE_VID.
 		 */
 		return PB_VOUT_MODE_DIRECT;
 	default: