PCI: qcom: Expose link transition counts via debugfs
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Thu, 16 Mar 2023 08:11:17 +0000 (13:41 +0530)
committerLorenzo Pieralisi <lpieralisi@kernel.org>
Tue, 11 Apr 2023 09:31:11 +0000 (11:31 +0200)
commit05f4646409625b45e315ed0c5ab1078445f5ef43
treee50ca1d8103acb0653cd30fcd929b0dafce16e56
parent0f80edf8447d23e9eb07fcdbdec19b431ea7ad89
PCI: qcom: Expose link transition counts via debugfs

Qualcomm PCIe controllers have debug registers in the MHI region that
count PCIe link transitions. Expose them over debugfs to userspace to
help debug the low power issues.

Note that even though the registers are prefixed as PARF_, they don't
live under the "parf" register region. The register naming is following
the Qualcomm's internal documentation as like other registers.

While at it, let's arrange the local variables in probe function to follow
reverse XMAS tree order.

Link: https://lore.kernel.org/r/20230316081117.14288-20-manivannan.sadhasivam@linaro.org
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
drivers/pci/controller/dwc/pcie-qcom.c