[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1c1519649f9c99ad73854b70efe286d68d200029.camel@gmail.com>
Date: Wed, 22 May 2024 15:10:51 +0200
From: Nuno Sá <noname.nuno@...il.com>
To: Radu Sabau <radu.sabau@...log.com>, Jean Delvare <jdelvare@...e.com>,
Guenter Roeck <linux@...ck-us.net>, Jonathan Corbet <corbet@....net>,
linux-hwmon@...r.kernel.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] drivers: hwmon: max31827: Add debugfs support
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@...log.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á
>
Powered by blists - more mailing lists