From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Marco Felsch <m.felsch@pengutronix.de>
Cc: gregkh@linuxfoundation.org, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
linux@roeck-us.net, jun.li@nxp.com, devicetree@vger.kernel.org,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel@pengutronix.de
Subject: Re: [PATCH v3 3/4] usb: typec: tcpm: add support to set tcpc connector orientatition
Date: Mon, 26 Feb 2024 10:03:30 +0200 [thread overview]
Message-ID: <ZdxF0rARWTjIIDnz@kuha.fi.intel.com> (raw)
In-Reply-To: <20240222210903.208901-4-m.felsch@pengutronix.de>
On Thu, Feb 22, 2024 at 10:09:02PM +0100, Marco Felsch wrote:
> This adds the support to set the connector orientation value
> accordingly. This is part of the optional CONFIG_STANDARD_OUTPUT
> register 0x18, specified within the USB port controller spsicification
> rev. 2.0 [1].
>
> [1] https://www.usb.org/sites/default/files/documents/usb-port_controller_specification_rev2.0_v1.0_0.pdf
>
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> v3:
> - no changes
> v2:
> - no changes
>
> drivers/usb/typec/tcpm/tcpm.c | 6 ++++++
> include/linux/usb/tcpm.h | 2 ++
> 2 files changed, 8 insertions(+)
>
> diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
> index 5945e3a2b0f7..85ca26687324 100644
> --- a/drivers/usb/typec/tcpm/tcpm.c
> +++ b/drivers/usb/typec/tcpm/tcpm.c
> @@ -1099,6 +1099,12 @@ static int tcpm_set_roles(struct tcpm_port *port, bool attached,
> if (ret < 0)
> return ret;
>
> + if (port->tcpc->set_orientation) {
> + ret = port->tcpc->set_orientation(port->tcpc, orientation);
> + if (ret < 0)
> + return ret;
> + }
> +
> port->pwr_role = role;
> port->data_role = data;
> typec_set_data_role(port->typec_port, data);
> diff --git a/include/linux/usb/tcpm.h b/include/linux/usb/tcpm.h
> index 65fac5e1f317..93b681ff3ef9 100644
> --- a/include/linux/usb/tcpm.h
> +++ b/include/linux/usb/tcpm.h
> @@ -133,6 +133,8 @@ struct tcpc_dev {
> enum typec_cc_status *cc2);
> int (*set_polarity)(struct tcpc_dev *dev,
> enum typec_cc_polarity polarity);
> + int (*set_orientation)(struct tcpc_dev *dev,
> + enum typec_orientation orientation);
> int (*set_vconn)(struct tcpc_dev *dev, bool on);
> int (*set_vbus)(struct tcpc_dev *dev, bool on, bool charge);
> int (*set_current_limit)(struct tcpc_dev *dev, u32 max_ma, u32 mv);
> --
> 2.39.2
--
heikki
next prev parent reply other threads:[~2024-02-26 8:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-22 21:08 [PATCH v3 0/4] USB-C TCPM Orientation Support Marco Felsch
2024-02-22 21:09 ` [PATCH v3 1/4] dt-bindings: usb: typec-tcpci: add tcpci fallback binding Marco Felsch
2024-02-26 8:56 ` Krzysztof Kozlowski
2024-02-22 21:09 ` [PATCH v3 2/4] usb: typec: tcpci: add generic tcpci fallback compatible Marco Felsch
2024-02-26 8:02 ` Heikki Krogerus
2024-02-22 21:09 ` [PATCH v3 3/4] usb: typec: tcpm: add support to set tcpc connector orientatition Marco Felsch
2024-02-26 8:03 ` Heikki Krogerus [this message]
2024-02-22 21:09 ` [PATCH v3 4/4] usb: typec: tcpci: add support to set connector orientation Marco Felsch
2024-02-26 8:13 ` Heikki Krogerus
2024-02-26 12:27 ` Marco Felsch
2024-03-07 9:46 ` Marco Felsch
2024-03-12 11:27 ` Heikki Krogerus
2024-03-12 11:28 ` Heikki Krogerus
2024-06-26 16:31 ` Marco Felsch
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=ZdxF0rARWTjIIDnz@kuha.fi.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jun.li@nxp.com \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=m.felsch@pengutronix.de \
--cc=robh+dt@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.