On Tue, Aug 23, 2022 at 12:39:28PM +0200, Marek Vasut wrote: > On 8/23/22 11:49, Alvin Šipraga wrote: > > Hi Marek, > > Hi, > > > On Sat, Jul 30, 2022 at 08:05:00PM +0200, Marek Vasut wrote: > > > The TI TUSB320 seems like a better fit for USB TYPE-C subsystem, > > > which can expose details collected by the TUSB320 in a far more > > > precise way than extcon. Since there are existing users in the > > > kernel and in DT which depend on the extcon interface, keep it > > > for now. > > > > > > Add TYPE-C interface and expose the supported supply current, > > > direction and connector polarity via the TYPE-C interface. > > > > > > Signed-off-by: Marek Vasut <marex@xxxxxxx> > > > --- > > > Cc: Chanwoo Choi <cw00.choi@xxxxxxxxxxx> > > > Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> > > > Cc: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx> > > > Cc: Yassine Oudjana <y.oudjana@xxxxxxxxxxxxxx> > > > To: linux-usb@xxxxxxxxxxxxxxx > > > --- > > > drivers/extcon/Kconfig | 2 +- > > > drivers/extcon/extcon-usbc-tusb320.c | 159 +++++++++++++++++++++++++++ > > > 2 files changed, 160 insertions(+), 1 deletion(-) > > > > Happy to see I'm not the only one that observed this. I wonder if you > > saw also my previous stab at this: > > > > https://lore.kernel.org/linux-usb/20220301132010.115258-1-alvin@xxxxxxx/ > > I have not. > > > I had some issues with the dt-bindings which I could not reconcile, but > > the basic problem was how to describe a typec accessory mode mux > > connected to the TUSB320. Perhaps you have a better intuition for how > > this should look? > > > > One thing that is missing from your implementation that we are using on > > our end is the USB role switch. I set this from the typec driver via > > usb_role_switch_set_role(). > > I only use this chip to detect charger type (and cable polarity), the device > where this is integrated is always peripheral and cannot charge other > devices or become host. > > But I think those aforementioned requirements could be extended on top of > this patch, can they not ? I recall I looked at least at the direction > detection and that could be added easily. I have no way of testing any of > that functionality, so I didn't add them as part of the patch. Sure - if your patch gets merged then I'll just extend it. Fair enough that you cannot test on your board. To that end, you can add: Reviewed-by: Alvin Šipraga <alsi@xxxxxxxxxxxxxxx> Thanks! Kind regards, Alvin