1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Zoran zr36057/zr36067 PCI controller driver, for the
4 * Pinnacle/Miro DC10/DC10+/DC30/DC30+, Iomega Buz, Linux
5 * Media Labs LML33/LML33R10.
7 * This part handles card-specific data and detection
9 * Copyright (C) 2000 Serguei Miridonov <mirsev@cicese.mx>
12 #ifndef __ZORAN_DEVICE_H__
13 #define __ZORAN_DEVICE_H__
15 /* general purpose I/O */
16 void GPIO(struct zoran *zr, int bit, unsigned int value);
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,
22 int post_office_read(struct zoran *zr, unsigned int guest, unsigned int reg);
24 void jpeg_codec_sleep(struct zoran *zr, int sleep);
25 int jpeg_codec_reset(struct zoran *zr);
27 /* zr360x7 access to raw capture */
28 void zr36057_set_memgrab(struct zoran *zr, int mode);
29 int wait_grab_pending(struct zoran *zr);
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);
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);
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);
46 extern const struct zoran_format zoran_formats[];
48 extern int pass_through;
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)
56 #endif /* __ZORAN_DEVICE_H__ */