soc: qcom: pmic_glink: enable UCSI by default
Now as the issue with the UCSI_GET_PDOS is worked around, enable UCSI support for all PMIC_GLINK platforms except Qualcomm SC8180X. The mentioned SoC has slightly different UCSI implementation, which I would like be tested properly before enabling it. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20231025115620.905538-3-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org>
This commit is contained in:
parent
1d103d6af2
commit
4db09e7b96
@ -18,9 +18,6 @@ enum {
|
||||
PMIC_GLINK_CLIENT_UCSI,
|
||||
};
|
||||
|
||||
#define PMIC_GLINK_CLIENT_DEFAULT (BIT(PMIC_GLINK_CLIENT_BATT) | \
|
||||
BIT(PMIC_GLINK_CLIENT_ALTMODE))
|
||||
|
||||
struct pmic_glink {
|
||||
struct device *dev;
|
||||
struct pdr_handle *pdr;
|
||||
@ -263,10 +260,10 @@ static int pmic_glink_probe(struct platform_device *pdev)
|
||||
mutex_init(&pg->state_lock);
|
||||
|
||||
match_data = (unsigned long *)of_device_get_match_data(&pdev->dev);
|
||||
if (match_data)
|
||||
pg->client_mask = *match_data;
|
||||
else
|
||||
pg->client_mask = PMIC_GLINK_CLIENT_DEFAULT;
|
||||
if (!match_data)
|
||||
return -EINVAL;
|
||||
|
||||
pg->client_mask = *match_data;
|
||||
|
||||
if (pg->client_mask & BIT(PMIC_GLINK_CLIENT_UCSI)) {
|
||||
ret = pmic_glink_add_aux_device(pg, &pg->ucsi_aux, "ucsi");
|
||||
@ -336,14 +333,16 @@ static void pmic_glink_remove(struct platform_device *pdev)
|
||||
mutex_unlock(&__pmic_glink_lock);
|
||||
}
|
||||
|
||||
static const unsigned long pmic_glink_sc8180x_client_mask = BIT(PMIC_GLINK_CLIENT_BATT) |
|
||||
BIT(PMIC_GLINK_CLIENT_ALTMODE);
|
||||
|
||||
static const unsigned long pmic_glink_sm8450_client_mask = BIT(PMIC_GLINK_CLIENT_BATT) |
|
||||
BIT(PMIC_GLINK_CLIENT_ALTMODE) |
|
||||
BIT(PMIC_GLINK_CLIENT_UCSI);
|
||||
|
||||
static const struct of_device_id pmic_glink_of_match[] = {
|
||||
{ .compatible = "qcom,sm8450-pmic-glink", .data = &pmic_glink_sm8450_client_mask },
|
||||
{ .compatible = "qcom,sm8550-pmic-glink", .data = &pmic_glink_sm8450_client_mask },
|
||||
{ .compatible = "qcom,pmic-glink" },
|
||||
{ .compatible = "qcom,sc8180x-pmic-glink", .data = &pmic_glink_sc8180x_client_mask },
|
||||
{ .compatible = "qcom,pmic-glink", .data = &pmic_glink_sm8450_client_mask },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, pmic_glink_of_match);
|
||||
|
Loading…
x
Reference in New Issue
Block a user