adxl345_core_probe(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 β€” a bool; 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 ✨

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