STRUCT MPU3050(9)
π struct mpu3050(9) π
okay bestie, welcome to the Kernel API Manual β yes it's a whole manual, and yes this page is about struct mpu3050, which is the instance state container for the device. that's the whole vibe: it's the lil bucket where one MPU-3050 keeps all its state. π«Ά
β¨ NAME β¨
struct mpu3050 β literally just the instance state container for the device. that's it, that's the name, she's a container and she's serving π
πΈ SYNOPSIS πΈ
struct mpu3050 {
struct device *dev;
struct iio_mount_matrix orientation;
struct regmap *map;
struct mutex lock;
int irq;
struct regulator_bulk_data regs[2];
enum mpu3050_fullscale fullscale;
enum mpu3050_lpf lpf;
u8 divisor;
s16 calibration[3];
struct iio_trigger *trig;
bool hw_irq_trigger;
bool irq_actl;
bool irq_latch;
bool irq_opendrain;
bool pending_fifo_footer;
s64 hw_timestamp;
struct i2c_mux_core *i2cmux;
};
look at her. every field accounted for. no notes. π
π Members π
okay so here's the member-by-member breakdown, and ngl it's kinda the main character section of this whole page:
devβ the parent device for this instance. the origin story, if you will.orientationβ the mounting matrix, flipped axis etc. it's giving "your sensor is sideways and we respect that."mapβ the regmap to reach the registers. the lil translator between you and the hardware's inner monologue.lockβ the serialization lock to marshal all requests. one at a time babes, we queue πirqβ the IRQ used for this device.regsβ the regulators to power this device. gotta feed her πfullscaleβ the current fullscale setting for the device.lpfβ the digital low pass filter setting for the device.divisorβ the base frequency divider: it divides 8 or 1 kHz.calibrationβ the three signed 16-bit calibration settings that get written into the offset registers for each axis to compensate for DC offsets. three of them. signed. 16-bit. doing the math so you don't have to β¨trigβ the trigger for the MPU-3050 interrupt, if present. if present β she's optional, she's mysterious.hw_irq_triggerβ hardware interrupt trigger is in use.irq_actlβ interrupt is active low.irq_latchβ latched IRQ, this means that it is a level IRQ. important detail, don't skip it.irq_opendrainβ the interrupt line shall be configured open drain.pending_fifo_footerβ tells us if there is a pending footer in the FIFO that we have to read out first when handling the FIFO. read the footer first, bestie, order matters π«‘hw_timestampβ the latest hardware timestamp from the trigger IRQ, when in use.i2cmuxβ an I2C mux reflecting the fact that this sensor is a hub with a pass-through I2C interface coming out of it: this device needs to be powered up in order to reach devices on the other side of this mux. no power, no pass-through, no devices. periodt. β‘
π¦ SEE ALSO π¦
go read the Kernel file ./drivers/iio/gyro/mpu3050.h, and also enum mpu3050_fullscale(9) and enum mpu3050_lpf(9) β the enum girlies are right there and they're iconic, iykyk π
fr fr that's the whole page. nothing skipped, nothing invented, all facts intact. mwah π
and that's a wrap on this one β brought to you by the source in ./drivers/iio/gyro, dated October 2026, which is honestly so far away and yet here we are πβ¨
π¦ 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