STRUCT USB_OHCI_PDATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct usb_ohci_pdata β€” the kernel API manual, bestie edition ✨

okay so real talk, this is a page from the Kernel API Manual and it's literally about struct usb_ohci_pdata β€” the platform_data for the generic ohci driver. that's the whole vibe. it's giving "little struct, big responsibilities" πŸŽ€


🌸 NAME 🌸

struct usb_ohci_pdata β€” the platform_data for the generic ohci driver. yes bestie, that's it, that's the job πŸ’…


✨ SYNOPSIS ✨

here's the whole struct, copied exactly, don't @ me:

struct usb_ohci_pdata {
    unsigned big_endian_desc:1;
    unsigned big_endian_mmio:1;
    unsigned no_big_frame_no:1;
    unsigned int    num_ports;
    int (*power_on)(struct platform_device *pdev);
    void (*power_off)(struct platform_device *pdev);
    void (*power_suspend)(struct platform_device *pdev);
 };

like look at those little :1 bitfields, they're so tiny and so important πŸ¦‹


🧚 Members 🧚

okay let's go member by member, no skips, no cap:

  • big_endian_desc β€” BE descriptors. it's big endian, for the descriptors. iconic ✨
  • big_endian_mmio β€” BE registers. big endian again, but this time for the memory-mapped I/O registers 🫢
  • no_big_frame_no β€” no big endian frame_no shift. that's it, that's the whole thing, no shift for you πŸ’€
  • num_ports β€” number of ports. an unsigned int, because ports are many 🌈
  • power_on β€” a function pointer, int (*power_on)(struct platform_device *pdev); β€” takes a struct platform_device *pdev and returns an int πŸ‘‘
  • power_off β€” a function pointer, void (*power_off)(struct platform_device *pdev); β€” takes a struct platform_device *pdev, returns nothing πŸ’œ
  • power_suspend β€” a function pointer, void (*power_suspend)(struct platform_device *pdev); β€” takes a struct platform_device *pdev, returns nothing either 🌸

πŸ’– Description πŸ’–

so what are these, you ask? these are the general configuration options for the OHCI controller. all of them. and here's the tea: every single one of these options is lowkey just activating a workaround β€” more or less β€” for some specific hardware out there in the wild 😭 like every flag is a little "this hardware is quirky so we do this instead" note. it's giving hardware whisperer energy, fr fr.


πŸ”₯ SEE ALSO πŸ”₯

  • the kernel file ./include/linux/usb/ohci_pdriver.h β€” go read it, bestie, iykyk ⭐

and that's the page!! πŸŽ€ this one lives in ./include/linux/usb, it's dated October 2026, and it's part of the Kernel API Manual. mwah, go forth and configure your OHCI controller responsibly πŸ’…πŸ¦‹βœ¨

πŸ“¦ where this page comes from