Thread (14 messages) 14 messages, 3 authors, 2021-05-31

Re: [PATCH 3/4] usb: typec: add typec orientation switch support via mux controller

From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Date: 2021-05-21 08:37:55
Also in: linux-arm-kernel, linux-usb

Hi,

On Thu, May 20, 2021 at 03:33:36PM +0300, Heikki Krogerus wrote:
Why not just do that inside fwnode_typec_switch_get() and handle the
whole thing in drivers/usb/typec/mux.c (or in its own file if you
prefer)?

You'll just need to register a "wrapper" Type-C switch object for the
OF mux controller, but that should not be a problem. That way you
don't need to export any new functions, touch this file or anything
else.
I wrote a bit of code just to see how that would look. I'm attaching
you the hack I made. I guess something like that would not be too bad.
A wrapper is probable always a bit clumsy, but I'm not sure that in
this case it's a huge problem. Of course if there are any better
ideas, let's here them :-)


thanks,

-- 
heikki

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help