atmel_smc_cs_conf_set_setup(9)
π 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 thexx_SETUPfield sits in the SETUP register, like its little assigned seat iykykncyclesβ the value you wanna assign to thisxx_SETUPparameter, 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
-EINVALifshiftis invalid π - returns
-ERANGEifncyclesdoes not fit in the field π - returns
0otherwise β
fr fr, if you're getting-ERANGEyour value is literally too big for the field, that's not a vibe check you can pass, go pick a smallerncycles.
π SEE ALSO π
- Kernel file
./drivers/mfd/atmel-smc.c atmel_smc_cs_conf_init(9)atmel_smc_cs_encode_ncycles(9)atmel_smc_cs_conf_set_timing(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)
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
- 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