atmel_smc_cs...f_set_timing(9)
π 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 theTIMINGSregister. 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
-EINVALifshiftis invalid π (like, that drawer doesn't exist bestie) - returns
-ERANGEifncyclesdoesn't fit in the field π (too big for the box, it happens) - returns
0otherwise π (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:
atmel_smc_cs_conf_init(9)atmel_smc_cs_encode_ncycles(9)atmel_smc_cs_conf_set_setup(9)atmel_smc_cs_conf_set_pulse(9)atmel_smc_cs_conf_set_cycle(9)atmel_smc_cs_conf_apply(9)atmel_hsmc_cs_conf_apply(9)atmel_smc_cs_conf_get(9)atmel_hsmc_cs_conf_get(9)atmel_hsmc_get_reg_layout(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms