mcp_reg_write(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… mcp_reg_write(9) πŸ’…

okay bestie, welcome to the Kernel API Manual β€” genuinely the most iconic corner of the kernel, no cap. today's main character is mcp_reg_write, and yes she's a (9) section girlie, we respect that. πŸŽ€


✨ NAME ✨

mcp_reg_write β€” write a device register. that's it. that's the gig. writing a register. and honestly? she ate. 🫢


✨ SYNOPSIS ✨

void mcp_reg_write (struct mcp *mcp , unsigned int reg , unsigned int val );

like, look at her signature. void return, so she gives nothing back β€” she just does the thing and dips. main character energy fr fr. πŸ’…


✨ ARGUMENTS ✨

  • mcp β€” the MCP interface structure. your whole vibe, your whole context, the structural support system of this operation. πŸ¦‹
  • reg β€” a 4-bit register index. four bits!! tiny!! micro!! she's small but mighty and she knows exactly which register she's pointing at. πŸŽ€
  • val β€” a 16-bit data value. the actual payload, the moment, the reason we're all here. sixteen whole bits of content. ⭐

✨ DESCRIPTION ✨

okay so here's the tea: this function writes a device register. that's the whole plot. you hand her the mcp, you point her at a reg, you give her a val, and she goes and writes it. simple. elegant. slay. ✨

🚨 vibe check warning!! the MCP interface must be enabled to prevent this function from hanging. that's not a suggestion, bestie, that's literally the rule. if you don't enable it first, this call can just... hang. and not the cute "hanging out with friends" kind of hang. the bad kind. 😭

so like, mcp_enable(9) first. then write. in that order. iykyk. πŸ’€


✨ SEE ALSO ✨

  • Kernel file ./drivers/mfd/mcp-core.c β€” the source, the origin story, the birth certificate. go read her if you want the lore. πŸ‘‘
  • mcp_set_telecom_divisor(9) β€” telecom divisor setter, living her best life. 🌈
  • mcp_set_audio_divisor(9) β€” audio divisor setter, also thriving. 🎧
  • mcp_reg_read(9) β€” the sibling!! the reader!! the other half of this duo. 🫷
  • mcp_enable(9) β€” bestie. bestie. run this one before you write. i'm begging. πŸ™ˆ
  • mcp_disable(9) β€” and this one for when you're done and need to close up shop. 🌸

okay that's the whole page, you're an MCP register expert now, genuinely so proud of you πŸ§šπŸ’œ

and for the cute sign-off: this lil doc lives in ./drivers/mfd, and it's dated October 2026 β€” yes, 2026, she's from the future, we don't question it. πŸ“πŸ’–β­

πŸ“¦ where this page comes from