diff options
author | Johan Hovold <johan+linaro@kernel.org> | 2022-10-12 11:49:59 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2022-10-28 15:25:05 +0300 |
commit | 73ad6a9dd51799afd104edc2bf2016a347a717fe (patch) | |
tree | 9b9fc286e59c7374a7e3f53d64c2fb73acc442bd | |
parent | 5806b87dea8fc1b65a542ef93cbe5f6114157a74 (diff) | |
download | linux-73ad6a9dd51799afd104edc2bf2016a347a717fe.tar.xz |
phy: qcom-qmp-pcie: add config sanity checks
The driver expects every configuration to set the pwrdn_ctrl and
phy_status masks. Add some probe WARN_ON_ONCE() to probe to catch any
new driver support that fails to provide them.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20221012085002.24099-17-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
-rw-r--r-- | drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c index 5534a4ad0243..7c81667dd968 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c @@ -2347,6 +2347,9 @@ static int qmp_pcie_probe(struct platform_device *pdev) if (!cfg) return -EINVAL; + WARN_ON_ONCE(!cfg->pwrdn_ctrl); + WARN_ON_ONCE(!cfg->phy_status); + serdes = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(serdes)) return PTR_ERR(serdes); |