This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Support Request for Modifying Linux Kernel USB Gadget Printer Driver to Implement IPP over USB Interface (Kernel 4.1.18, AM335XX target )

Other Parts Discussed in Thread: AM3358

Dear Support Team,

Greetings,
I am writing to request your assistance in modifying the Linux Kernel USB Gadget Printer Driver to implement multiple USB interface descriptors. As a user of your products, I have found that this functionality would greatly enhance my printing experience and provide me with more flexibility in our printing options.


As you may know, the current USB gadget printer driver inside the driver/usb/gadget/function/f_printer.c in the Linux kernel only supports a single USB interface descriptor. This limits the functionality of the printer and prevents it from being used for IPP over USB functionality.


You may aware, to implement IPP over USB required 2 more additional USB Interface descriptors. I believe that modifying the Linux Kernel USB Gadget Printer Driver to implement multiple USB interface would be of great benefit for our printers

.
Therefore, I respectfully request that you consider providing support for modifying the Linux Kernel USB Gadget Printer Driver to implement multiple USB interface descriptors. I am willing to provide any assistance required in the process of modifying the driver to suit my needs.


Thank you for your consideration of this request. If you have any questions or need further information, please do not hesitate to contact me.


Sincerely,
Sahaya P

  • Hello Sahaya,

    Please indicate what processor you are using. 

    Thank you,

    ~Leonard  

  • Hello Leonard.

        Thank you for the response,

    We are using AM3358 processor.

    - Sahaya P

  • Hi Sahaya,

    The kernel USB gadget drivers are purely provided by the open source community and are not irrelevant to TI processors, so TI doesn't provide any USB gadget driver customization support.

    However have you looked into USB gadget configfs? It can help creating USB composite gadget with multiple USB gadget functions/interfaces without modifying kernel USB drivers.

    For details please check the kernel documentation: Documentation/usb/gadget_configfs.rst.

  • Hi Bin Liu,

    Thank you for your response. I am glad to say that I have successfully implemented multiple interfaces using configfs. However, I am writing to seek clarification on creating multiple interfaces with different interface protocol class information. Specifically, I am looking to create one bidirectional printer interface (7-1-2) and two IPP-USB interfaces (7-1-4).

    I have been able to create three interfaces via configfs, but all three are bidirectional. I am unable to locate the interface class, subclass, and protocol attributes under the /sys/kernel/config/usb_gadget/g1/functions/printer.usb0 folder. This folder only contains the pnp_string and q_len attributes.

    I have two questions:

    1. How can I modify the interface protocol information via configfs?
    2. Could you please provide guidance on how to implement three USB gadget interfaces, including one bidirectional and two IPP-USB interfaces?


    Thank you for your assistance.

    - Sahaya P

  • Hi Sahaya,

    Sorry for my late response. But I am unable to provide further support on your queries. I never reviewed the kernel printer gadget driver, and not sure how to configure its interface or modify it to add IPP-USB interfaces. Please ask the kernel community for assistance.