atmel_smc_cs_conf_set_setup(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… atmel_smc_cs_conf_set_setup ✨

okay so this is a page from the Kernel API Manual and honestly? it's a tiny little function with main character energy. it sets one single xx_SETUP parameter on an SMC CS conf to a value you pick. that's it. that's the whole vibe. and it does it correctly, which is the slay part πŸŽ€


✨ NAME ✨

atmel_smc_cs_conf_set_setup β€” set the SMC CS conf xx_SETUP parameter to a specific value πŸ’–

🌸 SYNOPSIS 🌸

int atmel_smc_cs_conf_set_setup (struct atmel_smc_cs_conf *conf ,
unsigned int shift , unsigned int ncycles );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • conf β€” the SMC CS conf descriptor, your lil' struct bestie that holds everything 🫢
  • shift β€” where the xx_SETUP field sits in the SETUP register, like its little assigned seat iykyk
  • ncycles β€” the value you wanna assign to this xx_SETUP parameter, and it's expressed in MCK clk cycles ⭐

πŸ‘‘ DESCRIPTION πŸ‘‘

so what this function actually does: it encodes the ncycles value exactly as described in the datasheet (section "SMC Setup Register" β€” go read it, no cap πŸ“–), and then it stores the result in the conf->setup field at the shift position. iconic behavior tbh.

and the return situation, because we always check the return value bestie:

  • returns -EINVAL if shift is invalid πŸ™ˆ
  • returns -ERANGE if ncycles does not fit in the field πŸ’€
  • returns 0 otherwise βœ…
fr fr, if you're getting -ERANGE your value is literally too big for the field, that's not a vibe check you can pass, go pick a smaller ncycles.

🌈 SEE ALSO 🌈


okay that's the whole page, mwah πŸ’œ this one lives in ./drivers/mfd, and it's dated October 2026 β€” so yeah, future vibes only. go forth and set your SETUP params responsibly bestie, ily, bye πŸ§šβ€β™€οΈβœ¨

πŸ“¦ where this page comes from