[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200104162916.GA20041@roeck-us.net>
Date: Sat, 4 Jan 2020 08:29:16 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: Eddie James <eajames@...ux.ibm.com>
Cc: linux-hwmon@...r.kernel.org, linux-kernel@...r.kernel.org,
jdelvare@...e.com, bjwyman@...il.com
Subject: Re: [PATCH 2/3] hwmon: (pmbus/ibm-cffps) Add the VMON property for
version 2
On Sat, Jan 04, 2020 at 08:28:10AM -0800, Guenter Roeck wrote:
> On Thu, Dec 19, 2019 at 02:50:06PM -0600, Eddie James wrote:
> > Version 2 of the PSU supports reading an auxiliary voltage. Use the
> > pmbus VMON property and associated virtual register to read it.
> >
> > Signed-off-by: Eddie James <eajames@...ux.ibm.com>
>
> I assume you are ok with v1 reading (or trying to read) this voltage.
>
Ah, never mind, you don't. Sorry for the noise.
> Applied to hwmon-next.
>
> > ---
> > drivers/hwmon/pmbus/ibm-cffps.c | 6 +++++-
> > 1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/hwmon/pmbus/ibm-cffps.c b/drivers/hwmon/pmbus/ibm-cffps.c
> > index a564be9..b37faf1 100644
> > --- a/drivers/hwmon/pmbus/ibm-cffps.c
> > +++ b/drivers/hwmon/pmbus/ibm-cffps.c
> > @@ -28,6 +28,7 @@
> > #define CFFPS1_FW_NUM_BYTES 4
> > #define CFFPS2_FW_NUM_WORDS 3
> > #define CFFPS_SYS_CONFIG_CMD 0xDA
> > +#define CFFPS_12VCS_VOUT_CMD 0xDE
> >
> > #define CFFPS_INPUT_HISTORY_CMD 0xD6
> > #define CFFPS_INPUT_HISTORY_SIZE 100
> > @@ -350,6 +351,9 @@ static int ibm_cffps_read_word_data(struct i2c_client *client, int page,
> > if (mfr & CFFPS_MFR_PS_KILL)
> > rc |= PB_STATUS_OFF;
> > break;
> > + case PMBUS_VIRT_READ_VMON:
> > + rc = pmbus_read_word_data(client, page, CFFPS_12VCS_VOUT_CMD);
> > + break;
> > default:
> > rc = -ENODATA;
> > break;
> > @@ -453,7 +457,7 @@ static void ibm_cffps_create_led_class(struct ibm_cffps *psu)
> > PMBUS_HAVE_TEMP2 | PMBUS_HAVE_TEMP3 |
> > PMBUS_HAVE_STATUS_VOUT | PMBUS_HAVE_STATUS_IOUT |
> > PMBUS_HAVE_STATUS_INPUT | PMBUS_HAVE_STATUS_TEMP |
> > - PMBUS_HAVE_STATUS_FAN12,
> > + PMBUS_HAVE_STATUS_FAN12 | PMBUS_HAVE_VMON,
> > .func[1] = PMBUS_HAVE_VOUT | PMBUS_HAVE_IOUT |
> > PMBUS_HAVE_TEMP | PMBUS_HAVE_TEMP2 | PMBUS_HAVE_TEMP3 |
> > PMBUS_HAVE_STATUS_VOUT | PMBUS_HAVE_STATUS_IOUT,
Powered by blists - more mailing lists