usb: typec: qcom-pmic-typec: allow different implementations for the PD PHY
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Sat, 13 Jan 2024 20:55:50 +0000 (22:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 28 Jan 2024 01:46:26 +0000 (17:46 -0800)
commitd2f9b93de0fe71b5040be391afd3d065ab113fb7
treebfac15c603b2ab239e35679a2246c84a26810b35
parent65145a03d65be80d389bf24c1874c634527de849
usb: typec: qcom-pmic-typec: allow different implementations for the PD PHY

Rework Qualcomm PMIC TCPM driver to allow different platform-specific
implementations of the PD PHY interface. While majority of platforms
has the same of register for the PD PHY, some obscure ones (PMI632) do
not have real PD PHY support. Add proper interface between the main
module and the PD PHY backend to allow switching the PD PHY
implementation.

Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240113-pmi632-typec-v2-7-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.h [new file with mode: 0644]
drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c
drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.h
drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.h