usb: typec: qcom-pmic-typec: fix arguments of qcom_pmic_typec_pdphy_set_roles
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Sat, 13 Jan 2024 20:55:49 +0000 (22:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 28 Jan 2024 01:46:19 +0000 (17:46 -0800)
commit65145a03d65be80d389bf24c1874c634527de849
treedc33420806c0260f0b1d37345058c616ca330a6a
parent43a029724d1c8219cc4e58e9fafbeedd1bc283fa
usb: typec: qcom-pmic-typec: fix arguments of qcom_pmic_typec_pdphy_set_roles

The function qcom_pmic_typec_set_roles() passes enum values as boolean
values to qcom_pmic_typec_pdphy_set_roles(), which then interprets them
as bit values. Be more explicit about it, pass enum values directly and
compute corresponding bit masks in qcom_pmic_typec_pdphy_set_roles().

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Link: https://lore.kernel.org/r/20240113-pmi632-typec-v2-6-182d9aa0a5b3@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c
drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.h