mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: rentao.bupt@gmail.com
To: Guenter Roeck <linux@roeck-us.net>,
	Jean Delvare <jdelvare@suse.com>,
	linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
	taoren@meta.com
Cc: Tao Ren <rentao.bupt@gmail.com>
Subject: [PATCH] hwmon: (pmbus/bel-pfe) Enable PMBUS_SKIP_STATUS_CHECK for pfe1100
Date: Thu,  3 Aug 2023 16:55:36 -0700	[thread overview]
Message-ID: <20230803235536.798166-1-rentao.bupt@gmail.com> (raw)

From: Tao Ren <rentao.bupt@gmail.com>

Enable PMBUS_SKIP_STATUS_CHECK flag for both pfe1100 and pfe3000 because
the similar communication error is observed on pfe1100 devices.

Signed-off-by: Tao Ren <rentao.bupt@gmail.com>
---
 drivers/hwmon/pmbus/bel-pfe.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/hwmon/pmbus/bel-pfe.c b/drivers/hwmon/pmbus/bel-pfe.c
index fa5070ae26bc..8280d274da3f 100644
--- a/drivers/hwmon/pmbus/bel-pfe.c
+++ b/drivers/hwmon/pmbus/bel-pfe.c
@@ -17,12 +17,12 @@
 enum chips {pfe1100, pfe3000};
 
 /*
- * Disable status check for pfe3000 devices, because some devices report
+ * Disable status check for pfexxxx devices, because some devices report
  * communication error (invalid command) for VOUT_MODE command (0x20)
  * although correct VOUT_MODE (0x16) is returned: it leads to incorrect
  * exponent in linear mode.
  */
-static struct pmbus_platform_data pfe3000_plat_data = {
+static struct pmbus_platform_data pfe_plat_data = {
 	.flags = PMBUS_SKIP_STATUS_CHECK,
 };
 
@@ -94,6 +94,7 @@ static int pfe_pmbus_probe(struct i2c_client *client)
 	int model;
 
 	model = (int)i2c_match_id(pfe_device_id, client)->driver_data;
+	client->dev.platform_data = &pfe_plat_data;
 
 	/*
 	 * PFE3000-12-069RA devices may not stay in page 0 during device
@@ -101,7 +102,6 @@ static int pfe_pmbus_probe(struct i2c_client *client)
 	 * So let's set the device to page 0 at the beginning.
 	 */
 	if (model == pfe3000) {
-		client->dev.platform_data = &pfe3000_plat_data;
 		i2c_smbus_write_byte_data(client, PMBUS_PAGE, 0);
 	}
 
-- 
2.40.1


             reply	other threads:[~2023-08-03 23:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-03 23:55 rentao.bupt [this message]
2023-08-04 15:19 ` Guenter Roeck
2023-08-04 22:17   ` Tao Ren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230803235536.798166-1-rentao.bupt@gmail.com \
    --to=rentao.bupt@gmail.com \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=taoren@meta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®