public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Xu Yang <xu.yang_2@nxp.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, Li Jun <jun.li@nxp.com>,
	Badhri Jagan Sridharan <badhri@google.com>,
	linux-usb@vger.kernel.org, imx@lists.linux.dev,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/2] usb: typec: tcpci: support setting orientation via GPIO
Date: Wed, 18 Mar 2026 14:10:01 +0200	[thread overview]
Message-ID: <abqWGW8vimyIq7hi@kuha> (raw)
In-Reply-To: <20260316-support-setting-orientation-use-gpio-v3-2-0e6622b00dd9@nxp.com>

Hi,

Mon, Mar 16, 2026 at 05:41:56PM +0800, Xu Yang wrote:
> @@ -316,6 +318,10 @@ static int tcpci_set_orientation(struct tcpc_dev *tcpc,
>  	struct tcpci *tcpci = tcpc_to_tcpci(tcpc);
>  	unsigned int reg;
>  
> +	if (tcpci->orientation_gpio)
> +		return gpiod_set_value_cansleep(tcpci->orientation_gpio,
> +						orientation == TYPEC_ORIENTATION_NORMAL ? 0 : 1);

Sorry, I though this was covered in the last version. The condition
looks unnecessary, so:

		return gpiod_set_value_cansleep(tcpci->orientation_gpio,
                                        	orientation != TYPEC_ORIENTATION_NORMAL);

thanks,

-- 
heikki

  reply	other threads:[~2026-03-18 12:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-16  9:41 [PATCH v3 0/2] usb: typec: tcpci: support setting orientation via GPIO Xu Yang
2026-03-16  9:41 ` [PATCH v3 1/2] dt-bindings: usb: nxp,ptn5110: add optional orientation-gpios property Xu Yang
2026-03-16  9:41 ` [PATCH v3 2/2] usb: typec: tcpci: support setting orientation via GPIO Xu Yang
2026-03-18 12:10   ` Heikki Krogerus [this message]
2026-03-19  9:06     ` Xu Yang

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=abqWGW8vimyIq7hi@kuha \
    --to=heikki.krogerus@linux.intel.com \
    --cc=badhri@google.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=imx@lists.linux.dev \
    --cc=jun.li@nxp.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=robh@kernel.org \
    --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