Re: [PATCH v3 2/2] usb: typec: tcpci: support setting orientation via GPIO
From: Xu Yang
Date: Thu Mar 19 2026 - 05:16:55 EST
On Wed, Mar 18, 2026 at 02:10:01PM +0200, Heikki Krogerus wrote:
> 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);
OK. It's better now.
Thanks,
Xu Yang