summaryrefslogtreecommitdiffstats
path: root/drivers/phy/qualcomm (follow)
Commit message (Collapse)AuthorAgeFilesLines
* phy: qcom-qmp-pcie: fix resource mapping for SDM845 QHP PHYDmitry Baryshkov2022-09-291-1/+4
| | | | | | | | | | | | | | On SDM845 one of PCIe PHYs (the QHP one) has the same region for TX and RX registers. Since the commit 4be26f695ffa ("phy: qcom-qmp-pcie: fix memleak on probe deferral") added checking that resources are not allocated beforehand, this PHY can not be probed anymore. Fix this by skipping the map of ->rx resource on the QHP PHY and assign it manually. Fixes: 4be26f695ffa ("phy: qcom-qmp-pcie: fix memleak on probe deferral") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20220926172514.880776-1-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-usb: Use dev_err_probe() to simplify codeYuan Can2022-09-241-6/+3
| | | | | | | | | | | | | | In the probe path, dev_err() can be replaced with dev_err_probe() which will check if error code is -EPROBE_DEFER and prints the error name. It also sets the defer probe reason which can be checked later through debugfs. Signed-off-by: Yuan Can <yuancan@huawei.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Andrew Halaney <ahalaney@redhat.com> Link: https://lore.kernel.org/r/20220924070300.25080-5-yuancan@huawei.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-ufs: Use dev_err_probe() to simplify codeYuan Can2022-09-241-6/+3
| | | | | | | | | | | | | In the probe path, dev_err() can be replaced with dev_err_probe() which will check if error code is -EPROBE_DEFER and prints the error name. It also sets the defer probe reason which can be checked later through debugfs. Signed-off-by: Yuan Can <yuancan@huawei.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Andrew Halaney <ahalaney@redhat.com> Link: https://lore.kernel.org/r/20220924070300.25080-4-yuancan@huawei.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-pcie-msm8996: Use dev_err_probe() to simplify codeYuan Can2022-09-241-6/+3
| | | | | | | | | | | | | In the probe path, dev_err() can be replaced with dev_err_probe() which will check if error code is -EPROBE_DEFER and prints the error name. It also sets the defer probe reason which can be checked later through debugfs. Signed-off-by: Yuan Can <yuancan@huawei.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Andrew Halaney <ahalaney@redhat.com> Link: https://lore.kernel.org/r/20220924070300.25080-3-yuancan@huawei.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-combo: Use dev_err_probe() to simplify codeYuan Can2022-09-241-14/+7
| | | | | | | | | | | | | In the probe path, dev_err() can be replaced with dev_err_probe() which will check if error code is -EPROBE_DEFER and prints the error name. It also sets the defer probe reason which can be checked later through debugfs. Signed-off-by: Yuan Can <yuancan@huawei.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Andrew Halaney <ahalaney@redhat.com> Link: https://lore.kernel.org/r/20220924070300.25080-2-yuancan@huawei.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qualcomm: call clk_disable_unprepare in the error handlingDongliang Mu2022-09-241-2/+4
| | | | | | | | | | | | | | | | | | | | | | Smatch reports the following error: drivers/phy/qualcomm/phy-qcom-usb-hsic.c:82 qcom_usb_hsic_phy_power_on() warn: 'uphy->cal_clk' from clk_prepare_enable() not released on lines: 58. drivers/phy/qualcomm/phy-qcom-usb-hsic.c:82 qcom_usb_hsic_phy_power_on() warn: 'uphy->cal_sleep_clk' from clk_prepare_enable() not released on lines: 58. drivers/phy/qualcomm/phy-qcom-usb-hsic.c:82 qcom_usb_hsic_phy_power_on() warn: 'uphy->phy_clk' from clk_prepare_enable() not released on lines: 58. Fix this by calling proper clk_disable_unprepare calls. Fixes: 0b56e9a7e835 ("phy: Group vendor specific phy drivers") Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20220914051334.69282-1-dzm91@hust.edu.cn Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-snps: Use dev_err_probe() to simplify codeYuan Can2022-09-241-12/+6
| | | | | | | | | | | | | In the probe path, dev_err() can be replaced with dev_err_probe() which will check if error code is -EPROBE_DEFER and prints the error name. It also sets the defer probe reason which can be checked later through debugfs. Signed-off-by: Yuan Can <yuancan@huawei.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Andrew Halaney <ahalaney@redhat.com> Link: https://lore.kernel.org/r/20220922111228.36355-8-yuancan@huawei.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qusb2: Use dev_err_probe() to simplify codeYuan Can2022-09-241-18/+9
| | | | | | | | | | | | | | In the probe path, dev_err() can be replaced with dev_err_probe() which will check if error code is -EPROBE_DEFER and prints the error name. It also sets the defer probe reason which can be checked later through debugfs. Signed-off-by: Yuan Can <yuancan@huawei.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Andrew Halaney <ahalaney@redhat.com> Link: https://lore.kernel.org/r/20220922111228.36355-7-yuancan@huawei.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-pcie: Use dev_err_probe() to simplify codeYuan Can2022-09-241-6/+3
| | | | | | | | | | | | | | In the probe path, dev_err() can be replaced with dev_err_probe() which will check if error code is -EPROBE_DEFER and prints the error name. It also sets the defer probe reason which can be checked later through debugfs. Signed-off-by: Yuan Can <yuancan@huawei.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Andrew Halaney <ahalaney@redhat.com> Link: https://lore.kernel.org/r/20220922111228.36355-4-yuancan@huawei.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-combo: drop redundant DP config flagJohan Hovold2022-09-241-45/+18
| | | | | | | | | | | | Drop the DP_COM control block flag from the configuration data, which is set for all combo PHYs and hence no longer needed since the QMP driver split. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20220920073826.20811-18-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-usb: consolidate lane configJohan Hovold2022-09-241-32/+20
| | | | | | | | | | | | | | For legacy reasons, there are two configuration parameters that appear to describe the number of lanes a PHY has, even if "nlanes" was actually used for a different purpose. Replace them both with a new field simply named "lanes". Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20220920073826.20811-17-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-ufs: consolidate lane configJohan Hovold2022-09-241-21/+10
| | | | | | | | | | | | | For legacy reasons, there are two configuration parameters that describe the number of lanes a PHY has. Replace them both with a new field simply named "lanes". Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20220920073826.20811-16-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-combo: consolidate lane configJohan Hovold2022-09-241-25/+13
| | | | | | | | | | | | | | For legacy reasons, there are two configuration parameters that appear to describe the number of lanes a PHY has, even if "nlanes" was actually used for a different purpose. Replace them both with a new field simply named "lanes". Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20220920073826.20811-15-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-pcie-msm8996: rename nlanes configJohan Hovold2022-09-241-4/+4
| | | | | | | | | | | The nlanes configuration parameter is really the number of PHYs provided by this QMP block on MSM8996. Rename it accordingly. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20220920073826.20811-14-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-pcie: consolidate lane configJohan Hovold2022-09-241-23/+16
| | | | | | | | | | | | | For legacy reasons, there are two configuration parameters that describe the number of lanes a PHY has. Replace them both with a new field simply named "lanes". Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20220920073826.20811-13-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp: drop unused index fieldJohan Hovold2022-09-244-12/+0
| | | | | | | | | | | Only the MSM8996 PCIe QMP driver uses the index field so drop it from the other drivers. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20220920073826.20811-12-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-pcie: drop unused config fieldJohan Hovold2022-09-241-1/+0
| | | | | | | | | | Drop the unused mask_com_pcs_ready field from struct qmp_phy_cfg. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20220920073826.20811-11-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-pcie: drop unused mode fieldJohan Hovold2022-09-241-2/+0
| | | | | | | | | | Drop the unused mode field from struct qmp_phy. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20220920073826.20811-10-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-pcie-msm8996: drop unused kernel docJohan Hovold2022-09-241-1/+0
| | | | | | | | | | Drop the removed mode field from the struct qmp_phy kernel doc. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20220920073826.20811-9-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp: drop unused forward declarationsJohan Hovold2022-09-244-8/+0
| | | | | | | | | | Only the combo QMP driver needs a forward declaration of struct qmp_phy. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20220920073826.20811-8-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-usb: drop init and exit wrappersJohan Hovold2022-09-241-25/+4
| | | | | | | | | | Drop the unnecessary PHY init and exit callback wrappers. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20220920073826.20811-7-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-pcie: drop init and exit wrappersJohan Hovold2022-09-241-25/+4
| | | | | | | | | | Drop the unnecessary PHY init and exit callback wrappers. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20220920073826.20811-6-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-usb: drop unused type from configJohan Hovold2022-09-241-26/+0
| | | | | | | | | | | The configuration PHY type is no longer needed since the QMP driver split so drop it from the configuration and suspend callbacks. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20220920073826.20811-5-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-ufs: drop unused type from configJohan Hovold2022-09-241-8/+0
| | | | | | | | | | | The configuration PHY type is no longer used since the QMP driver split so drop it from the configuration. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20220920073826.20811-4-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-pcie-msm8996: drop unused type from configJohan Hovold2022-09-241-3/+0
| | | | | | | | | | | The configuration PHY type is no longer used since the QMP driver split so drop it from the configuration. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20220920073826.20811-3-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-pcie: drop unused type from configJohan Hovold2022-09-241-14/+0
| | | | | | | | | | | The configuration PHY type is no longer used since the QMP driver split so drop it from the configurations. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20220920073826.20811-2-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-combo: fix sc8280xp PCS_USB offsetJohan Hovold2022-09-201-0/+1
| | | | | | | | | | | | | | The PCS_USB register block lives at an offset of 0x300 from the PCS region on SC8280XP so add the missing offset to avoid corrupting unrelated registers on runtime suspend. Note that this region should probably be described separately in the binding. Fixes: a2e927b0e50d ("phy: qcom-qmp-combo: Add sc8280xp USB/DP combo phys") Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20220919095700.2228-1-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-usb: drop legacy DT workaroundJohan Hovold2022-09-201-21/+6
| | | | | | | | | | | | | | | | | | | Commit 5e17b95d9893 ("phy: qcom-qmp: Utilize fully-specified DT registers") added a workaround for legacy devicetrees which did not specify register regions for the second lane of some dual-lane PHYs. At the time, the only two dual-lane PHYs supported by mainline were "qcom,sdm845-qmp-usb3-phy" and "qcom,sdm845-qmp-ufs-phy" and they had been added to the binding less than six months before the binding was fixed. Presumably no one is using four-year old SDM845 dtbs with mainline anymore so drop the workaround for malformed devicetrees. In the unlikely event that anyone complains, we can consider reverting. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20220916102340.11520-12-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-ufs: drop legacy DT workaroundJohan Hovold2022-09-201-21/+6
| | | | | | | | | | | | | | | | | | | Commit 5e17b95d9893 ("phy: qcom-qmp: Utilize fully-specified DT registers") added a workaround for legacy devicetrees which did not specify register regions for the second lane of some dual-lane PHYs. At the time, the only two dual-lane PHYs supported by mainline were "qcom,sdm845-qmp-usb3-phy" and "qcom,sdm845-qmp-ufs-phy" and they had been added to the binding less than six months before the binding was fixed. Presumably no one is using four-year old SDM845 dtbs with mainline anymore so drop the workaround for malformed devicetrees. In the unlikely event that anyone complains, we can consider reverting. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20220916102340.11520-11-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-combo: drop unused legacy DT workaroundJohan Hovold2022-09-201-21/+6
| | | | | | | | | | | | | | | | | Commit 5e17b95d9893 ("phy: qcom-qmp: Utilize fully-specified DT registers") added a workaround for legacy devicetrees which did not specify register regions for the second lane of some dual-lane PHYs. At the time, the only two dual-lane PHYs supported by mainline were "qcom,sdm845-qmp-usb3-phy" and "qcom,sdm845-qmp-ufs-phy", neither of which is a combo PHY. Drop the workaround for malformed devicetrees, which should no longer be needed since the QMP driver split. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20220916102340.11520-10-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-pcie: drop unused legacy DT workaroundJohan Hovold2022-09-201-21/+6
| | | | | | | | | | | | | | | | | Commit 5e17b95d9893 ("phy: qcom-qmp: Utilize fully-specified DT registers") added a workaround for legacy devicetrees which did not specify register regions for the second lane of some dual-lane PHYs. At the time, the only two dual-lane PHYs supported by mainline were "qcom,sdm845-qmp-usb3-phy" and "qcom,sdm845-qmp-ufs-phy", neither of which is a PCIe PHY. Drop the workaround for malformed devicetrees, which should no longer be needed since the QMP driver split. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20220916102340.11520-9-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-pcie-msm8996: drop unused pcs_misc handlingJohan Hovold2022-09-201-14/+0
| | | | | | | | | | The MSM8996 QMP PHY driver does not use the PCS_MISC IO region (and neither do the DT binding specify it) so remove the corresponding code from the driver. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20220916102340.11520-8-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-usb: fix memleak on probe deferralJohan Hovold2022-09-201-15/+42
| | | | | | | | | | | | | | | | Switch to using the device-managed of_iomap helper to avoid leaking memory on probe deferral and driver unbind. Note that this helper checks for already reserved regions and may fail if there are multiple devices claiming the same memory. Two bindings currently rely on overlapping mappings for the PCS region so fallback to non-exclusive mappings for those for now. Fixes: e78f3d15e115 ("phy: qcom-qmp: new qmp phy driver for qcom-chipsets") Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20220916102340.11520-7-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-ufs: fix memleak on probe deferralJohan Hovold2022-09-201-15/+15
| | | | | | | | | | | | | Switch to using the device-managed of_iomap helper to avoid leaking memory on probe deferral and driver unbind. Note that this helper checks for already reserved regions and may fail if there are multiple devices claiming the same memory. Fixes: e78f3d15e115 ("phy: qcom-qmp: new qmp phy driver for qcom-chipsets") Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20220916102340.11520-6-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-combo: fix memleak on probe deferralJohan Hovold2022-09-201-15/+17
| | | | | | | | | | | | | Switch to using the device-managed of_iomap helper to avoid leaking memory on probe deferral and driver unbind. Note that this helper checks for already reserved regions and may fail if there are multiple devices claiming the same memory. Fixes: e78f3d15e115 ("phy: qcom-qmp: new qmp phy driver for qcom-chipsets") Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20220916102340.11520-5-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-pcie-msm8996: fix memleak on probe deferralJohan Hovold2022-09-201-12/+11
| | | | | | | | | | | | | Switch to using the device-managed of_iomap helper to avoid leaking memory on probe deferral and driver unbind. Note that this helper checks for already reserved regions and may fail if there are multiple devices claiming the same memory. Fixes: e78f3d15e115 ("phy: qcom-qmp: new qmp phy driver for qcom-chipsets") Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20220916102340.11520-4-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-pcie: fix memleak on probe deferralJohan Hovold2022-09-201-17/+17
| | | | | | | | | | | | | Switch to using the device-managed of_iomap helper to avoid leaking memory on probe deferral and driver unbind. Note that this helper checks for already reserved regions and may fail if there are multiple devices claiming the same memory. Fixes: e78f3d15e115 ("phy: qcom-qmp: new qmp phy driver for qcom-chipsets") Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20220916102340.11520-3-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-pcie: add pcs_misc sanity checkJohan Hovold2022-09-201-2/+4
| | | | | | | | | | | | | | Make sure that the (otherwise) optional pcs_misc IO region has been provided in case the configuration specifies a corresponding initialisation table to avoid crashing with malformed device trees. Note that the related debug message is now superfluous as the region is only used when the configuration has a pcs_misc table. Fixes: 421c9a0e9731 ("phy: qcom: qmp: Add SDM845 PCIe QMP PHY support") Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20220916102340.11520-2-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-usb: shorten function prefixesJohan Hovold2022-09-202-64/+60
| | | | | | | | | | | | | The driver function prefix has gotten unnecessarily long and hurts readability. Shorten "qcom_qmp_phy_" to "qmp_" (which likely stands for "Qualcomm Multi PHY" or similar anyway). Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20220907110728.19092-17-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-ufs: shorten function prefixesJohan Hovold2022-09-201-45/+43
| | | | | | | | | | | | | The driver function prefix has gotten unnecessarily long and hurts readability. Shorten "qcom_qmp_phy_" to "qmp_" (which likely stands for "Qualcomm Multi PHY" or similar anyway). Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20220907110728.19092-16-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-pcie-msm8996: shorten function prefixesJohan Hovold2022-09-201-47/+46
| | | | | | | | | | | | | The driver function prefix has gotten unnecessarily long and hurts readability. Shorten "qcom_qmp_phy_" to "qmp_" (which likely stands for "Qualcomm Multi PHY" or similar anyway). Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20220907110728.19092-15-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-pcie-msm8996: drop unused secondary init tablesJohan Hovold2022-09-201-26/+0
| | | | | | | | | | Drop the secondary register initialisation tables which aren't used by this driver. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20220907110728.19092-14-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-combo: shorten function prefixesJohan Hovold2022-09-201-86/+79
| | | | | | | | | | | | | The driver function prefix has gotten unnecessarily long and hurts readability. Shorten "qcom_qmp_phy_" to "qmp_" (which likely stands for "Qualcomm Multi PHY" or similar anyway). Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20220907110728.19092-13-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp: silence noisy probeJohan Hovold2022-09-205-10/+0
| | | | | | | | | | | | Drivers should in general not log anything during unless there are errors. Drop the pointless registration info message from the QMP drivers. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20220907110728.19092-12-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-usb: drop unused definesJohan Hovold2022-09-201-13/+0
| | | | | | | | Drop defines and enums that are unused since the QMP driver split. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20220907110728.19092-11-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-usb: disable runtime PM on unbindJohan Hovold2022-09-201-4/+3
| | | | | | | | | | Make sure to disable runtime PM also on driver unbind. Fixes: ac0d239936bd ("phy: qcom-qmp: Add support for runtime PM"). Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20220907110728.19092-10-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-ufs: drop unused definesJohan Hovold2022-09-201-33/+1
| | | | | | | | Drop defines and enums that are unused since the QMP driver split. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20220907110728.19092-9-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-ufs: drop unused runtime PM implementationJohan Hovold2022-09-201-38/+0
| | | | | | | | | | | | | | | | Drop the unused and incomplete runtime PM implementation, which was only used by USB PHYs before splitting the QMP driver. Note that the runtime PM was never disabled (and state restored) on driver unbind. This effectively reverts commit ac0d239936bd ("phy: qcom-qmp: Add support for runtime PM"). Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20220907110728.19092-8-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-pcie-msm8996: drop unused definesJohan Hovold2022-09-201-26/+1
| | | | | | | | Drop defines and enums that are unused since the QMP driver split. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20220907110728.19092-7-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
* phy: qcom-qmp-pcie-msm8996: drop unused runtime PM implementationJohan Hovold2022-09-201-37/+0
| | | | | | | | | | | | | | | | Drop the unused and incomplete runtime PM implementation, which was only used by USB PHYs before splitting the QMP driver. Note that the runtime PM was never disabled (and state restored) on driver unbind. This effectively reverts commit ac0d239936bd ("phy: qcom-qmp: Add support for runtime PM"). Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20220907110728.19092-6-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>