zl3073x_chan_state_set(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… zl3073x_chan_state_set β€” kernel API manual energy ✨

okay so bestie, welcome to the glow-up of zl3073x_chan_state_set(9) from the Kernel API Manual β€” she's a DPLL channel function and she commits πŸ’–


🌸 NAME 🌸

zl3073x_chan_state_set β€” commit DPLL channel state changes to hardware, no cap πŸ‘‘


✨ SYNOPSIS ✨

int zl3073x_chan_state_set (struct zl3073x_dev *zldev , u8 index , const
struct zl3073x_chan *chan );

like, that's the whole signature, character for character, don't @ me 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • zldev β€” pointer to zl3073x_dev structure. it's giving "the device, obviously" πŸ’…
  • index β€” the DPLL channel index you're setting state for. which channel? this one ✨
  • chan β€” the desired channel state. the vibes you want her to have πŸ¦‹

πŸ”₯ DESCRIPTION πŸ”₯

okay so here's the tea β˜• β€” she skips the HW write if the configuration is unchanged, because why waste a hardware write when nothing moved? iconic, honestly. lowkey efficient queen πŸ‘‘

but if stuff did change? then she writes only the changed registers to hardware. not all of them. just the changed ones. minimal effort, maximum slay πŸ’…

and here's the detail you cannot miss (iykyk):

  • the mode_refsel register is written directly ✨
  • the reference priority registers are written via the DPLL mailbox interface πŸ“¬

two different routes, one function. main character energy fr fr 🌈


🌟 RETURN 🌟

  • 0 on success πŸŽ‰
  • <0 on HW error 😭 (and yes, that's literally less than zero, negative numbers mean the hardware said no)

🌼 SEE ALSO 🌼

kernel file ./drivers/dpll/zl3073x/chan.c plus the whole friend group 🫢:


bestie heads up: this whole page is the property of ./drivers/dpll/zl3073x, dated October 2026 β€” mwah, drink water, and go commit those state changes πŸ’–πŸ§šβ€β™€οΈ
πŸ“¦ where this page comes from