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.

Dependency Surface

Detected Declarations

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

Implementation Notes