linux/drivers/phy
Grygorii Strashko 79a5a18aa9 phy: core: rework phy_set_mode to accept phy mode and submode
Currently the attempt to add support for Ethernet interface mode PHY
(MII/GMII/RGMII) will lead to the necessity of extending enum phy_mode and
duplicate there values from phy_interface_t enum (or introduce more PHY
callbacks) [1]. Both approaches are ineffective and would lead to fast
bloating of enum phy_mode or struct phy_ops in the process of adding more
PHYs for different subsystems which will make them unmaintainable.

As discussed in [1] the solution could be to introduce dual level PHYs mode
configuration - PHY mode and PHY submode. The PHY mode will define generic
PHY type (subsystem - PCIE/ETHERNET/USB_) while the PHY submode - subsystem
specific interface mode. The last is usually already defined in
corresponding subsystem headers (phy_interface_t for Ethernet, enum
usb_device_speed for USB).

This patch is cumulative change which refactors PHY framework code to
support dual level PHYs mode configuration - PHY mode and PHY submode. It
extends .set_mode() callback to support additional parameter "int submode"
and converts all corresponding PHY drivers to support new .set_mode()
callback declaration.
The new extended PHY API
 int phy_set_mode_ext(struct phy *phy, enum phy_mode mode, int submode)
is introduced to support dual level PHYs mode configuration and existing
phy_set_mode() API is converted to macros, so PHY framework consumers do
not need to be changed (~21 matches).

[1] http://lkml.kernel.org/r/d63588f6-9ab0-848a-5ad4-8073143bd95d@ti.com
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2018-12-12 10:01:33 +05:30
..
allwinner phy: core: rework phy_set_mode to accept phy mode and submode 2018-12-12 10:01:33 +05:30
amlogic phy: core: rework phy_set_mode to accept phy mode and submode 2018-12-12 10:01:33 +05:30
broadcom phy: brcm-sata: Add BCM63138 (DSL) PHY init sequence 2018-09-25 16:10:08 +05:30
cadence phy: Add driver for Cadence MHDP DisplayPort SD0801 PHY 2018-09-10 14:25:44 +05:30
hisilicon phy: add inno-usb2-phy driver for hi3798cv200 SoC 2018-03-16 16:55:29 +05:30
lantiq phy: lantiq: Fix compile warning 2018-09-26 13:09:39 +05:30
marvell phy: core: rework phy_set_mode to accept phy mode and submode 2018-12-12 10:01:33 +05:30
mediatek phy: core: rework phy_set_mode to accept phy mode and submode 2018-12-12 10:01:33 +05:30
motorola gpiolib: Pass array info to get/set array functions 2018-09-13 11:16:54 +02:00
mscc phy: core: rework phy_set_mode to accept phy mode and submode 2018-12-12 10:01:33 +05:30
qualcomm phy: core: rework phy_set_mode to accept phy mode and submode 2018-12-12 10:01:33 +05:30
ralink phy: add 'depends on HAS_IOMEM' to fix unmet dependency 2018-03-16 13:40:45 +05:30
renesas phy: renesas: convert to SPDX identifiers 2018-09-26 13:09:41 +05:30
rockchip phy: rockchip-usb: add usb-uart setup for rk3188 2018-09-25 16:10:13 +05:30
samsung phy: exynos-mipi-video: Simplify code by using regmap_update_bits() 2018-04-25 10:52:59 +05:30
socionext phy: uniphier-pcie: Depend on HAS_IOMEM 2018-11-12 16:19:06 +05:30
st phy: stm32: fix usbphyc static checker and checkpatch warnings 2018-05-20 21:51:25 +05:30
tegra phy: Convert to using %pOFn instead of device_node.name 2018-09-25 16:10:07 +05:30
ti phy: core: rework phy_set_mode to accept phy mode and submode 2018-12-12 10:01:33 +05:30
Kconfig USB/PHY patches for 4.20-rc1 2018-10-26 08:14:13 -07:00
Makefile USB/PHY patches for 4.20-rc1 2018-10-26 08:14:13 -07:00
phy-core.c phy: core: rework phy_set_mode to accept phy mode and submode 2018-12-12 10:01:33 +05:30
phy-lpc18xx-usb-otg.c phy: lpc18xx-usb-otg: error handling in lpc18xx_usb_otg_phy_power_on() 2018-03-16 13:40:42 +05:30
phy-pistachio-usb.c PHY: Add driver for Pistachio USB2.0 PHY 2015-06-21 21:53:38 +02:00
phy-xgene.c phy: xgene: rename "enum phy_mode" to "enum xgene_phy_mode" 2016-07-04 17:19:21 +05:30