atmel_smc_cs_conf_set_cycle(9)
π atmel_smc_cs_conf_set_cycle(9) β a Kernel API Manual moment
okay bestie, welcome to the Kernel API Manual for atmel_smc_cs_conf_set_cycle(9) β no cap, this is the little function that sets one (1) xx_CYCLE parameter inside your SMC CS conf to a specific value. she's small, she's focused, she ate. β¨
π NAME π
atmel_smc_cs_conf_set_cycle β set the SMC CS conf xx_CYCLE parameter to a specific value. that's it, that's the whole assignment, and she did it flawlessly. π
β¨ SYNOPSIS β¨
int atmel_smc_cs_conf_set_cycle (struct atmel_smc_cs_conf *conf ,
unsigned int shift , unsigned int ncycles );
π«Ά ARGUMENTS π«Ά
confβ the SMC CS conf descriptor. your main character struct, the one holding everything. πshiftβ the position of thexx_CYCLEfield in theCYCLEregister. iykyk, it's the offset of where the field lives. π―ncyclesβ the value you're assigning to thisxx_CYCLEparameter, and bestie it's expressed in MCK clk cycles. clock cycles, not vibes. β±οΈ
π¦ DESCRIPTION π¦
so what she does is literal perfection: this function encodes the ncycles value exactly as described in the datasheet (section "SMC Cycle Register" β yes, go read it, it's giving reference material π), and then stores the result in the conf->setup field at shift position. slay. π
the way that return values work here, let's break it down:
- returns
-EINVALifshiftis invalid π - returns
-ERANGEifncyclesdoes not fit in the field π - and
0otherwise π
ngl, that second one matters: if yourncyclesis too chunky for the field, you get-ERANGE, not a silent truncation. respect the boundaries. π
π₯ SEE ALSO π₯
Kernel file ./drivers/mfd/atmel-smc.c plus her whole friend group:
atmel_smc_cs_conf_init(9)atmel_smc_cs_encode_ncycles(9)atmel_smc_cs_conf_set_timing(9)atmel_smc_cs_conf_set_setup(9)atmel_smc_cs_conf_set_pulse(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 whole page, bestie β brought to you by ./drivers/mfd, dated October 2026, starring atmel_smc_cs_conf_set_cycle(9). go set those cycles, periodt. ππ¦π»
π¦ 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