drivers/iio/pressure/bmp280.h
Source file repositories/reference/linux-study-clean/drivers/iio/pressure/bmp280.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/iio/pressure/bmp280.h- Extension
.h- Size
- 15632 bytes
- Lines
- 552
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bitops.hlinux/device.hlinux/regmap.hlinux/regulator/consumer.hlinux/iio/iio.h
Detected Declarations
struct bmp180_calibstruct bmp280_calibstruct bmp380_calibstruct bmp280_datastruct bmp280_chip_infoenum bmp280_op_mode
Annotated Snippet
struct bmp180_calib {
s16 AC1;
s16 AC2;
s16 AC3;
u16 AC4;
u16 AC5;
u16 AC6;
s16 B1;
s16 B2;
s16 MB;
s16 MC;
s16 MD;
};
/* See datasheet Section 4.2.2. */
struct bmp280_calib {
u16 T1;
s16 T2;
s16 T3;
u16 P1;
s16 P2;
s16 P3;
s16 P4;
s16 P5;
s16 P6;
s16 P7;
s16 P8;
s16 P9;
u8 H1;
s16 H2;
u8 H3;
s16 H4;
s16 H5;
s8 H6;
};
/* See datasheet Section 3.11.1. */
struct bmp380_calib {
u16 T1;
u16 T2;
s8 T3;
s16 P1;
s16 P2;
s8 P3;
s8 P4;
u16 P5;
u16 P6;
s8 P7;
s8 P8;
s16 P9;
s8 P10;
s8 P11;
};
enum bmp280_op_mode {
BMP280_SLEEP,
BMP280_FORCED,
BMP280_NORMAL,
};
struct bmp280_data {
struct device *dev;
struct mutex lock;
struct regmap *regmap;
struct completion done;
bool use_eoc;
bool trig_open_drain;
bool trig_active_high;
struct iio_trigger *trig;
const struct bmp280_chip_info *chip_info;
union {
struct bmp180_calib bmp180;
struct bmp280_calib bmp280;
struct bmp380_calib bmp380;
} calib;
struct regulator_bulk_data supplies[BMP280_NUM_SUPPLIES];
unsigned int start_up_time_us;
/* log of base 2 of oversampling rate */
u8 oversampling_press;
u8 oversampling_temp;
u8 oversampling_humid;
u8 iir_filter_coeff;
/*
* BMP380 devices introduce sampling frequency configuration. See
* datasheet sections 3.3.3. and 4.3.19 for more details.
*
* BMx280 devices allowed indirect configuration of sampling frequency
* changing the t_standby duration between measurements, as detailed on
Annotation
- Immediate include surface: `linux/bitops.h`, `linux/device.h`, `linux/regmap.h`, `linux/regulator/consumer.h`, `linux/iio/iio.h`.
- Detected declarations: `struct bmp180_calib`, `struct bmp280_calib`, `struct bmp380_calib`, `struct bmp280_data`, `struct bmp280_chip_info`, `enum bmp280_op_mode`.
- Atlas domain: Driver Families / drivers/iio.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.