Re: [PATCH v3 2/2] usb: typec: tcpci: support setting orientation via GPIO

From: Heikki Krogerus

Date: Wed Mar 18 2026 - 08:12:52 EST


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