From: "Nuno Sá" <noname.nuno@gmail.com>
To: Radu Sabau <radu.sabau@analog.com>,
Jean Delvare <jdelvare@suse.com>,
Guenter Roeck <linux@roeck-us.net>,
Jonathan Corbet <corbet@lwn.net>,
linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] drivers: hwmon: max31827: Add debugfs support
Date: Wed, 22 May 2024 15:10:51 +0200 [thread overview]
Message-ID: <1c1519649f9c99ad73854b70efe286d68d200029.camel@gmail.com> (raw)
In-Reply-To: <20240522123923.22320-3-radu.sabau@analog.com>
On Wed, 2024-05-22 at 15:39 +0300, Radu Sabau wrote:
> Add debugfs support by creating directory in sys-fs which includes
> debugfs specific files used for configuring the device by
> preference.
>
> Signed-off-b: Radu Sabau <radu.sabau@analog.com>
> ---
> Documentation/hwmon/max31827.rst | 25 ++++
> drivers/hwmon/max31827.c | 202 ++++++++++++++++++++++++++++++-
> 2 files changed, 225 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/hwmon/max31827.rst b/Documentation/hwmon/max31827.rst
> index 9c11a9518c67..940310be6075 100644
> --- a/Documentation/hwmon/max31827.rst
> +++ b/Documentation/hwmon/max31827.rst
> @@ -142,3 +142,28 @@ usage (+33% for both write and reads) in normal conditions.
> Since this operation implies there will be an extra delay to each
> transaction, PEC can be disabled or enabled through sysfs.
> Just write 1 to the "pec" file for enabling PEC and 0 for disabling it.
> +
> +DebugFs entries
> +---------------
> +
> +The chip also has a configuration register where each bit stands for a specific
> +functionality to be configured. Hence as one would like to have access to these
> +features, we give access to them in debugfs.
> +
> +.. warning:: The debugfs interface is subject to change without notice
> + and is only available when the kernel is compiled with
> + ``CONFIG_DEBUG_FS`` defined.
> +
> +``/sys/kernel/debug/max31827/``
> +contains the following attributes:
> +
> +============== ===============================================================
> +alarm_polarity Write 1 for ALARM pin active state is low, 0 otherwise
> +comp_int Set to 1 if OT and UT status bits are in interrupt mode
> +fault_queue Number of consecutive temperature faults until OT and UT faults
> + are indicated in status bits
> +pec_error Set to 1 if PEC Enable bit is set, 0 otherwise
> +resolution 2-bit value that select the conversion resolution, please see
> + datasheet for corresponding values
> +timeout Write 1 do disable bus timeout, 0 otherwise
From the description, the above really don't look like they belong into a debug
interface...
- Nuno Sá
>
next prev parent reply other threads:[~2024-05-22 13:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-22 12:39 [PATCH 0/2] Update MAX31827 driver Radu Sabau
2024-05-22 12:39 ` [PATCH 1/2] drivers: hwmon: max31827: Add PEC support Radu Sabau
2024-05-22 13:08 ` Nuno Sá
2024-05-23 4:37 ` kernel test robot
2024-05-23 5:11 ` Guenter Roeck
2024-05-22 12:39 ` [PATCH 2/2] drivers: hwmon: max31827: Add debugfs support Radu Sabau
2024-05-22 13:10 ` Nuno Sá [this message]
2024-05-23 4:53 ` 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=1c1519649f9c99ad73854b70efe286d68d200029.camel@gmail.com \
--to=noname.nuno@gmail.com \
--cc=corbet@lwn.net \
--cc=jdelvare@suse.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=radu.sabau@analog.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).