Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Peter,

On 06/06/2016 03:02 PM, Peter Chen wrote:
>>>> > >> But this code is better co-work with OTG/Dual-role framework, we'd
>>>> > >> better have only interface that the user can know which role for the
>>>> > >> current port.
>>>> > >> OTG/Dual-role framework and portmux framework are not overlapped.
>>>> > >> The sysfs interface shouldn't be overlapped as well. Say, I have a port
>>>> > >> mux device and I have a driver for it. I am able to read the status of my
>>>> > >> port mux device through sysfs. This is not part of OTG/Dual-role as far
>>>> > >> as I can see.
>>>> > >>
>>> > > Then how the user wants to switch the role through the mux driver's
>>> > > sysfs or dual-role switch sysfs?
>>> > >
>> > 
>> > It depends. If you have an OTG/DRD capable controllers, you need to
>> > do this through OTG sysfs; otherwise you only need to switch the port.
>> > 
> The user may not know the detail, they will do role switch according to
> sysfs documentation. Yes, in your role switch case, only port mux is enough,
> but for others, it needs other operations.

So we need to make it clear in Documentation/ABI/testing/sysfs-bus-platform.

>
> I agree with Roger that the dual-role switch part in your code is better
> to use OTG framework to reduce redundancy.

I agree that we should use dual-role framework for role switch. Actually,
my code doesn't do this work. It only adds a generic framework for port
mux device and two mux device drivers used in Intel platform.

Best regards,
Lu Baolu
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux