Re: Disconnect interrupt generation for QC targets when role switch is enabled

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

 





On 8/28/2023 10:50 PM, Bjorn Andersson wrote:

I had some idea on how to get the role notification reach qcom glue driver
but wanted your opinion on whether they can be used or not:

1. Register a vendor_hook from glue driver and invoke that during
__dwc3_set_mode.

2. Let the role notification reach dwc3-qcom first and then let qcom driver
invoke role_set of drd. Something similar to what was implemented by Wesley
on [1].

But both the options require dwc3_probe to be done in sync with
of_platform_populate or we need to defer qcom probe if dwc3_probe is
deferred. Since we are leaning towards async probe, not sure if the above
two options would be proper.


...

As mentioned, this need has been identified a few times by now, so
nothing strange in your request/proposal.

But so far no one has come up with a good way to register glue code
callbacks with the core; we can't pass arbitrary data (such as a
function pointer to such callback), and we don't know when the core is
registered, so we can't call a register operation when that happens.

Regards,
Bjorn

[1]: https://patchwork.kernel.org/project/linux-usb/patch/20201009082843.28503-4-wcheng@xxxxxxxxxxxxxx/
[2]: https://patchwork.kernel.org/project/linux-usb/cover/20230325165217.31069-1-manivannan.sadhasivam@xxxxxxxxxx/


Hi Bjorn,

How about we use Component framework to let the glue layer know that the child probe is complete. That way we don't need to defer QCOM probe and in the bind call back coming to master (in this case, the glue layer), we can register the vendor hook or role switch we need and we can pass the role notifications from core to glue as needed.

Regards,
Krishna,



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

  Powered by Linux