linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Vadim Pasternak <vadimp@mellanox.com>
Cc: robh+dt@kernel.org, vijaykhemka@fb.com,
	linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH hwmon-next v1 2/6] hwmon: (pmbus/core) Add support for Intel IMVP9 and AMD 6.25mV modes
Date: Tue, 14 Jan 2020 06:06:56 -0800	[thread overview]
Message-ID: <20200114140656.GA22468@roeck-us.net> (raw)
In-Reply-To: <20200113150841.17670-3-vadimp@mellanox.com>

On Mon, Jan 13, 2020 at 03:08:37PM +0000, Vadim Pasternak wrote:
> Extend "vrm_version" with the type for Intel IMVP9 and AMD 6.25mV VID
> modes.
> Add calculation for those types.
> 
> Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>

Applied to hwmon-next.

Thanks,
Guenter

> ---
>  drivers/hwmon/pmbus/pmbus.h      | 2 +-
>  drivers/hwmon/pmbus/pmbus_core.c | 8 ++++++++
>  2 files changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/hwmon/pmbus/pmbus.h b/drivers/hwmon/pmbus/pmbus.h
> index 2bdebd0ea9c1..a7f90e18119c 100644
> --- a/drivers/hwmon/pmbus/pmbus.h
> +++ b/drivers/hwmon/pmbus/pmbus.h
> @@ -377,7 +377,7 @@ enum pmbus_sensor_classes {
>  #define PMBUS_PAGE_VIRTUAL	BIT(31)
>  
>  enum pmbus_data_format { linear = 0, direct, vid };
> -enum vrm_version { vr11 = 0, vr12, vr13 };
> +enum vrm_version { vr11 = 0, vr12, vr13, imvp9, amd625mv };
>  
>  struct pmbus_driver_info {
>  	int pages;		/* Total number of pages */
> diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c
> index 98226e84b351..811819e41a72 100644
> --- a/drivers/hwmon/pmbus/pmbus_core.c
> +++ b/drivers/hwmon/pmbus/pmbus_core.c
> @@ -709,6 +709,14 @@ static long pmbus_reg2data_vid(struct pmbus_data *data,
>  		if (val >= 0x01)
>  			rv = 500 + (val - 1) * 10;
>  		break;
> +	case imvp9:
> +		if (val >= 0x01)
> +			rv = 200 + (val - 1) * 10;
> +		break;
> +	case amd625mv:
> +		if (val >= 0x0 && val <= 0xd8)
> +			rv = DIV_ROUND_CLOSEST(155000 - val * 625, 100);
> +		break;
>  	}
>  	return rv;
>  }

  reply	other threads:[~2020-01-14 14:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-13 15:08 [PATCH hwmon-next v1 0/6] hwmon: (pmbus) Add support for vid mode calculation per page bases Vadim Pasternak
2020-01-13 15:08 ` [PATCH hwmon-next v1 1/6] hwmon: (pmbus/core) Add support for vid mode detection " Vadim Pasternak
2020-01-14 14:06   ` Guenter Roeck
2020-01-13 15:08 ` [PATCH hwmon-next v1 2/6] hwmon: (pmbus/core) Add support for Intel IMVP9 and AMD 6.25mV modes Vadim Pasternak
2020-01-14 14:06   ` Guenter Roeck [this message]
2020-01-13 15:08 ` [PATCH hwmon-next v1 3/6] hwmon: (pmbus/tps53679) Extend device list supported by driver Vadim Pasternak
2020-01-14 14:07   ` Guenter Roeck
2020-01-13 15:08 ` [PATCH hwmon-next v1 4/6] hwmon: (pmbus) Add support for Infineon Multi-phase xdpe122 family controllers Vadim Pasternak
2020-01-14 14:08   ` Guenter Roeck
2020-01-13 15:08 ` [PATCH hwmon-next v1 5/6] dt-bindings: Add TI and Infineon VR Controllers as trivial devices Vadim Pasternak
2020-01-14 14:04   ` Guenter Roeck
2020-01-15 16:05   ` Rob Herring
2020-01-13 15:08 ` [PATCH hwmon-next v1 6/6] docs: hwmon: Include 'xdpe12284.rst' into docs Vadim Pasternak
2020-01-14 14:08   ` 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=20200114140656.GA22468@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=vadimp@mellanox.com \
    --cc=vijaykhemka@fb.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).