From: Guenter Roeck <linux@roeck-us.net> To: Brandon Wyman <bjwyman@gmail.com> Cc: Joel Stanley <joel@jms.id.au>, openbmc@lists.ozlabs.org, Jean Delvare <jdelvare@suse.com>, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, Eddie James <eajames@linux.ibm.com> Subject: Re: [PATCH 1/2] hwmon: (pmbus/ibm-cffps) Add mfg_id debugfs entry Date: Fri, 8 Oct 2021 07:10:27 -0700 [thread overview] Message-ID: <20211008141027.GA1987825@roeck-us.net> (raw) In-Reply-To: <20211004144339.2634330-1-bjwyman@gmail.com> On Mon, Oct 04, 2021 at 02:43:38PM +0000, Brandon Wyman wrote: > Add support for the manufacturer ID to the debugfs entries. > > Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Applied. Thanks, Guenter > --- > drivers/hwmon/pmbus/ibm-cffps.c | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/drivers/hwmon/pmbus/ibm-cffps.c b/drivers/hwmon/pmbus/ibm-cffps.c > index df712ce4b164..2ee47cbbb665 100644 > --- a/drivers/hwmon/pmbus/ibm-cffps.c > +++ b/drivers/hwmon/pmbus/ibm-cffps.c > @@ -18,6 +18,7 @@ > > #include "pmbus.h" > > +#define CFFPS_MFG_ID_CMD 0x99 > #define CFFPS_FRU_CMD 0x9A > #define CFFPS_PN_CMD 0x9B > #define CFFPS_HEADER_CMD 0x9C > @@ -34,7 +35,7 @@ > #define CFFPS_INPUT_HISTORY_SIZE 100 > > #define CFFPS_CCIN_REVISION GENMASK(7, 0) > -#define CFFPS_CCIN_REVISION_LEGACY 0xde > +#define CFFPS_CCIN_REVISION_LEGACY 0xde > #define CFFPS_CCIN_VERSION GENMASK(15, 8) > #define CFFPS_CCIN_VERSION_1 0x2b > #define CFFPS_CCIN_VERSION_2 0x2e > @@ -57,6 +58,7 @@ > > enum { > CFFPS_DEBUGFS_INPUT_HISTORY = 0, > + CFFPS_DEBUGFS_MFG_ID, > CFFPS_DEBUGFS_FRU, > CFFPS_DEBUGFS_PN, > CFFPS_DEBUGFS_HEADER, > @@ -158,6 +160,9 @@ static ssize_t ibm_cffps_debugfs_read(struct file *file, char __user *buf, > switch (idx) { > case CFFPS_DEBUGFS_INPUT_HISTORY: > return ibm_cffps_read_input_history(psu, buf, count, ppos); > + case CFFPS_DEBUGFS_MFG_ID: > + cmd = CFFPS_MFG_ID_CMD; > + break; > case CFFPS_DEBUGFS_FRU: > cmd = CFFPS_FRU_CMD; > break; > @@ -558,6 +563,9 @@ static int ibm_cffps_probe(struct i2c_client *client) > debugfs_create_file("input_history", 0444, ibm_cffps_dir, > &psu->debugfs_entries[CFFPS_DEBUGFS_INPUT_HISTORY], > &ibm_cffps_fops); > + debugfs_create_file("mfg_id", 0444, ibm_cffps_dir, > + &psu->debugfs_entries[CFFPS_DEBUGFS_MFG_ID], > + &ibm_cffps_fops); > debugfs_create_file("fru", 0444, ibm_cffps_dir, > &psu->debugfs_entries[CFFPS_DEBUGFS_FRU], > &ibm_cffps_fops);
WARNING: multiple messages have this Message-ID (diff)
From: Guenter Roeck <linux@roeck-us.net> To: Brandon Wyman <bjwyman@gmail.com> Cc: linux-hwmon@vger.kernel.org, Jean Delvare <jdelvare@suse.com>, openbmc@lists.ozlabs.org, Eddie James <eajames@linux.ibm.com>, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] hwmon: (pmbus/ibm-cffps) Add mfg_id debugfs entry Date: Fri, 8 Oct 2021 07:10:27 -0700 [thread overview] Message-ID: <20211008141027.GA1987825@roeck-us.net> (raw) In-Reply-To: <20211004144339.2634330-1-bjwyman@gmail.com> On Mon, Oct 04, 2021 at 02:43:38PM +0000, Brandon Wyman wrote: > Add support for the manufacturer ID to the debugfs entries. > > Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Applied. Thanks, Guenter > --- > drivers/hwmon/pmbus/ibm-cffps.c | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/drivers/hwmon/pmbus/ibm-cffps.c b/drivers/hwmon/pmbus/ibm-cffps.c > index df712ce4b164..2ee47cbbb665 100644 > --- a/drivers/hwmon/pmbus/ibm-cffps.c > +++ b/drivers/hwmon/pmbus/ibm-cffps.c > @@ -18,6 +18,7 @@ > > #include "pmbus.h" > > +#define CFFPS_MFG_ID_CMD 0x99 > #define CFFPS_FRU_CMD 0x9A > #define CFFPS_PN_CMD 0x9B > #define CFFPS_HEADER_CMD 0x9C > @@ -34,7 +35,7 @@ > #define CFFPS_INPUT_HISTORY_SIZE 100 > > #define CFFPS_CCIN_REVISION GENMASK(7, 0) > -#define CFFPS_CCIN_REVISION_LEGACY 0xde > +#define CFFPS_CCIN_REVISION_LEGACY 0xde > #define CFFPS_CCIN_VERSION GENMASK(15, 8) > #define CFFPS_CCIN_VERSION_1 0x2b > #define CFFPS_CCIN_VERSION_2 0x2e > @@ -57,6 +58,7 @@ > > enum { > CFFPS_DEBUGFS_INPUT_HISTORY = 0, > + CFFPS_DEBUGFS_MFG_ID, > CFFPS_DEBUGFS_FRU, > CFFPS_DEBUGFS_PN, > CFFPS_DEBUGFS_HEADER, > @@ -158,6 +160,9 @@ static ssize_t ibm_cffps_debugfs_read(struct file *file, char __user *buf, > switch (idx) { > case CFFPS_DEBUGFS_INPUT_HISTORY: > return ibm_cffps_read_input_history(psu, buf, count, ppos); > + case CFFPS_DEBUGFS_MFG_ID: > + cmd = CFFPS_MFG_ID_CMD; > + break; > case CFFPS_DEBUGFS_FRU: > cmd = CFFPS_FRU_CMD; > break; > @@ -558,6 +563,9 @@ static int ibm_cffps_probe(struct i2c_client *client) > debugfs_create_file("input_history", 0444, ibm_cffps_dir, > &psu->debugfs_entries[CFFPS_DEBUGFS_INPUT_HISTORY], > &ibm_cffps_fops); > + debugfs_create_file("mfg_id", 0444, ibm_cffps_dir, > + &psu->debugfs_entries[CFFPS_DEBUGFS_MFG_ID], > + &ibm_cffps_fops); > debugfs_create_file("fru", 0444, ibm_cffps_dir, > &psu->debugfs_entries[CFFPS_DEBUGFS_FRU], > &ibm_cffps_fops);
next prev parent reply other threads:[~2021-10-08 14:10 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-10-04 14:43 [PATCH 1/2] hwmon: (pmbus/ibm-cffps) Add mfg_id debugfs entry Brandon Wyman 2021-10-04 14:43 ` [PATCH 2/2] hwmon: (pmbus/ibm-cffps) Use MFR_ID to choose version Brandon Wyman 2021-10-08 14:12 ` Guenter Roeck 2021-10-08 14:12 ` Guenter Roeck 2021-10-08 14:10 ` Guenter Roeck [this message] 2021-10-08 14:10 ` [PATCH 1/2] hwmon: (pmbus/ibm-cffps) Add mfg_id debugfs entry 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=20211008141027.GA1987825@roeck-us.net \ --to=linux@roeck-us.net \ --cc=bjwyman@gmail.com \ --cc=eajames@linux.ibm.com \ --cc=jdelvare@suse.com \ --cc=joel@jms.id.au \ --cc=linux-hwmon@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=openbmc@lists.ozlabs.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.