include/linux/tifm.h

Source file repositories/reference/linux-study-clean/include/linux/tifm.h

File Facts

System
Linux kernel
Corpus path
include/linux/tifm.h
Extension
.h
Size
4776 bytes
Lines
161
Domain
Core OS
Bucket
Core Kernel Interface
Inferred role
Core OS: operation-table or driver-model contract
Status
pattern implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

struct device_driver  driver;
};

struct tifm_adapter {
	char __iomem        *addr;
	spinlock_t          lock;
	unsigned int        irq_status;
	unsigned int        socket_change_set;
	unsigned int        id;
	unsigned int        num_sockets;
	struct completion   *finish_me;

	struct work_struct  media_switcher;
	struct device	    dev;

	void                (*eject)(struct tifm_adapter *fm,
				     struct tifm_dev *sock);
	int                 (*has_ms_pif)(struct tifm_adapter *fm,
					  struct tifm_dev *sock);

	struct tifm_dev     *sockets[];
};

struct tifm_adapter *tifm_alloc_adapter(unsigned int num_sockets,
					struct device *dev);
int tifm_add_adapter(struct tifm_adapter *fm);
void tifm_remove_adapter(struct tifm_adapter *fm);
void tifm_free_adapter(struct tifm_adapter *fm);

void tifm_free_device(struct device *dev);
struct tifm_dev *tifm_alloc_device(struct tifm_adapter *fm, unsigned int id,
				   unsigned char type);

int tifm_register_driver(struct tifm_driver *drv);
void tifm_unregister_driver(struct tifm_driver *drv);
void tifm_eject(struct tifm_dev *sock);
int tifm_has_ms_pif(struct tifm_dev *sock);
int tifm_map_sg(struct tifm_dev *sock, struct scatterlist *sg, int nents,
		int direction);
void tifm_unmap_sg(struct tifm_dev *sock, struct scatterlist *sg, int nents,
		   int direction);
void tifm_queue_work(struct work_struct *work);

static inline void *tifm_get_drvdata(struct tifm_dev *dev)
{
	return dev_get_drvdata(&dev->dev);
}

static inline void tifm_set_drvdata(struct tifm_dev *dev, void *data)
{
	dev_set_drvdata(&dev->dev, data);
}

#endif

Annotation

Implementation Notes