On 05/22/2017 02:02 PM, Andrew Lunn wrote: >> 2. I'm preparing a patch that adds a command-line parameter to at803x that >> makes this code conditional. > > FYI: > > A patch with a command line argument, i think you actually mean a > module argument, is very likely to be rejected.
Even a module argument would be rejected. If you need platform/SoC specific behavior propagated down to the PHY driver, several options exist: - pass an agreed upon value for phy_flags to of_phy_connect() see drivers/net/ethernet/broadcom/tg3.c and drivers/net/ethernet/broadcom/genet/bcmgenet.c for instance and update the driver to act on that "flags" see drivers/net/phy/broadcom.c and drivers/net/phy/bcm7xxx.c - register a PHY fixup which is specific to the board/SoC, and have the PHY fixup do whatever is necessary for your platform (like setting specific registers) Preference goes for the first solution, but phy_flags is just a 32-bits integer, so you could run out of bits. -- Florian