From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Abel Vesa <abel.vesa@linaro.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Johan Hovold <johan+linaro@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Sasha Levin <sashal@kernel.org>,
heikki.krogerus@linux.intel.com, quic_bjorande@quicinc.com,
javier.carrasco.cruz@gmail.com, quic_kriskura@quicinc.com,
linux-usb@vger.kernel.org
Subject: [PATCH AUTOSEL 6.11 10/15] usb: typec: ucsi: glink: be more precise on orientation-aware ports
Date: Wed, 4 Dec 2024 17:17:04 -0500 [thread overview]
Message-ID: <20241204221726.2247988-10-sashal@kernel.org> (raw)
In-Reply-To: <20241204221726.2247988-1-sashal@kernel.org>
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
[ Upstream commit de9df030ccb5d3e31ee0c715d74cd77c619748f8 ]
Instead of checking if any of the USB-C ports have orientation GPIO and
thus is orientation-aware, check for the GPIO for the port being
registered. There are no boards that are affected by this change at this
moment, so the patch is not marked as a fix, but it might affect other
boards in future.
Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Tested-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20241109-ucsi-glue-fixes-v2-2-8b21ff4f9fbe@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/usb/typec/ucsi/ucsi_glink.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/typec/ucsi/ucsi_glink.c b/drivers/usb/typec/ucsi/ucsi_glink.c
index 6aace19d595bc..ad0bc7804939b 100644
--- a/drivers/usb/typec/ucsi/ucsi_glink.c
+++ b/drivers/usb/typec/ucsi/ucsi_glink.c
@@ -172,12 +172,12 @@ static int pmic_glink_ucsi_async_control(struct ucsi *__ucsi, u64 command)
static void pmic_glink_ucsi_update_connector(struct ucsi_connector *con)
{
struct pmic_glink_ucsi *ucsi = ucsi_get_drvdata(con->ucsi);
- int i;
- for (i = 0; i < PMIC_GLINK_MAX_PORTS; i++) {
- if (ucsi->port_orientation[i])
- con->typec_cap.orientation_aware = true;
- }
+ if (con->num > PMIC_GLINK_MAX_PORTS ||
+ !ucsi->port_orientation[con->num - 1])
+ return;
+
+ con->typec_cap.orientation_aware = true;
}
static void pmic_glink_ucsi_connector_status(struct ucsi_connector *con)
--
2.43.0
next prev parent reply other threads:[~2024-12-04 23:29 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-04 22:16 [PATCH AUTOSEL 6.11 01/15] usb: chipidea: add CI_HDRC_HAS_SHORT_PKT_LIMIT flag Sasha Levin
2024-12-04 22:16 ` [PATCH AUTOSEL 6.11 02/15] usb: chipidea: udc: limit usb request length to max 16KB Sasha Levin
2024-12-04 22:16 ` [PATCH AUTOSEL 6.11 03/15] usb: chipidea: udc: create bounce buffer for problem sglist entries if possible Sasha Levin
2024-12-04 22:16 ` [PATCH AUTOSEL 6.11 04/15] usb: chipidea: udc: handle USB Error Interrupt if IOC not set Sasha Levin
2024-12-04 22:16 ` [PATCH AUTOSEL 6.11 05/15] usb: typec: ucsi: Do not call ACPI _DSM method for UCSI read operations Sasha Levin
2024-12-04 22:17 ` [PATCH AUTOSEL 6.11 06/15] iio: adc: ad7192: properly check spi_get_device_match_data() Sasha Levin
2024-12-04 22:17 ` [PATCH AUTOSEL 6.11 07/15] iio: light: ltr501: Add LTER0303 to the supported devices Sasha Levin
2024-12-04 22:17 ` [PATCH AUTOSEL 6.11 08/15] drm: display: Set fwnode for aux bus devices Sasha Levin
2024-12-06 0:06 ` Saravana Kannan
2024-12-06 0:07 ` Saravana Kannan
2024-12-10 16:12 ` Sasha Levin
2024-12-04 22:17 ` [PATCH AUTOSEL 6.11 09/15] phy: tegra: xusb: Set fwnode for xusb port devices Sasha Levin
2024-12-04 22:17 ` Sasha Levin
2024-12-06 0:05 ` Saravana Kannan
2024-12-06 0:05 ` Saravana Kannan
2024-12-04 22:17 ` Sasha Levin [this message]
2024-12-04 22:17 ` [PATCH AUTOSEL 6.11 11/15] ASoC: amd: yc: fix internal mic on Redmi G 2022 Sasha Levin
2024-12-04 22:17 ` [PATCH AUTOSEL 6.11 12/15] drm/amdgpu/vcn: reset fw_shared when VCPU buffers corrupted on vcn v4.0.3 Sasha Levin
2024-12-04 22:17 ` [PATCH AUTOSEL 6.11 13/15] MIPS: Loongson64: DTS: Really fix PCIe port nodes for ls7a Sasha Levin
2024-12-06 9:01 ` Xi Ruoyao
2024-12-04 22:17 ` [PATCH AUTOSEL 6.11 14/15] ASoC: amd: yc: Add quirk for microphone on Lenovo Thinkpad T14s Gen 6 21M1CTO1WW Sasha Levin
2024-12-04 22:17 ` [PATCH AUTOSEL 6.11 15/15] powerpc/prom_init: Fixup missing powermac #size-cells Sasha Levin
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=20241204221726.2247988-10-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=abel.vesa@linaro.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=javier.carrasco.cruz@gmail.com \
--cc=johan+linaro@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=quic_bjorande@quicinc.com \
--cc=quic_kriskura@quicinc.com \
--cc=stable@vger.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.