drivers/iio/chemical/scd30.h
Source file repositories/reference/linux-study-clean/drivers/iio/chemical/scd30.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/iio/chemical/scd30.h- Extension
.h- Size
- 1904 bytes
- Lines
- 76
- 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/completion.hlinux/device.hlinux/mutex.hlinux/pm.hlinux/regulator/consumer.hlinux/types.h
Detected Declarations
struct scd30_statestruct scd30_stateenum scd30_cmd
Annotated Snippet
struct scd30_state {
/* serialize access to the device */
struct mutex lock;
struct device *dev;
struct regulator *vdd;
struct completion meas_ready;
/*
* priv pointer is solely for serdev driver private data. We keep it
* here because driver_data inside dev has been already used for iio and
* struct serdev_device doesn't have one.
*/
void *priv;
int irq;
/*
* no way to retrieve current ambient pressure compensation value from
* the sensor so keep one around
*/
u16 pressure_comp;
u16 meas_interval;
int meas[SCD30_MEAS_COUNT];
scd30_command_t command;
};
extern const struct dev_pm_ops scd30_pm_ops;
int scd30_probe(struct device *dev, int irq, const char *name, void *priv, scd30_command_t command);
#endif
Annotation
- Immediate include surface: `linux/completion.h`, `linux/device.h`, `linux/mutex.h`, `linux/pm.h`, `linux/regulator/consumer.h`, `linux/types.h`.
- Detected declarations: `struct scd30_state`, `struct scd30_state`, `enum scd30_cmd`.
- 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.