[PATCH] i2c: Drop i2c_driver.{owner,name}, 5 of 11
[deliverable/linux.git] / drivers / media / video / cx25840 / cx25840.h
CommitLineData
bd985160
HV
1/* cx25840 API header
2 *
3 * Copyright (C) 2003-2004 Chris Kennedy
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19
20#ifndef _CX25840_H_
21#define _CX25840_H_
22
23
24#include <linux/videodev2.h>
25#include <linux/i2c.h>
26
27extern int cx25840_debug;
28
29#define cx25840_dbg(fmt, arg...) do { if (cx25840_debug) \
604f28e2
LR
30 printk(KERN_INFO "%s debug %d-%04x: " fmt, \
31 client->driver->driver.name, \
bd985160
HV
32 i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0)
33
34#define cx25840_err(fmt, arg...) do { \
604f28e2 35 printk(KERN_ERR "%s %d-%04x: " fmt, client->driver->driver.name, \
bd985160
HV
36 i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0)
37
38#define cx25840_info(fmt, arg...) do { \
604f28e2 39 printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->driver.name, \
bd985160
HV
40 i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0)
41
42#define CX25840_CID_CARDTYPE (V4L2_CID_PRIVATE_BASE+0)
43
f95006f8
HV
44/* The CARDTYPE_PVR150_WORKAROUND cardtype activates a workaround for a
45 hardware bug that is present in PVR150 (and possible PVR500) cards that
46 have certain NTSC tuners (tveeprom model numbers 85, 99 and 112). The
47 audio autodetect fails on some channels for these models and the workaround
48 is to select the audio standard explicitly. Many thanks to Hauppauge for
49 providing this information. */
bd985160
HV
50enum cx25840_cardtype {
51 CARDTYPE_PVR150,
f95006f8
HV
52 CARDTYPE_PG600,
53 CARDTYPE_PVR150_WORKAROUND,
bd985160
HV
54};
55
56enum cx25840_input {
57 CX25840_TUNER,
58 CX25840_COMPOSITE0,
59 CX25840_COMPOSITE1,
60 CX25840_SVIDEO0,
61 CX25840_SVIDEO1
62};
63
64struct cx25840_state {
65 enum cx25840_cardtype cardtype;
66 enum cx25840_input input;
67 int audio_input;
68 enum v4l2_audio_clock_freq audclk_freq;
69};
70
71/* ----------------------------------------------------------------------- */
72/* cx25850-core.c */
73int cx25840_write(struct i2c_client *client, u16 addr, u8 value);
74int cx25840_write4(struct i2c_client *client, u16 addr, u32 value);
75u8 cx25840_read(struct i2c_client *client, u16 addr);
76u32 cx25840_read4(struct i2c_client *client, u16 addr);
77int cx25840_and_or(struct i2c_client *client, u16 addr, u8 mask, u8 value);
78v4l2_std_id cx25840_get_v4lstd(struct i2c_client *client);
79
80/* ----------------------------------------------------------------------- */
81/* cx25850-firmware.c */
82int cx25840_loadfw(struct i2c_client *client);
83
84/* ----------------------------------------------------------------------- */
85/* cx25850-audio.c */
86int cx25840_audio(struct i2c_client *client, unsigned int cmd, void *arg);
87
88/* ----------------------------------------------------------------------- */
89/* cx25850-vbi.c */
90void cx25840_vbi_setup(struct i2c_client *client);
91int cx25840_vbi(struct i2c_client *client, unsigned int cmd, void *arg);
92
93#endif
This page took 0.04106 seconds and 5 git commands to generate.