Added support for O_NONBLOCK in DQBUF ioctl
[microdia.git] / sn9c20x.h
blob7fe3e3577ef2f9c14127ecbe9e5fdab2e474f0d3
1 /**
2 * @file sn9c20x.h
3 * @author Dave Neuer
4 * @date 2008-03-02
5 * @version v0.0.0
7 * @brief Common functions and data for the Sonix SN9C20x webcam bridge chips.
9 * @note Copyright (C) Dave Neuer
11 * @par Licences
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 #ifndef SN9C20X_H
29 #define SN9C20X_H
31 #define SN9C20X_I2C_400KHZ 0x01
32 #define SN9C20X_I2C_READ 0x02
33 #define SN9C20X_I2C_READY 0x04
34 #define SN9C20X_I2C_ERROR 0x08
35 #define SN9C20X_I2C_2WIRE 0x80
37 int sn9c20x_initialize_i2c(struct usb_microdia * dev, __u8 flags, __u8 slave);
39 int sn9c20x_write_i2c_data(struct usb_microdia * dev, __u8 slave, __u8 nbytes,
40 __u8 address, __u8 flags, const __u8 [nbytes]);
42 int sn9c20x_read_i2c_data(struct usb_microdia * dev, __u8 slave, __u8 nbytes, __u8 address,
43 __u8 flags, __u8 * result);
45 #endif