simplecmd_store(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

simplecmd_store β€” bestie, this is the one that sends a simple IPC command πŸ’…

So like, this page? It's from the Kernel API Manual, and it's all about yeeting a lil' command off to the PMC. iykyk ✨


✨ SYNOPSIS ✨

ssize_t simplecmd_store (struct device *dev , struct device_attribute
*attr , const char *buf , size_t count );

That's the whole vibe check right there 🫢


🌸 ARGUMENTS 🌸

  • dev β€” the device that the attribute is chillin' under 🏠
  • attr β€” the attribute in question, aka the one being talked about πŸ‘€
  • buf β€” the buffer holding the data that's getting stored to the attribute πŸ“¦
  • count β€” how many bytes are in buf (the length, the size, the whole deal) πŸ”’

πŸ’– DESCRIPTION πŸ’–

Okay so lowkey here's the tea: this function expects a string with two integers separated with space πŸ“

Those two values? They hold the command and the subcommand that gets sent to the PMC. That's it, that's the whole job, and honestly? Iconic. πŸ‘‘


πŸ”₯ RETURN πŸ”₯

On success it returns the number of bytes written β€” which is count, no cap β€” or a negative errno if something went wrong 😭


πŸ¦‹ SEE ALSO πŸ¦‹

The kernel file ./drivers/mfd/intel_pmc_bxt.c is the main character here, and you gotta go look at intel_pmc_gcr_read64(9), intel_pmc_gcr_update(9), intel_pmc_s0ix_counter_read(9), and northpeak_store(9) too ✨


ngl bestie, send a real command with real subcommand integers or the negative errno will absolutely humble you πŸ’€

And that's the page!! πŸ§šβ€β™€οΈ Straight from ./drivers/mfd, dated October 2026, slaying in the Kernel API Manual the entire time. Periodt. πŸ’œπŸŒˆβ­

πŸ“¦ where this page comes from