ucb1x00_io_write(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ucb1x00_io_write β€” kernel API manual, but make it make sense

okay so bestie, we're deep in the kernel API manual today (that's the manual name, no cap) and this little function is genuinely iconic. it's called ucb1x00_io_write and it's about to set or clear some IO outputs for you. periodt. πŸŽ€


✨ NAME ✨

ucb1x00_io_write β€” set or clear IO outputs πŸ’–

like literally, that's the whole vibe. set 'em or clear 'em.


🌸 SYNOPSIS 🌸

void ucb1x00_io_write (struct ucb1x00 *ucb, unsigned int set, unsigned int clear);

look at her. returns nothing (it's void, she's mysterious like that), takes three things, slays. πŸ¦‹


🫢 ARGUMENTS 🫢

  • ucb β€” the struct ucb1x00 * that describes the chip. it's giving main character energy, everything hinges on her.
  • set β€” a bitfield of the IO pins you wanna flip up to logic '1'. ⭐
  • clear β€” a bitfield of the IO pins you wanna drop down to logic '0'. πŸ’€

πŸ”₯ DESCRIPTION πŸ”₯

so what she actually does: she sets the IO output state of whichever IO pins you pointed at. simple, effective, obsessed. ✨

the value is retained if the pins are subsequently configured as inputs β€” so she remembers, she doesn't forget, iykyk. 🧚

now here's the tea: the clear bitfield has priority over the set bitfield. so if a pin appears in both? outputs will be cleared. clear wins. always. not me being dramatic, that's just how she is. πŸ‘‘

⚠️ bestie, you must have called ucb1x00_enable to enable the comms before using this function. no enable, no comms, no write. don't skip it. πŸ™ˆ

also β€” and this is important β€” this function takes a spinlock, which means it disables interrupts. so like, respect her time. 😭


🌈 SEE ALSO 🌈

kernel file ./drivers/mfd/ucb1x00-core.c, plus her whole friend group:


πŸ’œ and that's the whole page, bestie! sourced from ./drivers/mfd, dated October 2026, and stamped with ucb1x00_io_write(9) in the corner like a little bow. go forth and set those pins. πŸ’…πŸŽ€

πŸ“¦ where this page comes from