drivers/media/pci/bt8xx/bttv.h

Source file repositories/reference/linux-study-clean/drivers/media/pci/bt8xx/bttv.h

File Facts

System
Linux kernel
Corpus path
drivers/media/pci/bt8xx/bttv.h
Extension
.h
Size
15149 bytes
Lines
380
Domain
Driver Families
Bucket
drivers/media
Inferred role
Driver Families: operation-table or driver-model contract
Status
pattern 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 device_driver   drv;
	char                   wanted[20];
	int                    (*probe)(struct bttv_sub_device *sub);
	void                   (*remove)(struct bttv_sub_device *sub);
};
#define to_bttv_sub_drv(x) container_of_const((x), struct bttv_sub_driver, drv)

int bttv_sub_register(struct bttv_sub_driver *drv, char *wanted);
int bttv_sub_unregister(struct bttv_sub_driver *drv);

/* gpio access functions */
void bttv_gpio_inout(struct bttv_core *core, u32 mask, u32 outbits);
u32 bttv_gpio_read(struct bttv_core *core);
void bttv_gpio_write(struct bttv_core *core, u32 value);
void bttv_gpio_bits(struct bttv_core *core, u32 mask, u32 bits);

#define gpio_inout(mask,bits)  bttv_gpio_inout(&btv->c, mask, bits)
#define gpio_read()            bttv_gpio_read(&btv->c)
#define gpio_write(value)      bttv_gpio_write(&btv->c, value)
#define gpio_bits(mask,bits)   bttv_gpio_bits(&btv->c, mask, bits)


/* ---------------------------------------------------------- */
/* i2c                                                        */

#define bttv_call_all(btv, o, f, args...) \
	v4l2_device_call_all(&btv->c.v4l2_dev, 0, o, f, ##args)

#define bttv_call_all_err(btv, o, f, args...) \
	v4l2_device_call_until_err(&btv->c.v4l2_dev, 0, o, f, ##args)

extern int bttv_I2CRead(struct bttv *btv, unsigned char addr, char *probe_for);
extern int bttv_I2CWrite(struct bttv *btv, unsigned char addr, unsigned char b1,
			 unsigned char b2, int both);
extern void bttv_readee(struct bttv *btv, unsigned char *eedata, int addr);

extern int bttv_input_init(struct bttv *dev);
extern void bttv_input_fini(struct bttv *dev);
extern void bttv_input_irq(struct bttv *dev);

#endif /* _BTTV_H_ */

Annotation

Implementation Notes