mirror-linux/drivers/phy
Vladimir Oltean e7556b59ba phy: add phy_get_rx_polarity() and phy_get_tx_polarity()
Add helpers in the generic PHY folder which can be used using 'select
PHY_COMMON_PROPS' from Kconfig, without otherwise needing to
enable GENERIC_PHY.

These helpers need to deal with the slight messiness of the fact that
the polarity properties are arrays per protocol, and with the fact that
there is no default value mandated by the standard properties, all
default values depend on driver and protocol (PHY_POL_NORMAL may be a
good default for SGMII, whereas PHY_POL_AUTO may be a good default for
PCIe).

Push the supported mask of polarities to these helpers, to simplify
drivers such that they don't need to validate what's in the device tree
(or other firmware description).

Add a KUnit test suite to make sure that the API produces the expected
results. The fact that we use fwnode structures means we can validate
with software nodes, and as opposed to the device_property API, we can
bypass the need to have a device structure.

Co-developed-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://patch.msgid.link/20260111093940.975359-6-vladimir.oltean@nxp.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2026-01-14 18:16:05 +05:30
..
allwinner phy: sun4i-usb: drop num_phys assumption 2025-08-20 21:43:33 +05:30
amlogic phy: amlogic: phy-meson-axg-pcie: Fix PHY creation order in axg-pcie probe 2025-04-11 17:07:15 +05:30
broadcom phy: broadcom: bcm63xx-usbh: fix section mismatches 2025-11-20 22:01:55 +05:30
cadence phy: cadence: cdns-dphy: Enable lower resolutions in dphy 2025-09-10 21:22:22 +05:30
freescale phy: fsl-imx8mq-usb: support alternate reference clock 2025-11-20 22:38:38 +05:30
hisilicon phy: hisilicon: Remove redundant ternary operators 2025-09-01 18:13:54 +05:30
ingenic phy: ingenic: use core driver model helper to handle probe errors 2025-08-20 22:25:38 +05:30
intel
lantiq
marvell phy: drop probe registration printks 2025-06-16 22:54:21 +05:30
mediatek phy: mediatek: tphy: Cleanup and document slew calibration 2025-06-26 16:33:42 -07:00
microchip phy: PHY_LAN966X_SERDES should depend on SOC_LAN966 || MCHP_LAN966X_PCI 2025-02-14 18:04:57 +05:30
motorola phy: mapphone-mdm6600: use gpiod_multi_set_value_cansleep 2025-02-17 14:27:34 +01:00
mscc
nuvoton
qualcomm phy: qcom: qmp-pcie: Add support for Glymur PCIe Gen5x4 PHY 2025-11-20 22:21:16 +05:30
ralink
realtek USB / Thunderbolt (USB4) changes for 6.13-rc1 2024-11-29 11:19:31 -08:00
renesas phy: renesas: Remove unneeded semicolons 2025-11-20 22:19:11 +05:30
rockchip phy: rockchip: samsung-hdptx: Prevent Inter-Pair Skew from exceeding the limits 2025-11-20 22:30:17 +05:30
samsung phy: exynos5-usbdrd: fix clock prepare imbalance 2025-11-20 22:10:17 +05:30
socionext
sophgo phy: sophgo: Remove unused of_gpio.h 2025-11-12 20:35:50 +05:30
st phy: drop probe registration printks 2025-06-16 22:54:21 +05:30
starfive phy: starfive: jh7110-usb: Fix USB 2.0 host occasional detection failure 2025-05-14 09:45:12 +01:00
sunplus
tegra phy: tegra: xusb: fix device and OF node leak at probe 2025-08-12 21:30:00 +05:30
ti phy: ti: gmii-sel: Add a sanity check on the phy_id 2025-11-20 22:24:35 +05:30
xilinx phy-zynqmp: Postpone getting clock rate until actually needed 2025-05-14 09:48:01 +01:00
Kconfig phy: add phy_get_rx_polarity() and phy_get_tx_polarity() 2026-01-14 18:16:05 +05:30
Makefile phy: add phy_get_rx_polarity() and phy_get_tx_polarity() 2026-01-14 18:16:05 +05:30
phy-airoha-pcie-regs.h phy: airoha: Fix REG_CSR_2L_RX{0,1}_REV0 definitions 2024-10-17 20:52:48 +05:30
phy-airoha-pcie.c phy: airoha: Fix REG_CSR_2L_JCPLL_SDM_HREN config in airoha_pcie_phy_init_ssc_jcpll() 2024-10-17 20:52:48 +05:30
phy-can-transceiver.c phy: phy-can-transceiver: Add support for TJA105{1,7} 2025-11-12 20:11:16 +05:30
phy-common-props-test.c phy: add phy_get_rx_polarity() and phy_get_tx_polarity() 2026-01-14 18:16:05 +05:30
phy-common-props.c phy: add phy_get_rx_polarity() and phy_get_tx_polarity() 2026-01-14 18:16:05 +05:30
phy-core-mipi-dphy.c
phy-core.c phy: core: Remove extra space after '=' 2025-11-18 22:28:34 +05:30
phy-lgm-usb.c
phy-lpc18xx-usb-otg.c
phy-nxp-ptn3222.c
phy-pistachio-usb.c
phy-snps-eusb2.c phy-for-6.17 2025-08-01 12:31:50 -07:00
phy-xgene.c