Re: [PATCH] usb: typec: tcpci: Add FAULT_ALERT handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 22, 2024 at 05:06:46PM +0000, Yanik Fuchs wrote:
> Good Evening
> 
> This is my first Pull request for the Linux Kernel, I hope, I have formatted it correctly.
> The info about the Patch should be clear from the message I added, I hope.
> 
> 
> Freundliche Grüsse
> 
> Best regards
> 
> 
> Yanik Fuchs
> [cid:239faadc-5aa5-4417-b69c-5afc0ce01589]<https://www.mbv.ch/en/>
> MBV AG
> Microbiology and Bioanalytic
> Industriestrasse 9, CH-8712 Stäfa
> [cid:a21e1738-fbcb-44ca-b6ba-611f60800d18]<https://www.linkedin.com/company/25071130/>  [cid:9c47fbef-89db-4406-89ee-a2b4487eeaf2] <https://www.youtube.com/channel/UC3vLuuteeanNc1wX9OTARDQ>     Legal disclaimer<https://www.mbv.ch/en/about-us/imprint/>
> 
> [cid:bc59151f-ea88-4e9b-ac75-03cfb28b780f]<https://www.mbv.ch/en/about-mbv/events/>
> 
> >From 133cda1dff7e87f999506164533bbb1cfaf8fe7e Mon Sep 17 00:00:00 2001
> From: yfu <yanikfuchs@xxxxxx>
> Date: Tue, 22 Oct 2024 18:27:49 +0200
> Subject: [PATCH] usb: typec: tcpci: Add FAULT_ALERT handling
>  message
> 
> I encountered an issue, where I was not able to communicate with other
> i2c devices, if ptn5110 was initiated while it was seeing Vbus.
> 
> i2c analysis did show, that ALERT_FAULT pin is asserted and
> reasserts on try to acknowledge it, because there is still an asserted
> pin in FAULT_STATUS. This results in Alert GPIO being always low.
> 
> With this Commit, I add a function to the IRQ handler, which acknowledges
> all asserted Pins in FAULT_STATUS register. With this patch, ALERT_STATUS can be acknowledged without issues.
> ---
>  drivers/usb/typec/tcpm/tcpci.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/usb/typec/tcpm/tcpci.c b/drivers/usb/typec/tcpm/tcpci.c
> index ed32583829be..eb885aa4171c 100644
> --- a/drivers/usb/typec/tcpm/tcpci.c
> +++ b/drivers/usb/typec/tcpm/tcpci.c
> @@ -714,6 +714,13 @@ irqreturn_t tcpci_irq(struct tcpci *tcpci)
>     irq_ret = status & tcpci->alert_mask;
> 
>  process_status:
> +   /*
> +   * some chips asert fault alert, even if it is masked.
> +   * The FAULT_STATUS is read and
> +   */
> +   if (status & TCPC_ALERT_FAULT)
> +       regmap_read(tcpci->regmap, TCPC_FAULT_STATUS, &raw);
> +       regmap_write(tcpci->regmap, TCPC_FAULT_STATUS, raw);
>     /*
>      * Clear alert status for everything except RX_STATUS, which shouldn't
>      * be cleared until we have successfully retrieved message.
> --
> 2.34.1
> 
> 
> 



Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch was sent in html email format, making it impossible to
  apply and automatically rejected by the mailing lists.

- Your patch is malformed (tabs converted to spaces, linewrapped, etc.)
  and can not be applied.  Please read the file,
  Documentation/process/email-clients.rst in order to fix this.

- Your patch was attached, please place it inline so that it can be
  applied directly from the email message itself.

- Your patch does not have a Signed-off-by: line.  Please read the
  kernel file, Documentation/process/submitting-patches.rst and resend
  it after adding that line.  Note, the line needs to be in the body of
  the email, before the patch, not at the bottom of the patch or in the
  email signature.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux