linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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: [PATCH v6 0/2] hwmon: (pmbus) Add support for MPS MP2949A
Date: Fri,  2 Jul 2021 15:31:40 +0800	[thread overview]
Message-ID: <20210702073142.15166-1-ainux.wang@gmail.com> (raw)

From: "Ainux.Wang" <ainux.wang@gmail.com>

PART 1 (The chip driver):
Add support for MP2949A device from Monolithic Power Systems, Inc. (MPS).
This is a triple-loop, digital, multi-phase controller.
This device:
- Supports up to three power rail.
- Provides 6 pulse-width modulations (PWMs), and can be configured up
  to 6-phase operation for Rail A , up to 2-phase operation for Rail B
  and up to 1-phase operation for Rail C.
- The PMBus registers are distributed into three pages: Page 0, Page 1,
  Page 2. Page 0 contains the registers for Rail A and most of the common
  settings for all of the rails. Page 1 contains register information for
  Rail B. Page 2 contains register information for Rail C.
- The MP2949A supports both 5mV VID step and 10mv VID step for IMVP8 and
  IMVP9.

v6:
- Add mp2949a_read_byte_data(), mp2949a_read_word_data(), and the mp2949a
  do not support STATUS_BYTE, STATUS_WORD, and VOUT_MODE ,but return some
  random data when reading them.

v5:
- Moved change log to right here.

v4:
- Removed mp2949a_read_byte_data().
- Added space before and after '-' and fixed a bug that is '~' on line 35.

v3:
- Added change log here.
- Errors in the document have been modified.
- Fixed PMBUS_VOUT_MODE to MP2949A_MFR_VR_CONFIG.
- Removed unnecessary vout_params and empty line.

v2:
- Reference has been added to Documentation/hwmon/index.rst.
- Droped 'vendor'.
- Removed change codes of the PMBus core and added mp2949a_identify()
  and mp2949a_read_byte_data() to this driver.

v1:
- Add support for MPS MP2949A.

PART 2(PMbus Core):
There is a case(like MP2949A) that the chip do not support STATUS_WORD
and STATUS_BYTE command, but return some random data when reading.

So we should call read_status() instead of i2c_smbus_read_word_data()
and i2c_smbus_read_byte_data(), and the chip driver should implement a
read_word_data() function and a read_byte_data() function to return
-ENXIO.

Ainux.Wang (2):
  hwmon: (pmbus) Add support for MPS MP2949A
  hwmon: (pmbus) Try use read_status() to read status register

 Documentation/hwmon/index.rst    |   1 +
 Documentation/hwmon/mp2949a.rst  |  44 ++++++++++
 drivers/hwmon/pmbus/Kconfig      |   9 ++
 drivers/hwmon/pmbus/Makefile     |   1 +
 drivers/hwmon/pmbus/mp2949a.c    | 136 +++++++++++++++++++++++++++++++
 drivers/hwmon/pmbus/pmbus_core.c |  20 +++--
 6 files changed, 206 insertions(+), 5 deletions(-)
 create mode 100644 Documentation/hwmon/mp2949a.rst
 create mode 100644 drivers/hwmon/pmbus/mp2949a.c

-- 
2.18.1


             reply	other threads:[~2021-07-02  7:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-02  7:31 ainux.wang [this message]
2021-07-02  7:31 ` [PATCH v6 1/2] hwmon: (pmbus) Add support for MPS MP2949A ainux.wang
2021-07-02 14:59   ` Guenter Roeck
2021-07-02  7:31 ` [PATCH v6 2/2] hwmon: (pmbus) Try use read_status() to read status register ainux.wang
2021-07-02 14:59   ` 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=20210702073142.15166-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;
as well as URLs for NNTP newsgroup(s).