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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 drivers/soc/qcom/pmic_glink.c | 7 +++++++
 1 file changed, 7 insertions(+)

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)
-- 
2.42.0




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux