summaryrefslogtreecommitdiff
path: root/include/media/i2c
diff options
context:
space:
mode:
Diffstat (limited to 'include/media/i2c')
-rw-r--r--include/media/i2c/as3645a.h66
-rw-r--r--include/media/i2c/bt819.h4
-rw-r--r--include/media/i2c/ir-kbd-i2c.h6
-rw-r--r--include/media/i2c/m52790.h52
-rw-r--r--include/media/i2c/saa7115.h12
-rw-r--r--include/media/i2c/tvaudio.h17
-rw-r--r--include/media/i2c/upd64031a.h6
7 files changed, 58 insertions, 105 deletions
diff --git a/include/media/i2c/as3645a.h b/include/media/i2c/as3645a.h
deleted file mode 100644
index fffd4b563f5a..000000000000
--- a/include/media/i2c/as3645a.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * include/media/i2c/as3645a.h
- *
- * Copyright (C) 2008-2011 Nokia Corporation
- *
- * Contact: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * version 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- */
-
-#ifndef __AS3645A_H__
-#define __AS3645A_H__
-
-#include <media/v4l2-subdev.h>
-
-#define AS3645A_NAME "as3645a"
-#define AS3645A_I2C_ADDR (0x60 >> 1) /* W:0x60, R:0x61 */
-
-#define AS3645A_FLASH_TIMEOUT_MIN 100000 /* us */
-#define AS3645A_FLASH_TIMEOUT_MAX 850000
-#define AS3645A_FLASH_TIMEOUT_STEP 50000
-
-#define AS3645A_FLASH_INTENSITY_MIN 200 /* mA */
-#define AS3645A_FLASH_INTENSITY_MAX_1LED 500
-#define AS3645A_FLASH_INTENSITY_MAX_2LEDS 400
-#define AS3645A_FLASH_INTENSITY_STEP 20
-
-#define AS3645A_TORCH_INTENSITY_MIN 20 /* mA */
-#define AS3645A_TORCH_INTENSITY_MAX 160
-#define AS3645A_TORCH_INTENSITY_STEP 20
-
-#define AS3645A_INDICATOR_INTENSITY_MIN 0 /* uA */
-#define AS3645A_INDICATOR_INTENSITY_MAX 10000
-#define AS3645A_INDICATOR_INTENSITY_STEP 2500
-
-/*
- * as3645a_platform_data - Flash controller platform data
- * @set_power: Set power callback
- * @vref: VREF offset (0=0V, 1=+0.3V, 2=-0.3V, 3=+0.6V)
- * @peak: Inductor peak current limit (0=1.25A, 1=1.5A, 2=1.75A, 3=2.0A)
- * @ext_strobe: True if external flash strobe can be used
- * @flash_max_current: Max flash current (mA, <= AS3645A_FLASH_INTENSITY_MAX)
- * @torch_max_current: Max torch current (mA, >= AS3645A_TORCH_INTENSITY_MAX)
- * @timeout_max: Max flash timeout (us, <= AS3645A_FLASH_TIMEOUT_MAX)
- */
-struct as3645a_platform_data {
- int (*set_power)(struct v4l2_subdev *subdev, int on);
- unsigned int vref;
- unsigned int peak;
- bool ext_strobe;
-
- /* Flash and torch currents and timeout limits */
- unsigned int flash_max_current;
- unsigned int torch_max_current;
- unsigned int timeout_max;
-};
-
-#endif /* __AS3645A_H__ */
diff --git a/include/media/i2c/bt819.h b/include/media/i2c/bt819.h
index 8025f4bc2bb6..1bcf0dbeb516 100644
--- a/include/media/i2c/bt819.h
+++ b/include/media/i2c/bt819.h
@@ -30,7 +30,7 @@
Note: these ioctls that internal to the kernel and are never called
from userspace. */
-#define BT819_FIFO_RESET_LOW _IO('b', 0)
-#define BT819_FIFO_RESET_HIGH _IO('b', 1)
+#define BT819_FIFO_RESET_LOW _IO('b', 0)
+#define BT819_FIFO_RESET_HIGH _IO('b', 1)
#endif
diff --git a/include/media/i2c/ir-kbd-i2c.h b/include/media/i2c/ir-kbd-i2c.h
index 76491c62c254..9f47d6a48cff 100644
--- a/include/media/i2c/ir-kbd-i2c.h
+++ b/include/media/i2c/ir-kbd-i2c.h
@@ -19,11 +19,15 @@ struct IR_i2c {
u32 polling_interval; /* in ms */
struct delayed_work work;
- char name[32];
char phys[32];
int (*get_key)(struct IR_i2c *ir,
enum rc_proto *protocol,
u32 *scancode, u8 *toggle);
+ /* tx */
+ struct i2c_client *tx_c;
+ struct mutex lock; /* do not poll Rx during Tx */
+ unsigned int carrier;
+ unsigned int duty_cycle;
};
enum ir_kbd_get_key_fn {
diff --git a/include/media/i2c/m52790.h b/include/media/i2c/m52790.h
index 7ddffae31a67..8d9db3cf6fab 100644
--- a/include/media/i2c/m52790.h
+++ b/include/media/i2c/m52790.h
@@ -23,57 +23,57 @@
/* Input routing switch 1 */
-#define M52790_SW1_IN_MASK 0x0003
-#define M52790_SW1_IN_TUNER 0x0000
-#define M52790_SW1_IN_V2 0x0001
-#define M52790_SW1_IN_V3 0x0002
-#define M52790_SW1_IN_V4 0x0003
+#define M52790_SW1_IN_MASK 0x0003
+#define M52790_SW1_IN_TUNER 0x0000
+#define M52790_SW1_IN_V2 0x0001
+#define M52790_SW1_IN_V3 0x0002
+#define M52790_SW1_IN_V4 0x0003
/* Selects component input instead of composite */
-#define M52790_SW1_YCMIX 0x0004
+#define M52790_SW1_YCMIX 0x0004
/* Input routing switch 2 */
-#define M52790_SW2_IN_MASK 0x0300
-#define M52790_SW2_IN_TUNER 0x0000
-#define M52790_SW2_IN_V2 0x0100
-#define M52790_SW2_IN_V3 0x0200
-#define M52790_SW2_IN_V4 0x0300
+#define M52790_SW2_IN_MASK 0x0300
+#define M52790_SW2_IN_TUNER 0x0000
+#define M52790_SW2_IN_V2 0x0100
+#define M52790_SW2_IN_V3 0x0200
+#define M52790_SW2_IN_V4 0x0300
/* Selects component input instead of composite */
-#define M52790_SW2_YCMIX 0x0400
+#define M52790_SW2_YCMIX 0x0400
/* Output routing switch 1 */
/* Enable 6dB amplifier for composite out */
-#define M52790_SW1_V_AMP 0x0008
+#define M52790_SW1_V_AMP 0x0008
/* Enable 6dB amplifier for component out */
-#define M52790_SW1_YC_AMP 0x0010
+#define M52790_SW1_YC_AMP 0x0010
/* Audio output mode */
-#define M52790_SW1_AUDIO_MASK 0x00c0
-#define M52790_SW1_AUDIO_MUTE 0x0000
-#define M52790_SW1_AUDIO_R 0x0040
-#define M52790_SW1_AUDIO_L 0x0080
+#define M52790_SW1_AUDIO_MASK 0x00c0
+#define M52790_SW1_AUDIO_MUTE 0x0000
+#define M52790_SW1_AUDIO_R 0x0040
+#define M52790_SW1_AUDIO_L 0x0080
#define M52790_SW1_AUDIO_STEREO 0x00c0
/* Output routing switch 2 */
/* Enable 6dB amplifier for composite out */
-#define M52790_SW2_V_AMP 0x0800
+#define M52790_SW2_V_AMP 0x0800
/* Enable 6dB amplifier for component out */
-#define M52790_SW2_YC_AMP 0x1000
+#define M52790_SW2_YC_AMP 0x1000
/* Audio output mode */
-#define M52790_SW2_AUDIO_MASK 0xc000
-#define M52790_SW2_AUDIO_MUTE 0x0000
-#define M52790_SW2_AUDIO_R 0x4000
-#define M52790_SW2_AUDIO_L 0x8000
+#define M52790_SW2_AUDIO_MASK 0xc000
+#define M52790_SW2_AUDIO_MUTE 0x0000
+#define M52790_SW2_AUDIO_R 0x4000
+#define M52790_SW2_AUDIO_L 0x8000
#define M52790_SW2_AUDIO_STEREO 0xc000
@@ -83,9 +83,9 @@
#define M52790_IN_V3 (M52790_SW1_IN_V3 | M52790_SW2_IN_V3)
#define M52790_IN_V4 (M52790_SW1_IN_V4 | M52790_SW2_IN_V4)
-#define M52790_OUT_STEREO (M52790_SW1_AUDIO_STEREO | \
+#define M52790_OUT_STEREO (M52790_SW1_AUDIO_STEREO | \
M52790_SW2_AUDIO_STEREO)
-#define M52790_OUT_AMP_STEREO (M52790_SW1_AUDIO_STEREO | \
+#define M52790_OUT_AMP_STEREO (M52790_SW1_AUDIO_STEREO | \
M52790_SW1_V_AMP | \
M52790_SW2_AUDIO_STEREO | \
M52790_SW2_V_AMP)
diff --git a/include/media/i2c/saa7115.h b/include/media/i2c/saa7115.h
index 53954c90e7f6..a0cda423509d 100644
--- a/include/media/i2c/saa7115.h
+++ b/include/media/i2c/saa7115.h
@@ -36,15 +36,15 @@
#define SAA7115_SVIDEO3 9
/* outputs */
-#define SAA7115_IPORT_ON 1
-#define SAA7115_IPORT_OFF 0
+#define SAA7115_IPORT_ON 1
+#define SAA7115_IPORT_OFF 0
/* SAA7111 specific outputs. */
-#define SAA7111_VBI_BYPASS 2
+#define SAA7111_VBI_BYPASS 2
#define SAA7111_FMT_YUV422 0x00
-#define SAA7111_FMT_RGB 0x40
-#define SAA7111_FMT_CCIR 0x80
-#define SAA7111_FMT_YUV411 0xc0
+#define SAA7111_FMT_RGB 0x40
+#define SAA7111_FMT_CCIR 0x80
+#define SAA7111_FMT_YUV411 0xc0
/* config flags */
/*
diff --git a/include/media/i2c/tvaudio.h b/include/media/i2c/tvaudio.h
index 1ac8184693f8..f13e1a386364 100644
--- a/include/media/i2c/tvaudio.h
+++ b/include/media/i2c/tvaudio.h
@@ -21,7 +21,22 @@
#ifndef _TVAUDIO_H
#define _TVAUDIO_H
-#include <media/i2c-addr.h>
+/*
+ * i2c bus addresses for the chips supported by tvaudio.c
+ */
+
+#define I2C_ADDR_TDA8425 0x82
+#define I2C_ADDR_TDA9840 0x84
+#define I2C_ADDR_TDA9874 0xb0 /* also used by 9875 */
+#define I2C_ADDR_TDA9875 0xb0
+#define I2C_ADDR_TDA8425 0x82
+#define I2C_ADDR_TDA9840 0x84 /* also used by TA8874Z */
+#define I2C_ADDR_TDA985x_L 0xb4 /* also used by 9873 */
+#define I2C_ADDR_TDA985x_H 0xb6
+#define I2C_ADDR_TDA9874 0xb0 /* also used by 9875 */
+#define I2C_ADDR_TEA6300 0x80 /* also used by 6320 */
+#define I2C_ADDR_TEA6420 0x98
+#define I2C_ADDR_PIC16C54 0x96 /* PV951 */
/* The tvaudio module accepts the following inputs: */
#define TVAUDIO_INPUT_TUNER 0
diff --git a/include/media/i2c/upd64031a.h b/include/media/i2c/upd64031a.h
index 48ec03c4ef23..1eba24dfee48 100644
--- a/include/media/i2c/upd64031a.h
+++ b/include/media/i2c/upd64031a.h
@@ -18,9 +18,9 @@
#define _UPD64031A_H_
/* Ghost reduction modes */
-#define UPD64031A_GR_ON 0
-#define UPD64031A_GR_OFF 1
-#define UPD64031A_GR_THROUGH 3
+#define UPD64031A_GR_ON 0
+#define UPD64031A_GR_OFF 1
+#define UPD64031A_GR_THROUGH 3
/* Direct 3D/YCS Connection */
#define UPD64031A_3DYCS_DISABLE (0 << 2)