drivers/iio/imu/inv_mpu6050/inv_mpu_magn.h
Source file repositories/reference/linux-study-clean/drivers/iio/imu/inv_mpu6050/inv_mpu_magn.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/iio/imu/inv_mpu6050/inv_mpu_magn.h- Extension
.h- Size
- 931 bytes
- Lines
- 40
- Domain
- Driver Families
- Bucket
- drivers/iio
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hinv_mpu_iio.h
Detected Declarations
function inv_mpu_magn_get_scale
Annotated Snippet
#ifndef INV_MPU_MAGN_H_
#define INV_MPU_MAGN_H_
#include <linux/kernel.h>
#include "inv_mpu_iio.h"
/* Magnetometer maximum frequency */
#define INV_MPU_MAGN_FREQ_HZ_MAX 50
int inv_mpu_magn_probe(struct inv_mpu6050_state *st);
/**
* inv_mpu_magn_get_scale() - get magnetometer scale value
* @st: driver internal state
*
* Returns IIO data format.
*/
static inline int inv_mpu_magn_get_scale(const struct inv_mpu6050_state *st,
const struct iio_chan_spec *chan,
int *val, int *val2)
{
*val = 0;
*val2 = st->magn_raw_to_gauss[chan->address];
return IIO_VAL_INT_PLUS_MICRO;
}
int inv_mpu_magn_set_rate(const struct inv_mpu6050_state *st, int fifo_rate);
int inv_mpu_magn_set_orient(struct inv_mpu6050_state *st);
int inv_mpu_magn_read(struct inv_mpu6050_state *st, int axis, int *val);
#endif /* INV_MPU_MAGN_H_ */
Annotation
- Immediate include surface: `linux/kernel.h`, `inv_mpu_iio.h`.
- Detected declarations: `function inv_mpu_magn_get_scale`.
- Atlas domain: Driver Families / drivers/iio.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.