Re: [PATCH V2 0/1] usb: add HCD providers

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

 



Hi,

Rafał Miłecki <zajec5@xxxxxxxxx> writes:
> On 13 July 2016 at 15:20, Felipe Balbi <felipe.balbi@xxxxxxxxxxxxxxx> wrote:
>> Rafał Miłecki <zajec5@xxxxxxxxx> writes:
>>> Hi again,
>>>
>>> This is my second try of getting HCD providers into usb subsystem.
>>>
>>> During discussion of V1 I realized there are about 26 drivers adding a
>>> single HCD and all of them would need to be modified. So instead I
>>> decided to put relevant code in usb_add_hcd. It checks if the HCD we
>>> register is a primary one and if so, it registers a proper provider.
>>>
>>> Please note that of_hcd_xlate_simple was also extended to allow getting
>>> shared HCD (which is used e.g. in case of XHCI).
>>>
>>> So now you can have something like:
>>>
>>> ohci: ohci@21000 {
>>>       #usb-cells = <0>;
>>>       compatible = "generic-ohci";
>>>       reg = <0x00001000 0x1000>;
>>>       interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
>>> };
>>>
>>> ehci: ehci@22000 {
>>>       #usb-cells = <0>;
>>>       compatible = "generic-ehci";
>>>       reg = <0x00002000 0x1000>;
>>>       interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
>>> };
>>>
>>> xhci: xhci@23000 {
>>>       #usb-cells = <1>;
>>>       compatible = "generic-xhci";
>>>       reg = <0x00003000 0x1000>;
>>>       interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
>>> };
>>>
>>> The last (second) patch is not supposed to be applied, it's used only as
>>> a proof and example of how providers can be used.
>>
>> nowhere here (or in previous patch) you clarify why exactly you need
>> this. What is your LED trigger supposed to do? Why can't it handle ports
>> changing number in different boots? Why do we need this at all? Why is
>> your code DT-specific?
>>
>> There are still too many 'unknowns' here.
>
> Are you sure you saw my reply to Peter's question?
> <CACna6rw6QOuY247qvDmO4mKrW3y4yXoeM3qr8SXAwn3CuYAMpw@xxxxxxxxxxxxxx>
> http://www.spinics.net/lists/linux-usb/msg143708.html
> http://marc.info/?l=linux-usb&m=146838735627093&w=2
>
> I think it should answer (some of?) your questions. Can you read it
> and see if it gets a bit clearer?

well, all that says is that you're writing a LED trigger to toggle LED
when a USB device gets added to a specified port. I don't think you need
the actual port number for that. You should have a phandle to the actual
port, whatever its number is, or a phandle to the (root-)Hub and a port
number from that hub.

The problem, really, is that DT descriptor of USB Hosts is very, very
minimal. Perhaps there's something more extensively defined from the
original Open Firmware USB Addendum.

There's also no documentation for your new bindings nor are there any
user demonstrating how DT should be written to use these new bindings.

IMO, if you're describing it in DT and you need a specific port name,
your bindings are wrong.

-- 
balbi

Attachment: signature.asc
Description: PGP signature


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

  Powered by Linux