The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	"Heikki Krogerus" <heikki.krogerus@linux.intel.com>
Cc: Marek Vasut <marex@nabladev.com>, <linux-usb@vger.kernel.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-stm32@st-md-mailman.stormreply.com>
Subject: Re: [PATCH v2 2/2] usb: typec: mux: gpio-sbu: enable when only used for orientation
Date: Wed, 26 Aug 2026 12:02:15 +0200	[thread overview]
Message-ID: <8f1cd58a-33f1-49e1-bb32-02fa125f6f3d@foss.st.com> (raw)
In-Reply-To: <20260826-usb-fusb340-v1-v2-2-994a03c9ae45@foss.st.com>

On 8/26/26 11:53, Fabrice Gasnier wrote:
> When used as orientation-switch only (no mode-switch, e.g. no altmode),
> the optional enable gpio remains disabled.
> Enable it from the switch_set() routine, in this case, when the
> orientation is set and the enable-gpios property has been provided.
> Move enable GPIO configuration after the swapped configuration has
> been done, to avoid possible glitches in case both signals are changed.
> 
> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
> ---
> Changes in v2
> - fix issues reported by Sashiko: probe mode-switch property before
>   registering Type-C switch, to avoid possible race. Configure enable
>   GPIO after swapp GPIO has been configured, in case both transition.
> ---
>  drivers/usb/typec/mux/gpio-sbu-mux.c | 14 +++++++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/usb/typec/mux/gpio-sbu-mux.c b/drivers/usb/typec/mux/gpio-sbu-mux.c

[...]

>  
> @@ -125,6 +131,8 @@ static int gpio_sbu_mux_probe(struct platform_device *pdev)
>  		return dev_err_probe(dev, PTR_ERR(sbu_mux->sw),
>  				     "failed to register typec switch\n");
>  
> +	sbu_mux->mode_switch = device_property_read_bool(dev, "mode-switch");
> +

I've missed to update that, I'll send a V3.
Sorry for the noise,
BR,
Fabrice

>  	mux_desc.drvdata = sbu_mux;
>  	mux_desc.fwnode = dev_fwnode(dev);
>  	mux_desc.set = gpio_sbu_mux_set;
> 


      reply	other threads:[~2026-08-26 10:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-26  9:53 [PATCH v2 0/2] usb: gpio-sbu-mux: add FUSB340 and enable option for orientation Fabrice Gasnier
2026-08-26  9:53 ` [PATCH v2 1/2] dt-bindings: usb: gpio-sbu-mux: Add compatible for FUSB340 Fabrice Gasnier
2026-08-26  9:53 ` [PATCH v2 2/2] usb: typec: mux: gpio-sbu: enable when only used for orientation Fabrice Gasnier
2026-08-26 10:02   ` Fabrice Gasnier [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=8f1cd58a-33f1-49e1-bb32-02fa125f6f3d@foss.st.com \
    --to=fabrice.gasnier@foss.st.com \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=marex@nabladev.com \
    --cc=robh@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