1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 /* 3 * Zoran zr36057/zr36067 PCI controller driver, for the 4 * Pinnacle/Miro DC10/DC10+/DC30/DC30+, Iomega Buz, Linux 5 * Media Labs LML33/LML33R10. 6 * 7 * This part handles card-specific data and detection 8 * 9 * Copyright (C) 2000 Serguei Miridonov <mirsev@cicese.mx> 10 */ 11 12 #ifndef __ZORAN_DEVICE_H__ 13 #define __ZORAN_DEVICE_H__ 14 15 /* general purpose I/O */ 16 void GPIO(struct zoran *zr, int bit, unsigned int value); 17 18 /* codec (or actually: guest bus) access */ 19 int post_office_wait(struct zoran *zr); 20 int post_office_write(struct zoran *zr, unsigned int guest, unsigned int reg, 21 unsigned int value); 22 int post_office_read(struct zoran *zr, unsigned int guest, unsigned int reg); 23 24 void jpeg_codec_sleep(struct zoran *zr, int sleep); 25 int jpeg_codec_reset(struct zoran *zr); 26 27 /* zr360x7 access to raw capture */ 28 void zr36057_set_memgrab(struct zoran *zr, int mode); 29 int wait_grab_pending(struct zoran *zr); 30 31 /* interrupts */ 32 void print_interrupts(struct zoran *zr); 33 void clear_interrupt_counters(struct zoran *zr); 34 irqreturn_t zoran_irq(int irq, void *dev_id); 35 36 /* JPEG codec access */ 37 void jpeg_start(struct zoran *zr); 38 void zr36057_enable_jpg(struct zoran *zr, enum zoran_codec_mode mode); 39 void zoran_feed_stat_com(struct zoran *zr); 40 41 /* general */ 42 void zoran_set_pci_master(struct zoran *zr, int set_master); 43 void zoran_init_hardware(struct zoran *zr); 44 void zr36057_restart(struct zoran *zr); 45 46 extern const struct zoran_format zoran_formats[]; 47 48 extern int pass_through; 49 50 /* i2c */ 51 #define decoder_call(zr, o, f, args...) \ 52 v4l2_subdev_call((zr)->decoder, o, f, ##args) 53 #define encoder_call(zr, o, f, args...) \ 54 v4l2_subdev_call((zr)->encoder, o, f, ##args) 55 56 #endif /* __ZORAN_DEVICE_H__ */ 57