diff mbox series

[2/2] soc: qcom: pmic-glink: enable UCSI on older devices

Message ID 20231023215327.695720-3-dmitry.baryshkov@linaro.org (mailing list archive)
State Superseded
Headers show
Series usb: typec: ucsi: add workaround for several Qualcomm platforms | expand

Commit Message

Dmitry Baryshkov Oct. 23, 2023, 9:47 p.m. UTC
Now that the UCSI driver got support for the 'no partner PDOs' quirk,
enable UCSI device on all older Qualcomm platforms. Newer platforms,
which handle UCSI_GET_PDOS properly, should opt-in to use full-featured
UCSI device (see sm8450 and sm8550).

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/soc/qcom/pmic_glink.c | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/drivers/soc/qcom/pmic_glink.c b/drivers/soc/qcom/pmic_glink.c
index 914057331afd..b524291586d8 100644
--- a/drivers/soc/qcom/pmic_glink.c
+++ b/drivers/soc/qcom/pmic_glink.c
@@ -16,9 +16,11 @@  enum {
 	PMIC_GLINK_CLIENT_BATT = 0,
 	PMIC_GLINK_CLIENT_ALTMODE,
 	PMIC_GLINK_CLIENT_UCSI,
+	PMIC_GLINK_CLIENT_UCSI_NO_PDOS,
 };
 
 #define PMIC_GLINK_CLIENT_DEFAULT	(BIT(PMIC_GLINK_CLIENT_BATT) |	\
+					 BIT(PMIC_GLINK_CLIENT_UCSI_NO_PDOS) | \
 					 BIT(PMIC_GLINK_CLIENT_ALTMODE))
 
 struct pmic_glink {
@@ -273,6 +275,11 @@  static int pmic_glink_probe(struct platform_device *pdev)
 		if (ret)
 			return ret;
 	}
+	if (pg->client_mask & BIT(PMIC_GLINK_CLIENT_UCSI_NO_PDOS)) {
+		ret = pmic_glink_add_aux_device(pg, &pg->ucsi_aux, "ucsi-no-pdos");
+		if (ret)
+			return ret;
+	}
 	if (pg->client_mask & BIT(PMIC_GLINK_CLIENT_ALTMODE)) {
 		ret = pmic_glink_add_aux_device(pg, &pg->altmode_aux, "altmode");
 		if (ret)