From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Marco Felsch <m.felsch@pengutronix.de>
Cc: badhri@google.com, gregkh@linuxfoundation.org, xu.yang_2@nxp.com,
18255117159@163.com, krzysztof.kozlowski@oss.qualcomm.com,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel@pengutronix.de
Subject: Re: [PATCH] usb: typec: tcpci: add alert.fault handling
Date: Wed, 12 Aug 2026 10:44:32 +0200 [thread overview]
Message-ID: <anwycNkYyY0N8A2F@black.igk.intel.com> (raw)
In-Reply-To: <ucjnu5ybx7kcxtfagyxxjjkzwcqbhfip7zxdlndu3lnggvscwp@27w6h2kbxs3v>
On Wed, Aug 05, 2026 at 03:45:20PM +0200, Marco Felsch wrote:
> On 26-08-05, Heikki Krogerus wrote:
> > On Fri, Jul 31, 2026 at 10:34:59AM +0200, Marco Felsch wrote:
> > > Add minimal handling to clear the ALERT.Fault bit which may be set in
> > > case of an over-current or over-voltage detection. At the moment only
> > > the IRQ clear support is added since the TCPC Spec mentions that the
> > > handling of such events is vendor specific.
> > >
> > > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> > > ---
> > > drivers/usb/typec/tcpm/tcpci.c | 16 +++++++++++++++-
> > > 1 file changed, 15 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/usb/typec/tcpm/tcpci.c b/drivers/usb/typec/tcpm/tcpci.c
> > > index a56e31b20c21..d2d5bf7ca618 100644
> > > --- a/drivers/usb/typec/tcpm/tcpci.c
> > > +++ b/drivers/usb/typec/tcpm/tcpci.c
> > > @@ -692,7 +692,8 @@ static int tcpci_init(struct tcpc_dev *tcpc)
> > >
> > > reg = TCPC_ALERT_TX_SUCCESS | TCPC_ALERT_TX_FAILED |
> > > TCPC_ALERT_TX_DISCARDED | TCPC_ALERT_RX_STATUS |
> > > - TCPC_ALERT_RX_HARD_RST | TCPC_ALERT_CC_STATUS;
> > > + TCPC_ALERT_RX_HARD_RST | TCPC_ALERT_CC_STATUS |
> > > + TCPC_ALERT_FAULT;
> > > if (tcpci->controls_vbus)
> > > reg |= TCPC_ALERT_POWER_STATUS;
> > > /* Enable VSAFE0V status interrupt when detecting VSAFE0V is supported */
> > > @@ -720,6 +721,19 @@ irqreturn_t tcpci_irq(struct tcpci *tcpci)
> > > irq_ret = status & tcpci->alert_mask;
> > >
> > > process_status:
> > > + /*
> > > + * Handle nested fault before clearing the alert status to not
> > > + * re-trigger a fault alert immediately again.
> > > + */
> >
> > Shouldn't that explanation in the comment be also in the commit
> > message? That sounds like the "why" part to me.
>
> I don't think so, it's just a comment for $dev that this ordering is
> important. The commit message clearly states that an over-current or
> over-voltage may trigger this.
Fair enough. Let's wait for Badhri, but FWIW:
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
--
heikki
prev parent reply other threads:[~2026-08-12 8:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-31 8:34 [PATCH] usb: typec: tcpci: add alert.fault handling Marco Felsch
2026-08-05 12:17 ` Heikki Krogerus
2026-08-05 13:45 ` Marco Felsch
2026-08-12 8:44 ` Heikki Krogerus [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=anwycNkYyY0N8A2F@black.igk.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=18255117159@163.com \
--cc=badhri@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski@oss.qualcomm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=m.felsch@pengutronix.de \
--cc=xu.yang_2@nxp.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