Linux USB
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: aiyengar1990@gmail.com
Cc: Badhri Jagan Sridharan <badhri@google.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Guenter Roeck <linux@roeck-us.net>,
	Heiko Stuebner <heiko@sntech.de>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, stable@vger.kernel.org
Subject: Re: [PATCH v3 2/2] usb: typec: fusb302: Toggle with the default Rp current
Date: Mon, 30 Nov 2026 14:50:04 +0100	[thread overview]
Message-ID: <aw1_DMDVso5FPSdd@black.igk.intel.com> (raw)
In-Reply-To: <20261126-tcpm-attach-reboot-v3-2-1c97dfa5024a@gmail.com>

On Thu, Nov 26, 2026 at 09:19:22AM +0000, Arun Iyengar via B4 Relay wrote:
> From: Arun Iyengar <aiyengar1990@gmail.com>
> 
> The FUSB302 does not detect some sinks while toggling with Rp 3.0A.
> Toggle with the default current and set the requested one on attach.
> 
> Fixes: c034a43e72dd ("staging: typec: Fairchild FUSB302 Type-c chip driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

> ---
>  drivers/usb/typec/tcpm/fusb302.c | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/typec/tcpm/fusb302.c b/drivers/usb/typec/tcpm/fusb302.c
> index 83bd287dadc7..64d02cc0ecae 100644
> --- a/drivers/usb/typec/tcpm/fusb302.c
> +++ b/drivers/usb/typec/tcpm/fusb302.c
> @@ -97,6 +97,7 @@ struct fusb302_chip {
>  	/* chip status */
>  	enum toggling_mode toggling_mode;
>  	enum src_current_status src_current_status;
> +	enum src_current_status toggling_src_current;
>  	bool intr_togdone;
>  	bool intr_bc_lvl;
>  	bool intr_comp_chng;
> @@ -942,10 +943,11 @@ static int tcpm_start_toggling(struct tcpc_dev *dev,
>  	}
>  
>  	mutex_lock(&chip->lock);
> -	ret = fusb302_set_src_current(chip, cc_src_current[cc]);
> +	chip->toggling_src_current = cc_src_current[cc];
> +	ret = fusb302_set_src_current(chip, SRC_CURRENT_DEFAULT);
>  	if (ret < 0) {
>  		fusb302_log(chip, "unable to set src current %s, ret=%d",
> -			    typec_cc_status_name[cc], ret);
> +			    typec_cc_status_name[TYPEC_CC_RP_DEF], ret);
>  		goto done;
>  	}
>  	ret = fusb302_set_toggling(chip, mode);
> @@ -1357,6 +1359,12 @@ static int fusb302_handle_togdone_src(struct fusb302_chip *chip,
>  			    typec_cc_status_name[cc2]);
>  		return fusb302_set_toggling(chip, toggling_mode);
>  	}
> +	ret = fusb302_set_src_current(chip, chip->toggling_src_current);
> +	if (ret < 0) {
> +		fusb302_log(chip, "cannot set src current, ret=%d", ret);
> +		return ret;
> +	}
> +	rd_mda = rd_mda_value[chip->src_current_status];
>  	/* set polarity and pull_up, pull_down */
>  	ret = fusb302_set_cc_polarity_and_pull(chip, cc_polarity, true, false);
>  	if (ret < 0) {
> 
> -- 
> 2.55.0
> 
> 

-- 
heikki

  reply	other threads:[~2026-11-30 13:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26  9:19 [PATCH v3 0/2] usb: typec: Find a Type-C partner after a warm reboot on the Orange Pi 5 Arun Iyengar via B4 Relay
2026-11-26  9:19 ` [PATCH v3 1/2] usb: typec: tcpm: Don't cut a pending state delay short on a re-queue Arun Iyengar via B4 Relay
2026-11-30 13:47   ` Heikki Krogerus
2026-11-26  9:19 ` [PATCH v3 2/2] usb: typec: fusb302: Toggle with the default Rp current Arun Iyengar via B4 Relay
2026-11-30 13:50   ` Heikki Krogerus [this message]
2026-11-26  9:29 ` [PATCH v3 0/2] usb: typec: Find a Type-C partner after a warm reboot on the Orange Pi 5 sashiko-bot

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=aw1_DMDVso5FPSdd@black.igk.intel.com \
    --to=heikki.krogerus@linux.intel.com \
    --cc=aiyengar1990@gmail.com \
    --cc=badhri@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=stable@vger.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