HSQ(4)

๐Ÿ“ฆ in nixpkgs unstable

๐Ÿ’– hsq(4) ๐Ÿ’–

okay so this is hsq(4) from the Kernel Interfaces Manual, and bestie, if you've ever wanted to plug four whole serial ports into one slot and have them all just work, this is the page for you. sit down, grab a matcha, we're learning today ๐Ÿตโœจ


๐ŸŒธ NAME ๐ŸŒธ

hsq โ€” the multiplexing serial communications interface, aka the friend group of serial ports where one card brings all four of them to the party ๐ŸŽ€


โœจ SYNOPSIS โœจ

hsq0 at isa? port 0x140 irq 10
com* at hsq?

that's it. that's the whole vibe. two lines and she's configured ๐Ÿ’…


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so the hsq driver is out here providing support for Hostess boards โ€” those are the ones from Comtrol Corporation (https://www.comtrol.com/), iykyk โ€” and any compatible boards that multiplex together up to four EIA RS-232C (CCITT V.28) communications interfaces. four ports, one driver, one moment of pure main character energy. ๐Ÿ”ฅ

each hsq device is the master device for up to four com devices. that's the whole hierarchy, bestie โ€” hsq is the parent, the com devices are her little siblings. ๐Ÿ‘‘

the way you set this up: your kernel configuration specifies those com devices as slave devices of the hsq device, exactly like the SYNOPSIS section shows above. and here's the cute part โ€” the slave ID you give each com device determines which bit in the interrupt multiplexing register gets tested to find interrupts for that device. so the ID isn't just decorative, it's literally doing the work. โœจ

then the port specification for the hsq device gets used to compute:

  • the base addresses for the com subdevices โ€” and those are equal to port + ID * 8
  • the port for the interrupt multiplexing register โ€” and that one is equal to port + 7

math, but make it slay. ๐Ÿงฎ๐Ÿ’…

want even more technical details on how the driver actually does its thing? the big comment at the beginning of the driver's source code has you covered, fr fr. go read it, it's giving lore. ๐Ÿ“–

and for setting up the card's configuration switches? take that info from Comtrol Corporation's web site, because the author wrote and tested the driver only with Hostess-compatible cards. so like, that's the source of truth for switch stuff. ๐Ÿซถ


๐ŸŽ€ FILES ๐ŸŽ€

  • /dev/tty0?
  • /dev/cua0?

your devices, bestie, right where you'd expect them ๐Ÿ’–


๐ŸŒˆ SEE ALSO ๐ŸŒˆ

go read these too, the crossover episode is worth it โญ


๐Ÿ‘‘ HISTORY ๐Ÿ‘‘

the hsq driver was written by Denis A. Doroshenko, based on the ast(4) driver. we love a humble origin story based on another icon's work ๐Ÿซก๐Ÿ’œ


okay that's the whole page, you're officially an hsq expert now, no cap ๐Ÿงšโ€โ™€๏ธโœจ

this little love letter came to you courtesy of Debian, dated January 3, 2018, filed under HSQ(4) โ€” mwah, go forth and multiplex ๐Ÿ’‹๐ŸŒธ
๐Ÿ“ฆ where this page comes from
  • nixpkgs unstable: cvs-export
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms