* [PATCH] usb: typec: ucsi: Set orientation_aware if UCSI version is 2.x and above
@ 2025-10-28 15:43 Abel Vesa
2025-10-28 16:24 ` Dmitry Baryshkov
2025-10-31 13:32 ` Heikki Krogerus
0 siblings, 2 replies; 5+ messages in thread
From: Abel Vesa @ 2025-10-28 15:43 UTC (permalink / raw)
To: Heikki Krogerus, Greg Kroah-Hartman
Cc: Bjorn Andersson, Konrad Dybcio, Dmitry Baryshkov, linux-usb,
linux-kernel, Abel Vesa
For UCSI 2.0 and above, since the orientation is part of the paylad,
set the orientation_aware by default and let the implementation specific
update_connector op override if necessary.
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
---
drivers/usb/typec/ucsi/ucsi.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
index ed23edab776354f08452c539d75d27132b8c44dd..84afa9bfc65b6e6ad0a8c1856252299c16562baf 100644
--- a/drivers/usb/typec/ucsi/ucsi.c
+++ b/drivers/usb/typec/ucsi/ucsi.c
@@ -1637,6 +1637,9 @@ static int ucsi_register_port(struct ucsi *ucsi, struct ucsi_connector *con)
cap->driver_data = con;
cap->ops = &ucsi_ops;
+ if (ucsi->version >= UCSI_VERSION_2_0)
+ con->typec_cap.orientation_aware = true;
+
if (ucsi->ops->update_connector)
ucsi->ops->update_connector(con);
---
base-commit: f7d2388eeec24966fc4d5cf32d706f0514f29ac5
change-id: 20251028-b4-ucsi-set-orientation-aware-on-version-2-and-above-b79245d4b066
Best regards,
--
Abel Vesa <abel.vesa@linaro.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] usb: typec: ucsi: Set orientation_aware if UCSI version is 2.x and above
2025-10-28 15:43 [PATCH] usb: typec: ucsi: Set orientation_aware if UCSI version is 2.x and above Abel Vesa
@ 2025-10-28 16:24 ` Dmitry Baryshkov
2025-10-28 16:39 ` Abel Vesa
2025-10-31 13:32 ` Heikki Krogerus
1 sibling, 1 reply; 5+ messages in thread
From: Dmitry Baryshkov @ 2025-10-28 16:24 UTC (permalink / raw)
To: Abel Vesa, Heikki Krogerus, Greg Kroah-Hartman
Cc: Bjorn Andersson, Konrad Dybcio, Dmitry Baryshkov, linux-usb,
linux-kernel
On 28/10/2025 17:43, Abel Vesa wrote:
> For UCSI 2.0 and above, since the orientation is part of the paylad,
> set the orientation_aware by default and let the implementation specific
> update_connector op override if necessary.
>
> Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
> ---
> drivers/usb/typec/ucsi/ucsi.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
> index ed23edab776354f08452c539d75d27132b8c44dd..84afa9bfc65b6e6ad0a8c1856252299c16562baf 100644
> --- a/drivers/usb/typec/ucsi/ucsi.c
> +++ b/drivers/usb/typec/ucsi/ucsi.c
> @@ -1637,6 +1637,9 @@ static int ucsi_register_port(struct ucsi *ucsi, struct ucsi_connector *con)
> cap->driver_data = con;
> cap->ops = &ucsi_ops;
>
> + if (ucsi->version >= UCSI_VERSION_2_0)
> + con->typec_cap.orientation_aware = true;
This is not enough. You should also parse the data and call
typec_set_orientation().
> +
> if (ucsi->ops->update_connector)
> ucsi->ops->update_connector(con);
>
>
> ---
> base-commit: f7d2388eeec24966fc4d5cf32d706f0514f29ac5
> change-id: 20251028-b4-ucsi-set-orientation-aware-on-version-2-and-above-b79245d4b066
>
> Best regards,
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] usb: typec: ucsi: Set orientation_aware if UCSI version is 2.x and above
2025-10-28 16:24 ` Dmitry Baryshkov
@ 2025-10-28 16:39 ` Abel Vesa
2025-10-28 17:29 ` Dmitry Baryshkov
0 siblings, 1 reply; 5+ messages in thread
From: Abel Vesa @ 2025-10-28 16:39 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Heikki Krogerus, Greg Kroah-Hartman, Bjorn Andersson,
Konrad Dybcio, Dmitry Baryshkov, linux-usb, linux-kernel
On 25-10-28 18:24:21, Dmitry Baryshkov wrote:
> On 28/10/2025 17:43, Abel Vesa wrote:
> > For UCSI 2.0 and above, since the orientation is part of the paylad,
> > set the orientation_aware by default and let the implementation specific
> > update_connector op override if necessary.
> >
> > Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
> > ---
> > drivers/usb/typec/ucsi/ucsi.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
> > index ed23edab776354f08452c539d75d27132b8c44dd..84afa9bfc65b6e6ad0a8c1856252299c16562baf 100644
> > --- a/drivers/usb/typec/ucsi/ucsi.c
> > +++ b/drivers/usb/typec/ucsi/ucsi.c
> > @@ -1637,6 +1637,9 @@ static int ucsi_register_port(struct ucsi *ucsi, struct ucsi_connector *con)
> > cap->driver_data = con;
> > cap->ops = &ucsi_ops;
> > + if (ucsi->version >= UCSI_VERSION_2_0)
> > + con->typec_cap.orientation_aware = true;
>
> This is not enough. You should also parse the data and call
> typec_set_orientation().
Actually no. That is done by the following patch:
https://lore.kernel.org/all/20251028-usb-typec-ucsi-orientation-v2-1-9330478bb6c1@linaro.org
Which has been already applied.
And no, we don't need Fixes tag as this is an improvement.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] usb: typec: ucsi: Set orientation_aware if UCSI version is 2.x and above
2025-10-28 16:39 ` Abel Vesa
@ 2025-10-28 17:29 ` Dmitry Baryshkov
0 siblings, 0 replies; 5+ messages in thread
From: Dmitry Baryshkov @ 2025-10-28 17:29 UTC (permalink / raw)
To: Abel Vesa
Cc: Heikki Krogerus, Greg Kroah-Hartman, Bjorn Andersson,
Konrad Dybcio, Dmitry Baryshkov, linux-usb, linux-kernel
On Tue, 28 Oct 2025 at 18:39, Abel Vesa <abel.vesa@linaro.org> wrote:
>
> On 25-10-28 18:24:21, Dmitry Baryshkov wrote:
> > On 28/10/2025 17:43, Abel Vesa wrote:
> > > For UCSI 2.0 and above, since the orientation is part of the paylad,
> > > set the orientation_aware by default and let the implementation specific
> > > update_connector op override if necessary.
> > >
> > > Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
> > > ---
> > > drivers/usb/typec/ucsi/ucsi.c | 3 +++
> > > 1 file changed, 3 insertions(+)
> > >
> > > diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
> > > index ed23edab776354f08452c539d75d27132b8c44dd..84afa9bfc65b6e6ad0a8c1856252299c16562baf 100644
> > > --- a/drivers/usb/typec/ucsi/ucsi.c
> > > +++ b/drivers/usb/typec/ucsi/ucsi.c
> > > @@ -1637,6 +1637,9 @@ static int ucsi_register_port(struct ucsi *ucsi, struct ucsi_connector *con)
> > > cap->driver_data = con;
> > > cap->ops = &ucsi_ops;
> > > + if (ucsi->version >= UCSI_VERSION_2_0)
> > > + con->typec_cap.orientation_aware = true;
> >
> > This is not enough. You should also parse the data and call
> > typec_set_orientation().
>
> Actually no. That is done by the following patch:
>
> https://lore.kernel.org/all/20251028-usb-typec-ucsi-orientation-v2-1-9330478bb6c1@linaro.org
>
> Which has been already applied.
>
> And no, we don't need Fixes tag as this is an improvement.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] usb: typec: ucsi: Set orientation_aware if UCSI version is 2.x and above
2025-10-28 15:43 [PATCH] usb: typec: ucsi: Set orientation_aware if UCSI version is 2.x and above Abel Vesa
2025-10-28 16:24 ` Dmitry Baryshkov
@ 2025-10-31 13:32 ` Heikki Krogerus
1 sibling, 0 replies; 5+ messages in thread
From: Heikki Krogerus @ 2025-10-31 13:32 UTC (permalink / raw)
To: Abel Vesa
Cc: Greg Kroah-Hartman, Bjorn Andersson, Konrad Dybcio,
Dmitry Baryshkov, linux-usb, linux-kernel
Tue, Oct 28, 2025 at 05:43:03PM +0200, Abel Vesa kirjoitti:
> For UCSI 2.0 and above, since the orientation is part of the paylad,
> set the orientation_aware by default and let the implementation specific
> update_connector op override if necessary.
>
> Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> drivers/usb/typec/ucsi/ucsi.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
> index ed23edab776354f08452c539d75d27132b8c44dd..84afa9bfc65b6e6ad0a8c1856252299c16562baf 100644
> --- a/drivers/usb/typec/ucsi/ucsi.c
> +++ b/drivers/usb/typec/ucsi/ucsi.c
> @@ -1637,6 +1637,9 @@ static int ucsi_register_port(struct ucsi *ucsi, struct ucsi_connector *con)
> cap->driver_data = con;
> cap->ops = &ucsi_ops;
>
> + if (ucsi->version >= UCSI_VERSION_2_0)
> + con->typec_cap.orientation_aware = true;
> +
> if (ucsi->ops->update_connector)
> ucsi->ops->update_connector(con);
>
>
thanks,
--
heikki
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-10-31 13:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-28 15:43 [PATCH] usb: typec: ucsi: Set orientation_aware if UCSI version is 2.x and above Abel Vesa
2025-10-28 16:24 ` Dmitry Baryshkov
2025-10-28 16:39 ` Abel Vesa
2025-10-28 17:29 ` Dmitry Baryshkov
2025-10-31 13:32 ` Heikki Krogerus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®