atmel_smc_cs...f_set_timing(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… atmel_smc_cs_conf_set_timing(9) β€” NAME

okay so bestie, welcome to the Kernel API Manual, section 9, and the star of today's episode is atmel_smc_cs_conf_set_timing πŸ’– (she's so iconic the page header literally had to abbreviate her to atmel_smc_cs...f_set_timing(9) β€” the ellipsis is giving main character energy, no cap).

What she does, in one breath: set the SMC CS conf Txx parameter to a specific value. That's it. That's the whole job. And she ate. πŸ”₯


✨ SYNOPSIS ✨

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

literally the whole signature, copy-pasted with love, don't touch a character 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • conf β€” the SMC CS conf descriptor πŸ‘‘ like, the actual struct she's gonna poke at.
  • shift β€” the position of the Txx field inside the TIMINGS register. think of it as "which drawer do I put this in" πŸ—„οΈ
  • ncycles β€” the value you wanna assign to this Txx parameter, expressed in MCK clk cycles ⏱️ (yes, cycles. she counts in clock ticks, she's built different.)

🌸 DESCRIPTION 🌸

so here's the tea β˜• β€” this function takes your ncycles value and encodes it exactly the way the datasheet says to (specifically the section called "SMC Timings Register", go read it, iykyk πŸ“–). then it stores that encoded result in the conf->timings field, right at the shift position. iconic behavior. πŸ¦‹

And because she's a responsible queen, she tells you when things go sideways:

  • returns -EINVAL if shift is invalid πŸ™ˆ (like, that drawer doesn't exist bestie)
  • returns -ERANGE if ncycles doesn't fit in the field 😭 (too big for the box, it happens)
  • returns 0 otherwise πŸ’œ (slay, we love a happy ending)
no cap, those return values are the whole vibe check β€” check them or you'll be debugging at 2am fr fr πŸ’€

⭐ SEE ALSO ⭐

Kernel file ./drivers/mfd/atmel-smc.c β€” the mothership 🏠 and her whole friend group:


and that's the page!! πŸŽ€βœ¨ brought to you by ./drivers/mfd, dated October 2026 β€” mwah, go set some timings, you got this πŸ«ΆπŸ’–πŸŒˆ

πŸ“¦ where this page comes from