From: ainux.wang@gmail.com
To: jdelvare@suse.com, linux@roeck-us.net, corbet@lwn.net,
ainux.wang@gmail.com
Cc: linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org,
sterlingteng@gmail.com, chenhuacai@kernel.org,
chenhuacai@loongson.cn
Subject: [RFC] hwmon: (pmbus) Some questions about PMBUS_STATUS
Date: Thu, 24 Jun 2021 10:23:27 +0800 [thread overview]
Message-ID: <20210624022327.6192-1-ainux.wang@gmail.com> (raw)
From: "Ainux.Wang" <ainux.wang@gmail.com>
There are some questions about PMBUS_STATUS in core.
Signed-off-by: Ainux.Wang <ainux.wang@gmail.com>
---
drivers/hwmon/pmbus/pmbus_core.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c
index bbd745178147..e16c85997148 100644
--- a/drivers/hwmon/pmbus/pmbus_core.c
+++ b/drivers/hwmon/pmbus/pmbus_core.c
@@ -2200,6 +2200,19 @@ static int pmbus_init_common(struct i2c_client *client, struct pmbus_data *data,
* Some PMBus chips don't support PMBUS_STATUS_WORD, so try
* to use PMBUS_STATUS_BYTE instead if that is the case.
* Bail out if both registers are not supported.
+ *
+ * Question 1:
+ * Why bail out if both registers are not supported?
+ * MP2949A both registers are not supported.
+ *
+ * Question 2:
+ * Use i2c_smbus_read_word_data() or i2c_smbus_read_byte_data
+ * to read, the MP2949A will return undetermined value, although
+ * we already known this chip do not support both registers.
+ * What should we do?
+ * Can we use pmbus_read_status_byte() or pmbus_read_status_word()?
+ * and in MP2949A driver's .read_byte_data and .read_word_data to
+ * filter out both registers?
*/
data->read_status = pmbus_read_status_word;
ret = i2c_smbus_read_word_data(client, PMBUS_STATUS_WORD);
--
2.18.1
next reply other threads:[~2021-06-24 2:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-24 2:23 ainux.wang [this message]
2021-06-24 12:32 ` [RFC] hwmon: (pmbus) Some questions about PMBUS_STATUS Guenter Roeck
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=20210624022327.6192-1-ainux.wang@gmail.com \
--to=ainux.wang@gmail.com \
--cc=chenhuacai@kernel.org \
--cc=chenhuacai@loongson.cn \
--cc=corbet@lwn.net \
--cc=jdelvare@suse.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=sterlingteng@gmail.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