include/linux/iio/common/st_sensors.h
Source file repositories/reference/linux-study-clean/include/linux/iio/common/st_sensors.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/iio/common/st_sensors.h- Extension
.h- Size
- 9672 bytes
- Lines
- 339
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- 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/i2c.hlinux/spi/spi.hlinux/irqreturn.hlinux/iio/iio.hlinux/iio/trigger.hlinux/bitops.hlinux/regulator/consumer.hlinux/regmap.hlinux/platform_data/st_sensors_pdata.h
Detected Declarations
struct st_sensor_odr_avlstruct st_sensor_odrstruct st_sensor_powerstruct st_sensor_axisstruct st_sensor_fullscale_avlstruct st_sensor_fullscalestruct st_sensor_simstruct st_sensor_bdustruct st_sensor_dasstruct st_sensor_int_drdystruct st_sensor_data_ready_irqstruct st_sensor_settingsstruct st_sensor_datafunction st_sensors_allocate_trigger
Annotated Snippet
struct st_sensor_odr_avl {
unsigned int hz;
u8 value;
};
struct st_sensor_odr {
u8 addr;
u8 mask;
struct st_sensor_odr_avl odr_avl[ST_SENSORS_ODR_LIST_MAX];
};
struct st_sensor_power {
u8 addr;
u8 mask;
u8 value_off;
u8 value_on;
};
struct st_sensor_axis {
u8 addr;
u8 mask;
};
struct st_sensor_fullscale_avl {
unsigned int num;
u8 value;
unsigned int gain;
unsigned int gain2;
};
struct st_sensor_fullscale {
u8 addr;
u8 mask;
struct st_sensor_fullscale_avl fs_avl[ST_SENSORS_FULLSCALE_AVL_MAX];
};
struct st_sensor_sim {
u8 addr;
u8 value;
};
/**
* struct st_sensor_bdu - ST sensor device block data update
* @addr: address of the register.
* @mask: mask to write the block data update flag.
*/
struct st_sensor_bdu {
u8 addr;
u8 mask;
};
/**
* struct st_sensor_das - ST sensor device data alignment selection
* @addr: address of the register.
* @mask: mask to write the das flag for left alignment.
*/
struct st_sensor_das {
u8 addr;
u8 mask;
};
/**
* struct st_sensor_int_drdy - ST sensor device drdy line parameters
* @addr: address of INT drdy register.
* @mask: mask to enable drdy line.
* @addr_od: address to enable/disable Open Drain on the INT line.
* @mask_od: mask to enable/disable Open Drain on the INT line.
*/
struct st_sensor_int_drdy {
u8 addr;
u8 mask;
u8 addr_od;
u8 mask_od;
};
/**
* struct st_sensor_data_ready_irq - ST sensor device data-ready interrupt
* @int1: data-ready configuration register for INT1 pin.
* @int2: data-ready configuration register for INT2 pin.
* @addr_ihl: address to enable/disable active low on the INT lines.
* @mask_ihl: mask to enable/disable active low on the INT lines.
* @stat_drdy: status register of DRDY (data ready) interrupt.
* @ig1: represents the Interrupt Generator 1 of sensors.
* @en_addr: address of the enable ig1 register.
* @en_mask: mask to write the on/off value for enable.
*/
struct st_sensor_data_ready_irq {
struct st_sensor_int_drdy int1;
struct st_sensor_int_drdy int2;
u8 addr_ihl;
Annotation
- Immediate include surface: `linux/i2c.h`, `linux/spi/spi.h`, `linux/irqreturn.h`, `linux/iio/iio.h`, `linux/iio/trigger.h`, `linux/bitops.h`, `linux/regulator/consumer.h`, `linux/regmap.h`.
- Detected declarations: `struct st_sensor_odr_avl`, `struct st_sensor_odr`, `struct st_sensor_power`, `struct st_sensor_axis`, `struct st_sensor_fullscale_avl`, `struct st_sensor_fullscale`, `struct st_sensor_sim`, `struct st_sensor_bdu`, `struct st_sensor_das`, `struct st_sensor_int_drdy`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.