From: "Nuno Sá" <noname.nuno@gmail.com>
To: Guenter Roeck <linux@roeck-us.net>, nuno.sa@analog.com
Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
linux-doc@vger.kernel.org, Jean Delvare <jdelvare@suse.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Jonathan Corbet <corbet@lwn.net>
Subject: Re: [PATCH v3 2/2] hwmon: ltc4282: add support for the LTC4282 chip
Date: Tue, 12 Dec 2023 14:53:00 +0100 [thread overview]
Message-ID: <af8fa90004157fa6b464b5f74335d9cbfa667675.camel@gmail.com> (raw)
In-Reply-To: <7a6a0517-47f8-47df-9e61-44adb60f6135@roeck-us.net>
On Mon, 2023-12-11 at 07:41 -0800, Guenter Roeck wrote:
> On Tue, Dec 05, 2023 at 04:22:56PM +0100, Nuno Sa via B4 Relay wrote:
> > From: Nuno Sa <nuno.sa@analog.com>
> >
> > The LTC4282 hot swap controller allows a board to be safely inserted and
> > removed from a live backplane. Using one or more external N-channel pass
> > transistors, board supply voltage and inrush current are ramped up at an
> > adjustable rate. An I2C interface and onboard ADC allows for monitoring
> > of board current, voltage, power, energy and fault status.
> >
> > Signed-off-by: Nuno Sa <nuno.sa@analog.com>
> > ---
> [ ... ]
>
> > +/* power1_fault */
> > +static SENSOR_DEVICE_ATTR_RO(power1_good, ltc4282_status,
> > + LTC4282_POWER_GOOD_MASK);
> > +/* FET faults */
> > +static SENSOR_DEVICE_ATTR_RO(fet_short_fault, ltc4282_status,
> > + LTC4282_FET_SHORT_MASK);
> > +static SENSOR_DEVICE_ATTR_RO(fet_bad_fault, ltc4282_status,
> > + LTC4282_FET_BAD_STATUS_MASK);
> > +/*
> > + * Fault log failures. These faults might be important in systems where
> > + * auto-retry is not enabled since they will cause the part to latch off
> > until
> > + * they are cleared. Typically that happens when the system admin is close
> > + * enough so he can check what happened and manually clear the faults.
> > Hence, we
> > + * provide an attribute to clear all fauls at once while still capable of
> > + * checking individual faults in debugfs.
> > + */
> > +static SENSOR_DEVICE_ATTR_WO(fault_logs_reset, ltc4282_clear_faults, 0);
> > +
> > +static struct attribute *ltc4282_attrs[] = {
> > + &sensor_dev_attr_energy1_input.dev_attr.attr,
> > + &sensor_dev_attr_power1_good.dev_attr.attr,
> > + &sensor_dev_attr_fet_bad_fault.dev_attr.attr,
> > + &sensor_dev_attr_fet_short_fault.dev_attr.attr,
> > + &sensor_dev_attr_fault_logs_reset.dev_attr.attr,
> > + NULL
> > +};
> > +ATTRIBUTE_GROUPS(ltc4282);
> > +
>
> Ah, now I see what those are for. Please move all but energy1_input
> to debugfs, including clearing the faults.
>
I'll reply in the other thread. Just wanted to make it clear (not totally sure
it is) that all of those attributes are status stuff and not fault logs. All of
the fault logs where moved to debugfs and I kept this one in here. If this was
already clear to you, sorry for the noise.
- Nuno Sá
>
>
prev parent reply other threads:[~2023-12-12 13:49 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-05 15:22 [PATCH v3 0/2] Add support for LTC4282 Nuno Sa via B4 Relay
2023-12-05 15:22 ` [PATCH v3 1/2] dt-bindings: hwmon: Add LTC4282 bindings Nuno Sa via B4 Relay
2023-12-05 16:18 ` Conor Dooley
2023-12-06 8:38 ` Nuno Sá
2023-12-06 15:41 ` Conor Dooley
2023-12-05 15:22 ` [PATCH v3 2/2] hwmon: ltc4282: add support for the LTC4282 chip Nuno Sa via B4 Relay
2023-12-11 15:36 ` Guenter Roeck
2023-12-12 14:28 ` Nuno Sá
2023-12-12 15:14 ` Guenter Roeck
2023-12-12 15:30 ` Nuno Sá
2023-12-12 17:59 ` Guenter Roeck
2023-12-13 10:06 ` Nuno Sá
2023-12-13 14:35 ` Guenter Roeck
2023-12-13 14:44 ` Nuno Sá
2023-12-11 15:41 ` Guenter Roeck
2023-12-12 13:53 ` Nuno Sá [this message]
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=af8fa90004157fa6b464b5f74335d9cbfa667675.camel@gmail.com \
--to=noname.nuno@gmail.com \
--cc=conor+dt@kernel.org \
--cc=corbet@lwn.net \
--cc=devicetree@vger.kernel.org \
--cc=jdelvare@suse.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=nuno.sa@analog.com \
--cc=robh+dt@kernel.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: 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).