Am Mittwoch, 16. Juli 2025, 03:56:27 Mitteleuropäische Sommerzeit schrieb Chaoyi Chen: > Hi Dmitry, > > On 2025/7/15 20:05, Dmitry Baryshkov wrote: > > On Tue, Jul 15, 2025 at 07:24:54PM +0800, Chaoyi Chen wrote: > >> From: Chaoyi Chen <chaoyi.c...@rock-chips.com> > >> > >> This patch add support for Type-C Port Controller Manager. > >> The extcon device should still be supported. > >> > >> Signed-off-by: Chaoyi Chen <chaoyi.c...@rock-chips.com> > >> --- > >> drivers/phy/rockchip/phy-rockchip-typec.c | 335 ++++++++++++++++++++-- > >> 1 file changed, 319 insertions(+), 16 deletions(-) > > Please keep TCPM implementation under drivers/usb/typec/tcpm/ . Create > > an aux device and write an aux driver for the TCPM part. > > Sorry, the commit messages may not be described accurately enough. > > This patch adds mux/switch operations to the PHY driver to improve > communication with the TCPM framework. Since this PHY is a combo USB/DP > PHY, it requires configuration changes to the PHY lanes based on the > USB-C plug orientation (CC logic), similar to the existing extcon > mechanism implementation. Of course, the original extcon functionality > will remain fully compatible.
and looking at other users of for example typec_switch_register() [0], there are a number of them already used in other phy drivers accross Freescale, Qualcomm, Rockchip and Samsung. Grouping the mux/switch with the phy driver as this patch does, makes way more sense than to introduce additional infrastruture. [0] https://elixir.bootlin.com/linux/v6.15.6/A/ident/typec_switch_register