Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: Tzung-Bi Shih <tzungbi@kernel.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: linux-hwmon@vger.kernel.org,
	Wolfram Sang <wsa+renesas@sang-engineering.com>
Subject: Re: [PATCH 8/8] hwmon: (pmbus/core) Report content of CAPABILITY register in debugfs
Date: Mon, 10 Feb 2025 05:34:08 +0000	[thread overview]
Message-ID: <Z6mP0Mb-2kqumjHh@google.com> (raw)
In-Reply-To: <20250210040024.2296208-2-linux@roeck-us.net>

On Sun, Feb 09, 2025 at 08:00:24PM -0800, Guenter Roeck wrote:
> @@ -3585,6 +3585,15 @@ static void pmbus_init_debugfs(struct i2c_client *client,
>  	 * assume that values of the following registers are the same for all
>  	 * pages and report values only for page 0.
>  	 */
> +	if (!(data->flags & PMBUS_NO_CAPABILITY) &&
> +	    pmbus_check_byte_register(client, 0, PMBUS_CAPABILITY)) {
> +		entries[idx].client = client;
> +		entries[idx].page = 0;
> +		entries[idx].reg = PMBUS_CAPABILITY;
> +		debugfs_create_file("capability", 0444, debugfs,
> +				    &entries[idx++],
> +				    &pmbus_debugfs_ops);
> +	}
>  	if (pmbus_check_byte_register(client, 0, PMBUS_REVISION)) {
>  		entries[idx].client = client;
>  		entries[idx].page = 0;

New device-specific entry.  The allocation size [1] should also change
accordingly: s/7/8/.

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/hwmon/pmbus/pmbus_core.c?id=a64dcfb451e254085a7daee5fe51bf22959d52d3#n3537

  reply	other threads:[~2025-02-10  5:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-10  4:00 [PATCH 7/8] hwmon: (pmbus/core) Optimize debugfs status attribute initialization Guenter Roeck
2025-02-10  4:00 ` [PATCH 8/8] hwmon: (pmbus/core) Report content of CAPABILITY register in debugfs Guenter Roeck
2025-02-10  5:34   ` Tzung-Bi Shih [this message]
2025-02-10 16:02     ` Guenter Roeck
2025-02-10  5:33 ` [PATCH 7/8] hwmon: (pmbus/core) Optimize debugfs status attribute initialization Tzung-Bi Shih

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=Z6mP0Mb-2kqumjHh@google.com \
    --to=tzungbi@kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=wsa+renesas@sang-engineering.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