adxl345_core_probe(9)
π adxl345_core_probe(9) β like, the Kernel API Manual page, bestie β¨
okay so this is a page from the Kernel API Manual (adxl345_core_probe(9), section 9) and it's literally about probing and setting up an accelerometer. yes, the little chip that knows which way is down. iconic behavior honestly π«Ά
β¨ NAME β¨
adxl345_core_probe β probe and setup for the accelerometer. that's it, that's the whole gig π
π¦ SYNOPSIS π¦
int adxl345_core_probe (struct device *dev , struct regmap *regmap ,
bool fifo_delay_default , int (*setup)(struct device*, struct regmap*)
);
like, look at that signature. four args. she's serving π
πΈ ARGUMENTS πΈ
devβ the driver model representation of the device. the whole vibe of "what device even is this" lives here.regmapβ the regmap instance for the device. your one-way ticket to register town β¨fifo_delay_defaultβ abool; using FIFO with SPI needs a delay, so this tells you if you're on that default-delay situation.setupβ the setup routine that gets executed right before the standard device setup. yes, right before. she goes first, then the standard stuff does its thing. main character energy, honestly π
π§ DESCRIPTION π§
okay so here's the tea, and it's literally about timing β
For SPI operation greater than 1.6 MHz, it is necessary to deassert the CS pin to ensure a total delay of 5 us; otherwise, the delay is not sufficient. no cap, that's the rule. π
The total delay necessary for 5 MHz operation is at most 3.4 us. yes, at most. write it down.
This is not a concern when using I2C mode, because the communication rate is low enough to ensure a sufficient delay between FIFO reads. so if you're on I2C, you can chill π
Ref: "Retrieving Data from FIFO", p. 21 of 36, Data Sheet ADXL345 Rev. G β go read the source, bestie, it's all there π
π RETURN π
0 on success, negative errno on error. that's the whole mood chart: zero is slay, anything negative is a no π
β SEE ALSO β
Kernel file ./drivers/iio/accel/adxl345_core.c β the actual code, go look at her β¨
adxl345_set_measure_en(9)adxl345_set_inact_time(9)adxl345_is_act_inact_ac(9)adxl345_set_act_inact_ac(9)adxl345_get_samples(9)adxl345_fifo_transfer(9)adxl345_fifo_reset(9)adxl345_irq_handler(9)
all the siblings, all in the same friend group π«Ά
and that's the page!! brought to you from ./drivers/iio/accel, dated October 2026, filed under adxl345_core_probe(9). mwah π go probe something, bestie π
π¦ 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