drivers/fsi/fsi-master-i2cr.h

Source file repositories/reference/linux-study-clean/drivers/fsi/fsi-master-i2cr.h

File Facts

System
Linux kernel
Corpus path
drivers/fsi/fsi-master-i2cr.h
Extension
.h
Size
824 bytes
Lines
34
Domain
Driver Families
Bucket
drivers/fsi
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 fsi_master_i2cr {
	struct fsi_master master;
	struct mutex lock;	/* protect HW access */
	struct i2c_client *client;
};

#define to_fsi_master_i2cr(m)	container_of(m, struct fsi_master_i2cr, master)

int fsi_master_i2cr_read(struct fsi_master_i2cr *i2cr, u32 addr, u64 *data);
int fsi_master_i2cr_write(struct fsi_master_i2cr *i2cr, u32 addr, u64 data);

static inline bool is_fsi_master_i2cr(struct fsi_master *master)
{
	if (master->dev.parent && master->dev.parent->type == &i2c_client_type)
		return true;

	return false;
}

#endif /* DRIVERS_FSI_MASTER_I2CR_H */

Annotation

Implementation Notes