drivers/iio/humidity/hts221.h

Source file repositories/reference/linux-study-clean/drivers/iio/humidity/hts221.h

File Facts

System
Linux kernel
Corpus path
drivers/iio/humidity/hts221.h
Extension
.h
Size
1068 bytes
Lines
56
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 hts221_sensor {
	u8 cur_avg_idx;
	int slope, b_gen;
};

struct hts221_hw {
	const char *name;
	struct device *dev;
	struct regmap *regmap;

	struct iio_trigger *trig;
	int irq;

	struct hts221_sensor sensors[HTS221_SENSOR_MAX];

	bool enabled;
	u8 odr;
	/* Ensure natural alignment of timestamp */
	struct {
		__le16 channels[2];
		aligned_s64 ts;
	} scan;
};

extern const struct dev_pm_ops hts221_pm_ops;

int hts221_probe(struct device *dev, int irq, const char *name,
		 struct regmap *regmap);
int hts221_set_enable(struct hts221_hw *hw, bool enable);
int hts221_allocate_buffers(struct iio_dev *iio_dev);
int hts221_allocate_trigger(struct iio_dev *iio_dev);

#endif /* HTS221_H */

Annotation

Implementation Notes