aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-10-28 17:14:57 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-28 17:14:57 -0400
commit20731945ae743034353a88c307920d1f16cf8ac8 (patch)
tree132c796fe3a167dece8cec7a40b1d5dd83a68bc8 /include
parent406119f49d4a6cf8b6eee639128e0575a95065e3 (diff)
parenta9d1b24d91f91b77db3da8aeacb414764f789b9c (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6
Diffstat (limited to 'include')
-rw-r--r--include/linux/i2c-algo-bit.h4
-rw-r--r--include/linux/i2c-algo-pca.h2
-rw-r--r--include/linux/i2c-algo-pcf.h4
-rw-r--r--include/linux/i2c-dev.h2
-rw-r--r--include/linux/i2c-id.h3
-rw-r--r--include/linux/i2c.h38
-rw-r--r--include/linux/mod_devicetable.h5
-rw-r--r--include/linux/x1205.h31
-rw-r--r--include/media/ovcamchip.h14
9 files changed, 40 insertions, 63 deletions
diff --git a/include/linux/i2c-algo-bit.h b/include/linux/i2c-algo-bit.h
index 110904481238..c0e7fab28ce3 100644
--- a/include/linux/i2c-algo-bit.h
+++ b/include/linux/i2c-algo-bit.h
@@ -21,8 +21,6 @@
21/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even 21/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even
22 Frodo Looijaard <frodol@dds.nl> */ 22 Frodo Looijaard <frodol@dds.nl> */
23 23
24/* $Id: i2c-algo-bit.h,v 1.10 2003/01/21 08:08:16 kmalkki Exp $ */
25
26#ifndef _LINUX_I2C_ALGO_BIT_H 24#ifndef _LINUX_I2C_ALGO_BIT_H
27#define _LINUX_I2C_ALGO_BIT_H 25#define _LINUX_I2C_ALGO_BIT_H
28 26
@@ -46,8 +44,6 @@ struct i2c_algo_bit_data {
46 int timeout; /* in jiffies */ 44 int timeout; /* in jiffies */
47}; 45};
48 46
49#define I2C_BIT_ADAP_MAX 16
50
51int i2c_bit_add_bus(struct i2c_adapter *); 47int i2c_bit_add_bus(struct i2c_adapter *);
52int i2c_bit_del_bus(struct i2c_adapter *); 48int i2c_bit_del_bus(struct i2c_adapter *);
53 49
diff --git a/include/linux/i2c-algo-pca.h b/include/linux/i2c-algo-pca.h
index 941b786c5732..226693e0d88b 100644
--- a/include/linux/i2c-algo-pca.h
+++ b/include/linux/i2c-algo-pca.h
@@ -9,8 +9,6 @@ struct i2c_algo_pca_data {
9 int (*wait_for_interrupt) (struct i2c_algo_pca_data *adap); 9 int (*wait_for_interrupt) (struct i2c_algo_pca_data *adap);
10}; 10};
11 11
12#define I2C_PCA_ADAP_MAX 16
13
14int i2c_pca_add_bus(struct i2c_adapter *); 12int i2c_pca_add_bus(struct i2c_adapter *);
15int i2c_pca_del_bus(struct i2c_adapter *); 13int i2c_pca_del_bus(struct i2c_adapter *);
16 14
diff --git a/include/linux/i2c-algo-pcf.h b/include/linux/i2c-algo-pcf.h
index 2a508562255f..18b0adf57a3d 100644
--- a/include/linux/i2c-algo-pcf.h
+++ b/include/linux/i2c-algo-pcf.h
@@ -22,8 +22,6 @@
22/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even 22/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even
23 Frodo Looijaard <frodol@dds.nl> */ 23 Frodo Looijaard <frodol@dds.nl> */
24 24
25/* $Id: i2c-algo-pcf.h,v 1.8 2003/01/21 08:08:16 kmalkki Exp $ */
26
27#ifndef _LINUX_I2C_ALGO_PCF_H 25#ifndef _LINUX_I2C_ALGO_PCF_H
28#define _LINUX_I2C_ALGO_PCF_H 26#define _LINUX_I2C_ALGO_PCF_H
29 27
@@ -41,8 +39,6 @@ struct i2c_algo_pcf_data {
41 int timeout; 39 int timeout;
42}; 40};
43 41
44#define I2C_PCF_ADAP_MAX 16
45
46int i2c_pcf_add_bus(struct i2c_adapter *); 42int i2c_pcf_add_bus(struct i2c_adapter *);
47int i2c_pcf_del_bus(struct i2c_adapter *); 43int i2c_pcf_del_bus(struct i2c_adapter *);
48 44
diff --git a/include/linux/i2c-dev.h b/include/linux/i2c-dev.h
index 541695679762..81c229a0fbca 100644
--- a/include/linux/i2c-dev.h
+++ b/include/linux/i2c-dev.h
@@ -19,8 +19,6 @@
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20*/ 20*/
21 21
22/* $Id: i2c-dev.h,v 1.13 2003/01/21 08:08:16 kmalkki Exp $ */
23
24#ifndef _LINUX_I2C_DEV_H 22#ifndef _LINUX_I2C_DEV_H
25#define _LINUX_I2C_DEV_H 23#define _LINUX_I2C_DEV_H
26 24
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h
index 44f30876a1c9..1ce4b54caa21 100644
--- a/include/linux/i2c-id.h
+++ b/include/linux/i2c-id.h
@@ -164,10 +164,7 @@
164 164
165/* --- Bit algorithm adapters */ 165/* --- Bit algorithm adapters */
166#define I2C_HW_B_LP 0x010000 /* Parallel port Philips style */ 166#define I2C_HW_B_LP 0x010000 /* Parallel port Philips style */
167#define I2C_HW_B_LPC 0x010001 /* Parallel port control reg. */
168#define I2C_HW_B_SER 0x010002 /* Serial line interface */ 167#define I2C_HW_B_SER 0x010002 /* Serial line interface */
169#define I2C_HW_B_ELV 0x010003 /* ELV Card */
170#define I2C_HW_B_VELLE 0x010004 /* Vellemann K8000 */
171#define I2C_HW_B_BT848 0x010005 /* BT848 video boards */ 168#define I2C_HW_B_BT848 0x010005 /* BT848 video boards */
172#define I2C_HW_B_WNV 0x010006 /* Winnov Videums */ 169#define I2C_HW_B_WNV 0x010006 /* Winnov Videums */
173#define I2C_HW_B_VIA 0x010007 /* Via vt82c586b */ 170#define I2C_HW_B_VIA 0x010007 /* Via vt82c586b */
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 3d49a305bf88..f88577ca3b3a 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -23,14 +23,13 @@
23/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and 23/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and
24 Frodo Looijaard <frodol@dds.nl> */ 24 Frodo Looijaard <frodol@dds.nl> */
25 25
26/* $Id: i2c.h,v 1.68 2003/01/21 08:08:16 kmalkki Exp $ */
27
28#ifndef _LINUX_I2C_H 26#ifndef _LINUX_I2C_H
29#define _LINUX_I2C_H 27#define _LINUX_I2C_H
30 28
31#include <linux/module.h> 29#include <linux/module.h>
32#include <linux/types.h> 30#include <linux/types.h>
33#include <linux/i2c-id.h> 31#include <linux/i2c-id.h>
32#include <linux/mod_devicetable.h>
34#include <linux/device.h> /* for struct device */ 33#include <linux/device.h> /* for struct device */
35#include <asm/semaphore.h> 34#include <asm/semaphore.h>
36 35
@@ -94,10 +93,10 @@ extern s32 i2c_smbus_write_byte_data(struct i2c_client * client,
94extern s32 i2c_smbus_read_word_data(struct i2c_client * client, u8 command); 93extern s32 i2c_smbus_read_word_data(struct i2c_client * client, u8 command);
95extern s32 i2c_smbus_write_word_data(struct i2c_client * client, 94extern s32 i2c_smbus_write_word_data(struct i2c_client * client,
96 u8 command, u16 value); 95 u8 command, u16 value);
97/* Returns the number of bytes transferred */
98extern s32 i2c_smbus_write_block_data(struct i2c_client * client, 96extern s32 i2c_smbus_write_block_data(struct i2c_client * client,
99 u8 command, u8 length, 97 u8 command, u8 length,
100 u8 *values); 98 u8 *values);
99/* Returns the number of read bytes */
101extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client, 100extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client,
102 u8 command, u8 *values); 101 u8 command, u8 *values);
103 102
@@ -391,10 +390,6 @@ struct i2c_msg {
391#define I2C_FUNC_10BIT_ADDR 0x00000002 390#define I2C_FUNC_10BIT_ADDR 0x00000002
392#define I2C_FUNC_PROTOCOL_MANGLING 0x00000004 /* I2C_M_{REV_DIR_ADDR,NOSTART,..} */ 391#define I2C_FUNC_PROTOCOL_MANGLING 0x00000004 /* I2C_M_{REV_DIR_ADDR,NOSTART,..} */
393#define I2C_FUNC_SMBUS_HWPEC_CALC 0x00000008 /* SMBus 2.0 */ 392#define I2C_FUNC_SMBUS_HWPEC_CALC 0x00000008 /* SMBus 2.0 */
394#define I2C_FUNC_SMBUS_READ_WORD_DATA_PEC 0x00000800 /* SMBus 2.0 */
395#define I2C_FUNC_SMBUS_WRITE_WORD_DATA_PEC 0x00001000 /* SMBus 2.0 */
396#define I2C_FUNC_SMBUS_PROC_CALL_PEC 0x00002000 /* SMBus 2.0 */
397#define I2C_FUNC_SMBUS_BLOCK_PROC_CALL_PEC 0x00004000 /* SMBus 2.0 */
398#define I2C_FUNC_SMBUS_BLOCK_PROC_CALL 0x00008000 /* SMBus 2.0 */ 393#define I2C_FUNC_SMBUS_BLOCK_PROC_CALL 0x00008000 /* SMBus 2.0 */
399#define I2C_FUNC_SMBUS_QUICK 0x00010000 394#define I2C_FUNC_SMBUS_QUICK 0x00010000
400#define I2C_FUNC_SMBUS_READ_BYTE 0x00020000 395#define I2C_FUNC_SMBUS_READ_BYTE 0x00020000
@@ -410,8 +405,6 @@ struct i2c_msg {
410#define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK 0x08000000 /* w/ 1-byte reg. addr. */ 405#define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK 0x08000000 /* w/ 1-byte reg. addr. */
411#define I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 0x10000000 /* I2C-like block xfer */ 406#define I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 0x10000000 /* I2C-like block xfer */
412#define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK_2 0x20000000 /* w/ 2-byte reg. addr. */ 407#define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK_2 0x20000000 /* w/ 2-byte reg. addr. */
413#define I2C_FUNC_SMBUS_READ_BLOCK_DATA_PEC 0x40000000 /* SMBus 2.0 */
414#define I2C_FUNC_SMBUS_WRITE_BLOCK_DATA_PEC 0x80000000 /* SMBus 2.0 */
415 408
416#define I2C_FUNC_SMBUS_BYTE (I2C_FUNC_SMBUS_READ_BYTE | \ 409#define I2C_FUNC_SMBUS_BYTE (I2C_FUNC_SMBUS_READ_BYTE | \
417 I2C_FUNC_SMBUS_WRITE_BYTE) 410 I2C_FUNC_SMBUS_WRITE_BYTE)
@@ -425,17 +418,6 @@ struct i2c_msg {
425 I2C_FUNC_SMBUS_WRITE_I2C_BLOCK) 418 I2C_FUNC_SMBUS_WRITE_I2C_BLOCK)
426#define I2C_FUNC_SMBUS_I2C_BLOCK_2 (I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 | \ 419#define I2C_FUNC_SMBUS_I2C_BLOCK_2 (I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 | \
427 I2C_FUNC_SMBUS_WRITE_I2C_BLOCK_2) 420 I2C_FUNC_SMBUS_WRITE_I2C_BLOCK_2)
428#define I2C_FUNC_SMBUS_BLOCK_DATA_PEC (I2C_FUNC_SMBUS_READ_BLOCK_DATA_PEC | \
429 I2C_FUNC_SMBUS_WRITE_BLOCK_DATA_PEC)
430#define I2C_FUNC_SMBUS_WORD_DATA_PEC (I2C_FUNC_SMBUS_READ_WORD_DATA_PEC | \
431 I2C_FUNC_SMBUS_WRITE_WORD_DATA_PEC)
432
433#define I2C_FUNC_SMBUS_READ_BYTE_PEC I2C_FUNC_SMBUS_READ_BYTE_DATA
434#define I2C_FUNC_SMBUS_WRITE_BYTE_PEC I2C_FUNC_SMBUS_WRITE_BYTE_DATA
435#define I2C_FUNC_SMBUS_READ_BYTE_DATA_PEC I2C_FUNC_SMBUS_READ_WORD_DATA
436#define I2C_FUNC_SMBUS_WRITE_BYTE_DATA_PEC I2C_FUNC_SMBUS_WRITE_WORD_DATA
437#define I2C_FUNC_SMBUS_BYTE_PEC I2C_FUNC_SMBUS_BYTE_DATA
438#define I2C_FUNC_SMBUS_BYTE_DATA_PEC I2C_FUNC_SMBUS_WORD_DATA
439 421
440#define I2C_FUNC_SMBUS_EMUL (I2C_FUNC_SMBUS_QUICK | \ 422#define I2C_FUNC_SMBUS_EMUL (I2C_FUNC_SMBUS_QUICK | \
441 I2C_FUNC_SMBUS_BYTE | \ 423 I2C_FUNC_SMBUS_BYTE | \
@@ -443,20 +425,17 @@ struct i2c_msg {
443 I2C_FUNC_SMBUS_WORD_DATA | \ 425 I2C_FUNC_SMBUS_WORD_DATA | \
444 I2C_FUNC_SMBUS_PROC_CALL | \ 426 I2C_FUNC_SMBUS_PROC_CALL | \
445 I2C_FUNC_SMBUS_WRITE_BLOCK_DATA | \ 427 I2C_FUNC_SMBUS_WRITE_BLOCK_DATA | \
446 I2C_FUNC_SMBUS_WRITE_BLOCK_DATA_PEC | \
447 I2C_FUNC_SMBUS_I2C_BLOCK) 428 I2C_FUNC_SMBUS_I2C_BLOCK)
448 429
449/* 430/*
450 * Data for SMBus Messages 431 * Data for SMBus Messages
451 */ 432 */
452#define I2C_SMBUS_BLOCK_MAX 32 /* As specified in SMBus standard */ 433#define I2C_SMBUS_BLOCK_MAX 32 /* As specified in SMBus standard */
453#define I2C_SMBUS_I2C_BLOCK_MAX 32 /* Not specified but we use same structure */
454union i2c_smbus_data { 434union i2c_smbus_data {
455 __u8 byte; 435 __u8 byte;
456 __u16 word; 436 __u16 word;
457 __u8 block[I2C_SMBUS_BLOCK_MAX + 3]; /* block[0] is used for length */ 437 __u8 block[I2C_SMBUS_BLOCK_MAX + 2]; /* block[0] is used for length */
458 /* one more for read length in block process call */ 438 /* and one more for user-space compatibility */
459 /* and one more for PEC */
460}; 439};
461 440
462/* smbus_access read or write markers */ 441/* smbus_access read or write markers */
@@ -473,10 +452,6 @@ union i2c_smbus_data {
473#define I2C_SMBUS_BLOCK_DATA 5 452#define I2C_SMBUS_BLOCK_DATA 5
474#define I2C_SMBUS_I2C_BLOCK_DATA 6 453#define I2C_SMBUS_I2C_BLOCK_DATA 6
475#define I2C_SMBUS_BLOCK_PROC_CALL 7 /* SMBus 2.0 */ 454#define I2C_SMBUS_BLOCK_PROC_CALL 7 /* SMBus 2.0 */
476#define I2C_SMBUS_BLOCK_DATA_PEC 8 /* SMBus 2.0 */
477#define I2C_SMBUS_PROC_CALL_PEC 9 /* SMBus 2.0 */
478#define I2C_SMBUS_BLOCK_PROC_CALL_PEC 10 /* SMBus 2.0 */
479#define I2C_SMBUS_WORD_DATA_PEC 11 /* SMBus 2.0 */
480 455
481 456
482/* ----- commands for the ioctl like i2c_command call: 457/* ----- commands for the ioctl like i2c_command call:
@@ -506,11 +481,6 @@ union i2c_smbus_data {
506 481
507#define I2C_SMBUS 0x0720 /* SMBus-level access */ 482#define I2C_SMBUS 0x0720 /* SMBus-level access */
508 483
509/* ... algo-bit.c recognizes */
510#define I2C_UDELAY 0x0705 /* set delay in microsecs between each */
511 /* written byte (except address) */
512#define I2C_MDELAY 0x0706 /* millisec delay between written bytes */
513
514/* ----- I2C-DEV: char device interface stuff ------------------------- */ 484/* ----- I2C-DEV: char device interface stuff ------------------------- */
515 485
516#define I2C_MAJOR 89 /* Device major number */ 486#define I2C_MAJOR 89 /* Device major number */
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index 2f0299a448f6..7b08c11ec4cc 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -244,4 +244,9 @@ struct pcmcia_device_id {
244#define PCMCIA_DEV_ID_MATCH_FAKE_CIS 0x0200 244#define PCMCIA_DEV_ID_MATCH_FAKE_CIS 0x0200
245#define PCMCIA_DEV_ID_MATCH_ANONYMOUS 0x0400 245#define PCMCIA_DEV_ID_MATCH_ANONYMOUS 0x0400
246 246
247/* I2C */
248struct i2c_device_id {
249 __u16 id;
250};
251
247#endif /* LINUX_MOD_DEVICETABLE_H */ 252#endif /* LINUX_MOD_DEVICETABLE_H */
diff --git a/include/linux/x1205.h b/include/linux/x1205.h
new file mode 100644
index 000000000000..64fd3af894a5
--- /dev/null
+++ b/include/linux/x1205.h
@@ -0,0 +1,31 @@
1/*
2 * x1205.h - defines for drivers/i2c/chips/x1205.c
3 * Copyright 2004 Karen Spearel
4 * Copyright 2005 Alessandro Zummo
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 */
11
12#ifndef __LINUX_X1205_H__
13#define __LINUX_X1205_H__
14
15/* commands */
16
17#define X1205_CMD_GETDATETIME 0
18#define X1205_CMD_SETTIME 1
19#define X1205_CMD_SETDATETIME 2
20#define X1205_CMD_GETALARM 3
21#define X1205_CMD_SETALARM 4
22#define X1205_CMD_GETDTRIM 5
23#define X1205_CMD_SETDTRIM 6
24#define X1205_CMD_GETATRIM 7
25#define X1205_CMD_SETATRIM 8
26
27extern int x1205_do_command(unsigned int cmd, void *arg);
28extern int x1205_direct_attach(int adapter_id,
29 struct i2c_client_address_data *address_data);
30
31#endif /* __LINUX_X1205_H__ */
diff --git a/include/media/ovcamchip.h b/include/media/ovcamchip.h
index cb7c0aa96f22..8138983adced 100644
--- a/include/media/ovcamchip.h
+++ b/include/media/ovcamchip.h
@@ -17,20 +17,6 @@
17#include <linux/videodev.h> 17#include <linux/videodev.h>
18#include <linux/i2c.h> 18#include <linux/i2c.h>
19 19
20/* Remove these once they are officially defined */
21#ifndef I2C_DRIVERID_OVCAMCHIP
22 #define I2C_DRIVERID_OVCAMCHIP 0xf00f
23#endif
24#ifndef I2C_HW_SMBUS_OV511
25 #define I2C_HW_SMBUS_OV511 0xfe
26#endif
27#ifndef I2C_HW_SMBUS_OV518
28 #define I2C_HW_SMBUS_OV518 0xff
29#endif
30#ifndef I2C_HW_SMBUS_OVFX2
31 #define I2C_HW_SMBUS_OVFX2 0xfd
32#endif
33
34/* --------------------------------- */ 20/* --------------------------------- */
35/* ENUMERATIONS */ 21/* ENUMERATIONS */
36/* --------------------------------- */ 22/* --------------------------------- */