Can you help elaborate on your comment ? Do you mean that this API
This comment no longer makes sense with your current implementation.
doesn't get speed on all ports, but this has to be called in a loop to
get all the port speeds ? In that sense, I agree, I can change the
comments here.
It does not make sense to keep only half the comment after your update
as it is a suggestion for how one could go about and generalise this for
multiport, which is what you are now doing.
I don't think its much of a difference:But perhaps this should be done using usb_hub_for_each_child() insteadEither ways is fine. We would have qcom->num_ports to determine how many
as that may be more efficient. Then you use this function to read out
the speed for all the ports in go (and store it in the port structures I
mentioned). Please determine which alternative is best.
speeds we can read.
That's not the point. I'm referring to which alternative is less
computationally expensive and allows for a clean implementation.
Please do try to figure it out yourself.
[ I realise that the confusion around hs_phy_irq may be partly to blame
for this but since that one is also a per-port interrupt, that's no
longer an issue. ]
I don't want to add support for this right away [1]. I would like to
keep hs_phy_irq outside the loop for now.
No. Stop trying to take shortcuts. Again, this is upstream, not
Qualcomm's vendor kernel.