diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-arm/arch-ixp4xx/platform.h | 11 | ||||
-rw-r--r-- | include/asm-arm/arch-pxa/i2c.h | 6 | ||||
-rw-r--r-- | include/linux/i2c-id.h | 63 | ||||
-rw-r--r-- | include/linux/i2c.h | 126 | ||||
-rw-r--r-- | include/linux/i2c/tps65010.h (renamed from include/asm-arm/arch-omap/tps65010.h) | 8 | ||||
-rw-r--r-- | include/linux/m41t00.h | 50 | ||||
-rw-r--r-- | include/media/v4l2-i2c-drv-legacy.h | 2 |
7 files changed, 67 insertions, 199 deletions
diff --git a/include/asm-arm/arch-ixp4xx/platform.h b/include/asm-arm/arch-ixp4xx/platform.h index 2a44d3d67980..2ce28e3fd325 100644 --- a/include/asm-arm/arch-ixp4xx/platform.h +++ b/include/asm-arm/arch-ixp4xx/platform.h | |||
@@ -76,17 +76,6 @@ extern unsigned long ixp4xx_exp_bus_size; | |||
76 | #define IXP4XX_UART_XTAL 14745600 | 76 | #define IXP4XX_UART_XTAL 14745600 |
77 | 77 | ||
78 | /* | 78 | /* |
79 | * The IXP4xx chips do not have an I2C unit, so GPIO lines are just | ||
80 | * used to | ||
81 | * Used as platform_data to provide GPIO pin information to the ixp42x | ||
82 | * I2C driver. | ||
83 | */ | ||
84 | struct ixp4xx_i2c_pins { | ||
85 | unsigned long sda_pin; | ||
86 | unsigned long scl_pin; | ||
87 | }; | ||
88 | |||
89 | /* | ||
90 | * This structure provide a means for the board setup code | 79 | * This structure provide a means for the board setup code |
91 | * to give information to th pata_ixp4xx driver. It is | 80 | * to give information to th pata_ixp4xx driver. It is |
92 | * passed as platform_data. | 81 | * passed as platform_data. |
diff --git a/include/asm-arm/arch-pxa/i2c.h b/include/asm-arm/arch-pxa/i2c.h index e404b233d8a8..80596b013443 100644 --- a/include/asm-arm/arch-pxa/i2c.h +++ b/include/asm-arm/arch-pxa/i2c.h | |||
@@ -65,7 +65,13 @@ struct i2c_pxa_platform_data { | |||
65 | unsigned int slave_addr; | 65 | unsigned int slave_addr; |
66 | struct i2c_slave_client *slave; | 66 | struct i2c_slave_client *slave; |
67 | unsigned int class; | 67 | unsigned int class; |
68 | int use_pio; | ||
68 | }; | 69 | }; |
69 | 70 | ||
70 | extern void pxa_set_i2c_info(struct i2c_pxa_platform_data *info); | 71 | extern void pxa_set_i2c_info(struct i2c_pxa_platform_data *info); |
72 | |||
73 | #ifdef CONFIG_PXA27x | ||
74 | extern void pxa_set_i2c_power_info(struct i2c_pxa_platform_data *info); | ||
75 | #endif | ||
76 | |||
71 | #endif | 77 | #endif |
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index c7a51a196f51..f922b060158b 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h | |||
@@ -33,23 +33,13 @@ | |||
33 | 33 | ||
34 | #define I2C_DRIVERID_MSP3400 1 | 34 | #define I2C_DRIVERID_MSP3400 1 |
35 | #define I2C_DRIVERID_TUNER 2 | 35 | #define I2C_DRIVERID_TUNER 2 |
36 | #define I2C_DRIVERID_VIDEOTEX 3 /* please rename */ | ||
37 | #define I2C_DRIVERID_TDA8425 4 /* stereo sound processor */ | 36 | #define I2C_DRIVERID_TDA8425 4 /* stereo sound processor */ |
38 | #define I2C_DRIVERID_TEA6420 5 /* audio matrix switch */ | 37 | #define I2C_DRIVERID_TEA6420 5 /* audio matrix switch */ |
39 | #define I2C_DRIVERID_TEA6415C 6 /* video matrix switch */ | 38 | #define I2C_DRIVERID_TEA6415C 6 /* video matrix switch */ |
40 | #define I2C_DRIVERID_TDA9840 7 /* stereo sound processor */ | 39 | #define I2C_DRIVERID_TDA9840 7 /* stereo sound processor */ |
41 | #define I2C_DRIVERID_SAA7111A 8 /* video input processor */ | 40 | #define I2C_DRIVERID_SAA7111A 8 /* video input processor */ |
42 | #define I2C_DRIVERID_SAA5281 9 /* videotext decoder */ | ||
43 | #define I2C_DRIVERID_SAA7112 10 /* video decoder, image scaler */ | ||
44 | #define I2C_DRIVERID_SAA7120 11 /* video encoder */ | ||
45 | #define I2C_DRIVERID_SAA7121 12 /* video encoder */ | ||
46 | #define I2C_DRIVERID_SAA7185B 13 /* video encoder */ | 41 | #define I2C_DRIVERID_SAA7185B 13 /* video encoder */ |
47 | #define I2C_DRIVERID_CH7003 14 /* digital pc to tv encoder */ | ||
48 | #define I2C_DRIVERID_PCF8574A 15 /* i2c expander - 8 bit in/out */ | ||
49 | #define I2C_DRIVERID_PCF8582C 16 /* eeprom */ | ||
50 | #define I2C_DRIVERID_AT24Cxx 17 /* eeprom 1/2/4/8/16 K */ | ||
51 | #define I2C_DRIVERID_TEA6300 18 /* audio mixer */ | 42 | #define I2C_DRIVERID_TEA6300 18 /* audio mixer */ |
52 | #define I2C_DRIVERID_BT829 19 /* pc to tv encoder */ | ||
53 | #define I2C_DRIVERID_TDA9850 20 /* audio mixer */ | 43 | #define I2C_DRIVERID_TDA9850 20 /* audio mixer */ |
54 | #define I2C_DRIVERID_TDA9855 21 /* audio mixer */ | 44 | #define I2C_DRIVERID_TDA9855 21 /* audio mixer */ |
55 | #define I2C_DRIVERID_SAA7110 22 /* video decoder */ | 45 | #define I2C_DRIVERID_SAA7110 22 /* video decoder */ |
@@ -60,42 +50,19 @@ | |||
60 | #define I2C_DRIVERID_TDA7432 27 /* Stereo sound processor */ | 50 | #define I2C_DRIVERID_TDA7432 27 /* Stereo sound processor */ |
61 | #define I2C_DRIVERID_TVMIXER 28 /* Mixer driver for tv cards */ | 51 | #define I2C_DRIVERID_TVMIXER 28 /* Mixer driver for tv cards */ |
62 | #define I2C_DRIVERID_TVAUDIO 29 /* Generic TV sound driver */ | 52 | #define I2C_DRIVERID_TVAUDIO 29 /* Generic TV sound driver */ |
63 | #define I2C_DRIVERID_DPL3518 30 /* Dolby decoder chip */ | ||
64 | #define I2C_DRIVERID_TDA9873 31 /* TV sound decoder chip */ | 53 | #define I2C_DRIVERID_TDA9873 31 /* TV sound decoder chip */ |
65 | #define I2C_DRIVERID_TDA9875 32 /* TV sound decoder chip */ | 54 | #define I2C_DRIVERID_TDA9875 32 /* TV sound decoder chip */ |
66 | #define I2C_DRIVERID_PIC16C54_PV9 33 /* Audio mux/ir receiver */ | 55 | #define I2C_DRIVERID_PIC16C54_PV9 33 /* Audio mux/ir receiver */ |
67 | |||
68 | #define I2C_DRIVERID_SBATT 34 /* Smart Battery Device */ | ||
69 | #define I2C_DRIVERID_SBS 35 /* SB System Manager */ | ||
70 | #define I2C_DRIVERID_VES1893 36 /* VLSI DVB-S decoder */ | ||
71 | #define I2C_DRIVERID_VES1820 37 /* VLSI DVB-C decoder */ | ||
72 | #define I2C_DRIVERID_SAA7113 38 /* video decoder */ | ||
73 | #define I2C_DRIVERID_TDA8444 39 /* octuple 6-bit DAC */ | ||
74 | #define I2C_DRIVERID_BT819 40 /* video decoder */ | 56 | #define I2C_DRIVERID_BT819 40 /* video decoder */ |
75 | #define I2C_DRIVERID_BT856 41 /* video encoder */ | 57 | #define I2C_DRIVERID_BT856 41 /* video encoder */ |
76 | #define I2C_DRIVERID_VPX3220 42 /* video decoder+vbi/vtxt */ | 58 | #define I2C_DRIVERID_VPX3220 42 /* video decoder+vbi/vtxt */ |
77 | #define I2C_DRIVERID_DRP3510 43 /* ADR decoder (Astra Radio) */ | ||
78 | #define I2C_DRIVERID_SP5055 44 /* Satellite tuner */ | ||
79 | #define I2C_DRIVERID_STV0030 45 /* Multipurpose switch */ | ||
80 | #define I2C_DRIVERID_SAA7108 46 /* video decoder, image scaler */ | ||
81 | #define I2C_DRIVERID_DS1307 47 /* DS1307 real time clock */ | ||
82 | #define I2C_DRIVERID_ADV7175 48 /* ADV 7175/7176 video encoder */ | 59 | #define I2C_DRIVERID_ADV7175 48 /* ADV 7175/7176 video encoder */ |
83 | #define I2C_DRIVERID_SAA7114 49 /* video decoder */ | 60 | #define I2C_DRIVERID_SAA7114 49 /* video decoder */ |
84 | #define I2C_DRIVERID_ZR36120 50 /* Zoran 36120 video encoder */ | ||
85 | #define I2C_DRIVERID_24LC32A 51 /* Microchip 24LC32A 32k EEPROM */ | ||
86 | #define I2C_DRIVERID_STM41T00 52 /* real time clock */ | ||
87 | #define I2C_DRIVERID_UDA1342 53 /* UDA1342 audio codec */ | ||
88 | #define I2C_DRIVERID_ADV7170 54 /* video encoder */ | 61 | #define I2C_DRIVERID_ADV7170 54 /* video encoder */ |
89 | #define I2C_DRIVERID_MAX1617 56 /* temp sensor */ | ||
90 | #define I2C_DRIVERID_SAA7191 57 /* video decoder */ | 62 | #define I2C_DRIVERID_SAA7191 57 /* video decoder */ |
91 | #define I2C_DRIVERID_INDYCAM 58 /* SGI IndyCam */ | 63 | #define I2C_DRIVERID_INDYCAM 58 /* SGI IndyCam */ |
92 | #define I2C_DRIVERID_BT832 59 /* CMOS camera video processor */ | ||
93 | #define I2C_DRIVERID_TDA9887 60 /* TDA988x IF-PLL demodulator */ | ||
94 | #define I2C_DRIVERID_OVCAMCHIP 61 /* OmniVision CMOS image sens. */ | 64 | #define I2C_DRIVERID_OVCAMCHIP 61 /* OmniVision CMOS image sens. */ |
95 | #define I2C_DRIVERID_TDA7313 62 /* TDA7313 audio processor */ | ||
96 | #define I2C_DRIVERID_MAX6900 63 /* MAX6900 real-time clock */ | 65 | #define I2C_DRIVERID_MAX6900 63 /* MAX6900 real-time clock */ |
97 | #define I2C_DRIVERID_SAA7114H 64 /* video decoder */ | ||
98 | #define I2C_DRIVERID_DS1374 65 /* DS1374 real time clock */ | ||
99 | #define I2C_DRIVERID_TDA9874 66 /* TV sound decoder */ | 66 | #define I2C_DRIVERID_TDA9874 66 /* TV sound decoder */ |
100 | #define I2C_DRIVERID_SAA6752HS 67 /* MPEG2 encoder */ | 67 | #define I2C_DRIVERID_SAA6752HS 67 /* MPEG2 encoder */ |
101 | #define I2C_DRIVERID_TVEEPROM 68 /* TV EEPROM */ | 68 | #define I2C_DRIVERID_TVEEPROM 68 /* TV EEPROM */ |
@@ -114,7 +81,6 @@ | |||
114 | #define I2C_DRIVERID_DS1672 81 /* Dallas/Maxim DS1672 RTC */ | 81 | #define I2C_DRIVERID_DS1672 81 /* Dallas/Maxim DS1672 RTC */ |
115 | #define I2C_DRIVERID_X1205 82 /* Xicor/Intersil X1205 RTC */ | 82 | #define I2C_DRIVERID_X1205 82 /* Xicor/Intersil X1205 RTC */ |
116 | #define I2C_DRIVERID_PCF8563 83 /* Philips PCF8563 RTC */ | 83 | #define I2C_DRIVERID_PCF8563 83 /* Philips PCF8563 RTC */ |
117 | #define I2C_DRIVERID_RS5C372 84 /* Ricoh RS5C372 RTC */ | ||
118 | #define I2C_DRIVERID_BT866 85 /* Conexant bt866 video encoder */ | 84 | #define I2C_DRIVERID_BT866 85 /* Conexant bt866 video encoder */ |
119 | #define I2C_DRIVERID_KS0127 86 /* Samsung ks0127 video decoder */ | 85 | #define I2C_DRIVERID_KS0127 86 /* Samsung ks0127 video decoder */ |
120 | #define I2C_DRIVERID_TLV320AIC23B 87 /* TI TLV320AIC23B audio codec */ | 86 | #define I2C_DRIVERID_TLV320AIC23B 87 /* TI TLV320AIC23B audio codec */ |
@@ -129,8 +95,6 @@ | |||
129 | #define I2C_DRIVERID_CS5345 96 /* cs5345 audio processor */ | 95 | #define I2C_DRIVERID_CS5345 96 /* cs5345 audio processor */ |
130 | 96 | ||
131 | #define I2C_DRIVERID_I2CDEV 900 | 97 | #define I2C_DRIVERID_I2CDEV 900 |
132 | #define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */ | ||
133 | #define I2C_DRIVERID_ALERT 903 /* SMBus Alert Responder Client */ | ||
134 | 98 | ||
135 | /* IDs -- Use DRIVERIDs 1000-1999 for sensors. | 99 | /* IDs -- Use DRIVERIDs 1000-1999 for sensors. |
136 | These were originally in sensors.h in the lm_sensors package */ | 100 | These were originally in sensors.h in the lm_sensors package */ |
@@ -176,24 +140,16 @@ | |||
176 | 140 | ||
177 | /* --- Bit algorithm adapters */ | 141 | /* --- Bit algorithm adapters */ |
178 | #define I2C_HW_B_LP 0x010000 /* Parallel port Philips style */ | 142 | #define I2C_HW_B_LP 0x010000 /* Parallel port Philips style */ |
179 | #define I2C_HW_B_SER 0x010002 /* Serial line interface */ | ||
180 | #define I2C_HW_B_BT848 0x010005 /* BT848 video boards */ | 143 | #define I2C_HW_B_BT848 0x010005 /* BT848 video boards */ |
181 | #define I2C_HW_B_WNV 0x010006 /* Winnov Videums */ | ||
182 | #define I2C_HW_B_VIA 0x010007 /* Via vt82c586b */ | 144 | #define I2C_HW_B_VIA 0x010007 /* Via vt82c586b */ |
183 | #define I2C_HW_B_HYDRA 0x010008 /* Apple Hydra Mac I/O */ | 145 | #define I2C_HW_B_HYDRA 0x010008 /* Apple Hydra Mac I/O */ |
184 | #define I2C_HW_B_G400 0x010009 /* Matrox G400 */ | 146 | #define I2C_HW_B_G400 0x010009 /* Matrox G400 */ |
185 | #define I2C_HW_B_I810 0x01000a /* Intel I810 */ | 147 | #define I2C_HW_B_I810 0x01000a /* Intel I810 */ |
186 | #define I2C_HW_B_VOO 0x01000b /* 3dfx Voodoo 3 / Banshee */ | 148 | #define I2C_HW_B_VOO 0x01000b /* 3dfx Voodoo 3 / Banshee */ |
187 | #define I2C_HW_B_PPORT 0x01000c /* Primitive parallel port adapter */ | ||
188 | #define I2C_HW_B_SAVG 0x01000d /* Savage 4 */ | ||
189 | #define I2C_HW_B_SCX200 0x01000e /* Nat'l Semi SCx200 I2C */ | 149 | #define I2C_HW_B_SCX200 0x01000e /* Nat'l Semi SCx200 I2C */ |
190 | #define I2C_HW_B_RIVA 0x010010 /* Riva based graphics cards */ | 150 | #define I2C_HW_B_RIVA 0x010010 /* Riva based graphics cards */ |
191 | #define I2C_HW_B_IOC 0x010011 /* IOC bit-wiggling */ | 151 | #define I2C_HW_B_IOC 0x010011 /* IOC bit-wiggling */ |
192 | #define I2C_HW_B_TSUNA 0x010012 /* DEC Tsunami chipset */ | ||
193 | #define I2C_HW_B_OMAHA 0x010014 /* Omaha I2C interface (ARM) */ | ||
194 | #define I2C_HW_B_GUIDE 0x010015 /* Guide bit-basher */ | ||
195 | #define I2C_HW_B_IXP2000 0x010016 /* GPIO on IXP2000 systems */ | 152 | #define I2C_HW_B_IXP2000 0x010016 /* GPIO on IXP2000 systems */ |
196 | #define I2C_HW_B_IXP4XX 0x010017 /* GPIO on IXP4XX systems */ | ||
197 | #define I2C_HW_B_S3VIA 0x010018 /* S3Via ProSavage adapter */ | 153 | #define I2C_HW_B_S3VIA 0x010018 /* S3Via ProSavage adapter */ |
198 | #define I2C_HW_B_ZR36067 0x010019 /* Zoran-36057/36067 based boards */ | 154 | #define I2C_HW_B_ZR36067 0x010019 /* Zoran-36057/36067 based boards */ |
199 | #define I2C_HW_B_PCILYNX 0x01001a /* TI PCILynx I2C adapter */ | 155 | #define I2C_HW_B_PCILYNX 0x01001a /* TI PCILynx I2C adapter */ |
@@ -207,22 +163,11 @@ | |||
207 | #define I2C_HW_B_CX23885 0x010022 /* conexant 23885 based tv cards (bus1) */ | 163 | #define I2C_HW_B_CX23885 0x010022 /* conexant 23885 based tv cards (bus1) */ |
208 | 164 | ||
209 | /* --- PCF 8584 based algorithms */ | 165 | /* --- PCF 8584 based algorithms */ |
210 | #define I2C_HW_P_LP 0x020000 /* Parallel port interface */ | ||
211 | #define I2C_HW_P_ISA 0x020001 /* generic ISA Bus inteface card */ | ||
212 | #define I2C_HW_P_ELEK 0x020002 /* Elektor ISA Bus inteface card */ | 166 | #define I2C_HW_P_ELEK 0x020002 /* Elektor ISA Bus inteface card */ |
213 | 167 | ||
214 | /* --- PCA 9564 based algorithms */ | 168 | /* --- PCA 9564 based algorithms */ |
215 | #define I2C_HW_A_ISA 0x1a0000 /* generic ISA Bus interface card */ | 169 | #define I2C_HW_A_ISA 0x1a0000 /* generic ISA Bus interface card */ |
216 | 170 | ||
217 | /* --- ACPI Embedded controller algorithms */ | ||
218 | #define I2C_HW_ACPI_EC 0x1f0000 | ||
219 | |||
220 | /* --- MPC824x PowerPC adapters */ | ||
221 | #define I2C_HW_MPC824X 0x100001 /* Motorola 8240 / 8245 */ | ||
222 | |||
223 | /* --- MPC8xx PowerPC adapters */ | ||
224 | #define I2C_HW_MPC8XX_EPON 0x110000 /* Eponymous MPC8xx I2C adapter */ | ||
225 | |||
226 | /* --- PowerPC on-chip adapters */ | 171 | /* --- PowerPC on-chip adapters */ |
227 | #define I2C_HW_OCP 0x120000 /* IBM on-chip I2C adapter */ | 172 | #define I2C_HW_OCP 0x120000 /* IBM on-chip I2C adapter */ |
228 | 173 | ||
@@ -231,7 +176,6 @@ | |||
231 | 176 | ||
232 | /* --- SGI adapters */ | 177 | /* --- SGI adapters */ |
233 | #define I2C_HW_SGI_VINO 0x160000 | 178 | #define I2C_HW_SGI_VINO 0x160000 |
234 | #define I2C_HW_SGI_MACE 0x160001 | ||
235 | 179 | ||
236 | /* --- XSCALE on-chip adapters */ | 180 | /* --- XSCALE on-chip adapters */ |
237 | #define I2C_HW_IOP3XX 0x140000 | 181 | #define I2C_HW_IOP3XX 0x140000 |
@@ -255,17 +199,10 @@ | |||
255 | #define I2C_HW_SMBUS_W9968CF 0x04000d | 199 | #define I2C_HW_SMBUS_W9968CF 0x04000d |
256 | #define I2C_HW_SMBUS_OV511 0x04000e /* OV511(+) USB 1.1 webcam ICs */ | 200 | #define I2C_HW_SMBUS_OV511 0x04000e /* OV511(+) USB 1.1 webcam ICs */ |
257 | #define I2C_HW_SMBUS_OV518 0x04000f /* OV518(+) USB 1.1 webcam ICs */ | 201 | #define I2C_HW_SMBUS_OV518 0x04000f /* OV518(+) USB 1.1 webcam ICs */ |
258 | #define I2C_HW_SMBUS_OV519 0x040010 /* OV519 USB 1.1 webcam IC */ | ||
259 | #define I2C_HW_SMBUS_OVFX2 0x040011 /* Cypress/OmniVision FX2 webcam */ | 202 | #define I2C_HW_SMBUS_OVFX2 0x040011 /* Cypress/OmniVision FX2 webcam */ |
260 | #define I2C_HW_SMBUS_CAFE 0x040012 /* Marvell 88ALP01 "CAFE" cam */ | 203 | #define I2C_HW_SMBUS_CAFE 0x040012 /* Marvell 88ALP01 "CAFE" cam */ |
261 | #define I2C_HW_SMBUS_ALI1563 0x040013 | 204 | #define I2C_HW_SMBUS_ALI1563 0x040013 |
262 | 205 | ||
263 | /* --- ISA pseudo-adapter */ | ||
264 | #define I2C_HW_ISA 0x050000 | ||
265 | |||
266 | /* --- IPMB adapter */ | ||
267 | #define I2C_HW_IPMB 0x0c0000 | ||
268 | |||
269 | /* --- MCP107 adapter */ | 206 | /* --- MCP107 adapter */ |
270 | #define I2C_HW_MPC107 0x0d0000 | 207 | #define I2C_HW_MPC107 0x0d0000 |
271 | 208 | ||
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index a100c9f8eb7c..76014f8f3c60 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -140,7 +140,6 @@ struct i2c_driver { | |||
140 | int (*command)(struct i2c_client *client,unsigned int cmd, void *arg); | 140 | int (*command)(struct i2c_client *client,unsigned int cmd, void *arg); |
141 | 141 | ||
142 | struct device_driver driver; | 142 | struct device_driver driver; |
143 | struct list_head list; | ||
144 | }; | 143 | }; |
145 | #define to_i2c_driver(d) container_of(d, struct i2c_driver, driver) | 144 | #define to_i2c_driver(d) container_of(d, struct i2c_driver, driver) |
146 | 145 | ||
@@ -155,12 +154,11 @@ struct i2c_driver { | |||
155 | * generic enough to hide second-sourcing and compatible revisions. | 154 | * generic enough to hide second-sourcing and compatible revisions. |
156 | * @adapter: manages the bus segment hosting this I2C device | 155 | * @adapter: manages the bus segment hosting this I2C device |
157 | * @driver: device's driver, hence pointer to access routines | 156 | * @driver: device's driver, hence pointer to access routines |
158 | * @usage_count: counts current number of users of this client | ||
159 | * @dev: Driver model device node for the slave. | 157 | * @dev: Driver model device node for the slave. |
160 | * @irq: indicates the IRQ generated by this device (if any) | 158 | * @irq: indicates the IRQ generated by this device (if any) |
161 | * @driver_name: Identifies new-style driver used with this device; also | 159 | * @driver_name: Identifies new-style driver used with this device; also |
162 | * used as the module name for hotplug/coldplug modprobe support. | 160 | * used as the module name for hotplug/coldplug modprobe support. |
163 | * @list: list of active/busy clients | 161 | * @list: list of active/busy clients (DEPRECATED) |
164 | * @released: used to synchronize client releases & detaches and references | 162 | * @released: used to synchronize client releases & detaches and references |
165 | * | 163 | * |
166 | * An i2c_client identifies a single device (i.e. chip) connected to an | 164 | * An i2c_client identifies a single device (i.e. chip) connected to an |
@@ -175,16 +173,16 @@ struct i2c_client { | |||
175 | char name[I2C_NAME_SIZE]; | 173 | char name[I2C_NAME_SIZE]; |
176 | struct i2c_adapter *adapter; /* the adapter we sit on */ | 174 | struct i2c_adapter *adapter; /* the adapter we sit on */ |
177 | struct i2c_driver *driver; /* and our access routines */ | 175 | struct i2c_driver *driver; /* and our access routines */ |
178 | int usage_count; /* How many accesses currently */ | ||
179 | /* to the client */ | ||
180 | struct device dev; /* the device structure */ | 176 | struct device dev; /* the device structure */ |
181 | int irq; /* irq issued by device (or -1) */ | 177 | int irq; /* irq issued by device (or -1) */ |
182 | char driver_name[KOBJ_NAME_LEN]; | 178 | char driver_name[KOBJ_NAME_LEN]; |
183 | struct list_head list; | 179 | struct list_head list; /* DEPRECATED */ |
184 | struct completion released; | 180 | struct completion released; |
185 | }; | 181 | }; |
186 | #define to_i2c_client(d) container_of(d, struct i2c_client, dev) | 182 | #define to_i2c_client(d) container_of(d, struct i2c_client, dev) |
187 | 183 | ||
184 | extern struct i2c_client *i2c_verify_client(struct device *dev); | ||
185 | |||
188 | static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj) | 186 | static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj) |
189 | { | 187 | { |
190 | struct device * const dev = container_of(kobj, struct device, kobj); | 188 | struct device * const dev = container_of(kobj, struct device, kobj); |
@@ -261,6 +259,12 @@ i2c_new_probed_device(struct i2c_adapter *adap, | |||
261 | struct i2c_board_info *info, | 259 | struct i2c_board_info *info, |
262 | unsigned short const *addr_list); | 260 | unsigned short const *addr_list); |
263 | 261 | ||
262 | /* For devices that use several addresses, use i2c_new_dummy() to make | ||
263 | * client handles for the extra addresses. | ||
264 | */ | ||
265 | extern struct i2c_client * | ||
266 | i2c_new_dummy(struct i2c_adapter *adap, u16 address, const char *type); | ||
267 | |||
264 | extern void i2c_unregister_device(struct i2c_client *); | 268 | extern void i2c_unregister_device(struct i2c_client *); |
265 | 269 | ||
266 | /* Mainboard arch_initcall() code should register all its I2C devices. | 270 | /* Mainboard arch_initcall() code should register all its I2C devices. |
@@ -319,8 +323,7 @@ struct i2c_adapter { | |||
319 | struct device dev; /* the adapter device */ | 323 | struct device dev; /* the adapter device */ |
320 | 324 | ||
321 | int nr; | 325 | int nr; |
322 | struct list_head clients; | 326 | struct list_head clients; /* DEPRECATED */ |
323 | struct list_head list; | ||
324 | char name[48]; | 327 | char name[48]; |
325 | struct completion dev_released; | 328 | struct completion dev_released; |
326 | }; | 329 | }; |
@@ -357,10 +360,10 @@ static inline void i2c_set_adapdata (struct i2c_adapter *dev, void *data) | |||
357 | * command line | 360 | * command line |
358 | */ | 361 | */ |
359 | struct i2c_client_address_data { | 362 | struct i2c_client_address_data { |
360 | unsigned short *normal_i2c; | 363 | const unsigned short *normal_i2c; |
361 | unsigned short *probe; | 364 | const unsigned short *probe; |
362 | unsigned short *ignore; | 365 | const unsigned short *ignore; |
363 | unsigned short **forces; | 366 | const unsigned short * const *forces; |
364 | }; | 367 | }; |
365 | 368 | ||
366 | /* Internal numbers to terminate lists */ | 369 | /* Internal numbers to terminate lists */ |
@@ -389,11 +392,8 @@ static inline int i2c_add_driver(struct i2c_driver *driver) | |||
389 | extern int i2c_attach_client(struct i2c_client *); | 392 | extern int i2c_attach_client(struct i2c_client *); |
390 | extern int i2c_detach_client(struct i2c_client *); | 393 | extern int i2c_detach_client(struct i2c_client *); |
391 | 394 | ||
392 | /* Should be used to make sure that client-struct is valid and that it | 395 | extern struct i2c_client *i2c_use_client(struct i2c_client *client); |
393 | is okay to access the i2c-client. | 396 | extern void i2c_release_client(struct i2c_client *client); |
394 | returns -ENODEV if client has gone in the meantime */ | ||
395 | extern int i2c_use_client(struct i2c_client *); | ||
396 | extern int i2c_release_client(struct i2c_client *); | ||
397 | 397 | ||
398 | /* call the i2c_client->command() of all attached clients with | 398 | /* call the i2c_client->command() of all attached clients with |
399 | * the given arguments */ | 399 | * the given arguments */ |
@@ -405,7 +405,7 @@ extern void i2c_clients_command(struct i2c_adapter *adap, | |||
405 | * specific address (unless a 'force' matched); | 405 | * specific address (unless a 'force' matched); |
406 | */ | 406 | */ |
407 | extern int i2c_probe(struct i2c_adapter *adapter, | 407 | extern int i2c_probe(struct i2c_adapter *adapter, |
408 | struct i2c_client_address_data *address_data, | 408 | const struct i2c_client_address_data *address_data, |
409 | int (*found_proc) (struct i2c_adapter *, int, int)); | 409 | int (*found_proc) (struct i2c_adapter *, int, int)); |
410 | 410 | ||
411 | extern struct i2c_adapter* i2c_get_adapter(int id); | 411 | extern struct i2c_adapter* i2c_get_adapter(int id); |
@@ -598,104 +598,93 @@ I2C_CLIENT_MODULE_PARM(probe, "List of adapter,address pairs to scan " \ | |||
598 | "additionally"); \ | 598 | "additionally"); \ |
599 | I2C_CLIENT_MODULE_PARM(ignore, "List of adapter,address pairs not to " \ | 599 | I2C_CLIENT_MODULE_PARM(ignore, "List of adapter,address pairs not to " \ |
600 | "scan"); \ | 600 | "scan"); \ |
601 | static struct i2c_client_address_data addr_data = { \ | 601 | const static struct i2c_client_address_data addr_data = { \ |
602 | .normal_i2c = normal_i2c, \ | 602 | .normal_i2c = normal_i2c, \ |
603 | .probe = probe, \ | 603 | .probe = probe, \ |
604 | .ignore = ignore, \ | 604 | .ignore = ignore, \ |
605 | .forces = forces, \ | 605 | .forces = forces, \ |
606 | } | 606 | } |
607 | 607 | ||
608 | #define I2C_CLIENT_FORCE_TEXT \ | ||
609 | "List of adapter,address pairs to boldly assume to be present" | ||
610 | |||
608 | /* These are the ones you want to use in your own drivers. Pick the one | 611 | /* These are the ones you want to use in your own drivers. Pick the one |
609 | which matches the number of devices the driver differenciates between. */ | 612 | which matches the number of devices the driver differenciates between. */ |
610 | #define I2C_CLIENT_INSMOD \ | 613 | #define I2C_CLIENT_INSMOD \ |
611 | I2C_CLIENT_MODULE_PARM(force, \ | 614 | I2C_CLIENT_MODULE_PARM(force, I2C_CLIENT_FORCE_TEXT); \ |
612 | "List of adapter,address pairs to boldly assume " \ | 615 | static const unsigned short * const forces[] = { force, NULL }; \ |
613 | "to be present"); \ | ||
614 | static unsigned short *forces[] = { \ | ||
615 | force, \ | ||
616 | NULL \ | ||
617 | }; \ | ||
618 | I2C_CLIENT_INSMOD_COMMON | 616 | I2C_CLIENT_INSMOD_COMMON |
619 | 617 | ||
620 | #define I2C_CLIENT_INSMOD_1(chip1) \ | 618 | #define I2C_CLIENT_INSMOD_1(chip1) \ |
621 | enum chips { any_chip, chip1 }; \ | 619 | enum chips { any_chip, chip1 }; \ |
622 | I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ | 620 | I2C_CLIENT_MODULE_PARM(force, I2C_CLIENT_FORCE_TEXT); \ |
623 | "boldly assume to be present"); \ | ||
624 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ | 621 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ |
625 | static unsigned short *forces[] = { force, force_##chip1, NULL }; \ | 622 | static const unsigned short * const forces[] = { force, \ |
623 | force_##chip1, NULL }; \ | ||
626 | I2C_CLIENT_INSMOD_COMMON | 624 | I2C_CLIENT_INSMOD_COMMON |
627 | 625 | ||
628 | #define I2C_CLIENT_INSMOD_2(chip1, chip2) \ | 626 | #define I2C_CLIENT_INSMOD_2(chip1, chip2) \ |
629 | enum chips { any_chip, chip1, chip2 }; \ | 627 | enum chips { any_chip, chip1, chip2 }; \ |
630 | I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ | 628 | I2C_CLIENT_MODULE_PARM(force, I2C_CLIENT_FORCE_TEXT); \ |
631 | "boldly assume to be present"); \ | ||
632 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ | 629 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ |
633 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ | 630 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ |
634 | static unsigned short *forces[] = { force, force_##chip1, \ | 631 | static const unsigned short * const forces[] = { force, \ |
635 | force_##chip2, NULL }; \ | 632 | force_##chip1, force_##chip2, NULL }; \ |
636 | I2C_CLIENT_INSMOD_COMMON | 633 | I2C_CLIENT_INSMOD_COMMON |
637 | 634 | ||
638 | #define I2C_CLIENT_INSMOD_3(chip1, chip2, chip3) \ | 635 | #define I2C_CLIENT_INSMOD_3(chip1, chip2, chip3) \ |
639 | enum chips { any_chip, chip1, chip2, chip3 }; \ | 636 | enum chips { any_chip, chip1, chip2, chip3 }; \ |
640 | I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ | 637 | I2C_CLIENT_MODULE_PARM(force, I2C_CLIENT_FORCE_TEXT); \ |
641 | "boldly assume to be present"); \ | ||
642 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ | 638 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ |
643 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ | 639 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ |
644 | I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ | 640 | I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ |
645 | static unsigned short *forces[] = { force, force_##chip1, \ | 641 | static const unsigned short * const forces[] = { force, \ |
646 | force_##chip2, force_##chip3, \ | 642 | force_##chip1, force_##chip2, force_##chip3, NULL }; \ |
647 | NULL }; \ | ||
648 | I2C_CLIENT_INSMOD_COMMON | 643 | I2C_CLIENT_INSMOD_COMMON |
649 | 644 | ||
650 | #define I2C_CLIENT_INSMOD_4(chip1, chip2, chip3, chip4) \ | 645 | #define I2C_CLIENT_INSMOD_4(chip1, chip2, chip3, chip4) \ |
651 | enum chips { any_chip, chip1, chip2, chip3, chip4 }; \ | 646 | enum chips { any_chip, chip1, chip2, chip3, chip4 }; \ |
652 | I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ | 647 | I2C_CLIENT_MODULE_PARM(force, I2C_CLIENT_FORCE_TEXT); \ |
653 | "boldly assume to be present"); \ | ||
654 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ | 648 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ |
655 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ | 649 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ |
656 | I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ | 650 | I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ |
657 | I2C_CLIENT_MODULE_PARM_FORCE(chip4); \ | 651 | I2C_CLIENT_MODULE_PARM_FORCE(chip4); \ |
658 | static unsigned short *forces[] = { force, force_##chip1, \ | 652 | static const unsigned short * const forces[] = { force, \ |
659 | force_##chip2, force_##chip3, \ | 653 | force_##chip1, force_##chip2, force_##chip3, \ |
660 | force_##chip4, NULL}; \ | 654 | force_##chip4, NULL}; \ |
661 | I2C_CLIENT_INSMOD_COMMON | 655 | I2C_CLIENT_INSMOD_COMMON |
662 | 656 | ||
663 | #define I2C_CLIENT_INSMOD_5(chip1, chip2, chip3, chip4, chip5) \ | 657 | #define I2C_CLIENT_INSMOD_5(chip1, chip2, chip3, chip4, chip5) \ |
664 | enum chips { any_chip, chip1, chip2, chip3, chip4, chip5 }; \ | 658 | enum chips { any_chip, chip1, chip2, chip3, chip4, chip5 }; \ |
665 | I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ | 659 | I2C_CLIENT_MODULE_PARM(force, I2C_CLIENT_FORCE_TEXT); \ |
666 | "boldly assume to be present"); \ | ||
667 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ | 660 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ |
668 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ | 661 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ |
669 | I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ | 662 | I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ |
670 | I2C_CLIENT_MODULE_PARM_FORCE(chip4); \ | 663 | I2C_CLIENT_MODULE_PARM_FORCE(chip4); \ |
671 | I2C_CLIENT_MODULE_PARM_FORCE(chip5); \ | 664 | I2C_CLIENT_MODULE_PARM_FORCE(chip5); \ |
672 | static unsigned short *forces[] = { force, force_##chip1, \ | 665 | static const unsigned short * const forces[] = { force, \ |
673 | force_##chip2, force_##chip3, \ | 666 | force_##chip1, force_##chip2, force_##chip3, \ |
674 | force_##chip4, force_##chip5, \ | 667 | force_##chip4, force_##chip5, NULL }; \ |
675 | NULL }; \ | ||
676 | I2C_CLIENT_INSMOD_COMMON | 668 | I2C_CLIENT_INSMOD_COMMON |
677 | 669 | ||
678 | #define I2C_CLIENT_INSMOD_6(chip1, chip2, chip3, chip4, chip5, chip6) \ | 670 | #define I2C_CLIENT_INSMOD_6(chip1, chip2, chip3, chip4, chip5, chip6) \ |
679 | enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6 }; \ | 671 | enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6 }; \ |
680 | I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ | 672 | I2C_CLIENT_MODULE_PARM(force, I2C_CLIENT_FORCE_TEXT); \ |
681 | "boldly assume to be present"); \ | ||
682 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ | 673 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ |
683 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ | 674 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ |
684 | I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ | 675 | I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ |
685 | I2C_CLIENT_MODULE_PARM_FORCE(chip4); \ | 676 | I2C_CLIENT_MODULE_PARM_FORCE(chip4); \ |
686 | I2C_CLIENT_MODULE_PARM_FORCE(chip5); \ | 677 | I2C_CLIENT_MODULE_PARM_FORCE(chip5); \ |
687 | I2C_CLIENT_MODULE_PARM_FORCE(chip6); \ | 678 | I2C_CLIENT_MODULE_PARM_FORCE(chip6); \ |
688 | static unsigned short *forces[] = { force, force_##chip1, \ | 679 | static const unsigned short * const forces[] = { force, \ |
689 | force_##chip2, force_##chip3, \ | 680 | force_##chip1, force_##chip2, force_##chip3, \ |
690 | force_##chip4, force_##chip5, \ | 681 | force_##chip4, force_##chip5, force_##chip6, NULL }; \ |
691 | force_##chip6, NULL }; \ | ||
692 | I2C_CLIENT_INSMOD_COMMON | 682 | I2C_CLIENT_INSMOD_COMMON |
693 | 683 | ||
694 | #define I2C_CLIENT_INSMOD_7(chip1, chip2, chip3, chip4, chip5, chip6, chip7) \ | 684 | #define I2C_CLIENT_INSMOD_7(chip1, chip2, chip3, chip4, chip5, chip6, chip7) \ |
695 | enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6, \ | 685 | enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6, \ |
696 | chip7 }; \ | 686 | chip7 }; \ |
697 | I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ | 687 | I2C_CLIENT_MODULE_PARM(force, I2C_CLIENT_FORCE_TEXT); \ |
698 | "boldly assume to be present"); \ | ||
699 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ | 688 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ |
700 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ | 689 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ |
701 | I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ | 690 | I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ |
@@ -703,18 +692,16 @@ I2C_CLIENT_MODULE_PARM_FORCE(chip4); \ | |||
703 | I2C_CLIENT_MODULE_PARM_FORCE(chip5); \ | 692 | I2C_CLIENT_MODULE_PARM_FORCE(chip5); \ |
704 | I2C_CLIENT_MODULE_PARM_FORCE(chip6); \ | 693 | I2C_CLIENT_MODULE_PARM_FORCE(chip6); \ |
705 | I2C_CLIENT_MODULE_PARM_FORCE(chip7); \ | 694 | I2C_CLIENT_MODULE_PARM_FORCE(chip7); \ |
706 | static unsigned short *forces[] = { force, force_##chip1, \ | 695 | static const unsigned short * const forces[] = { force, \ |
707 | force_##chip2, force_##chip3, \ | 696 | force_##chip1, force_##chip2, force_##chip3, \ |
708 | force_##chip4, force_##chip5, \ | 697 | force_##chip4, force_##chip5, force_##chip6, \ |
709 | force_##chip6, force_##chip7, \ | 698 | force_##chip7, NULL }; \ |
710 | NULL }; \ | ||
711 | I2C_CLIENT_INSMOD_COMMON | 699 | I2C_CLIENT_INSMOD_COMMON |
712 | 700 | ||
713 | #define I2C_CLIENT_INSMOD_8(chip1, chip2, chip3, chip4, chip5, chip6, chip7, chip8) \ | 701 | #define I2C_CLIENT_INSMOD_8(chip1, chip2, chip3, chip4, chip5, chip6, chip7, chip8) \ |
714 | enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6, \ | 702 | enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6, \ |
715 | chip7, chip8 }; \ | 703 | chip7, chip8 }; \ |
716 | I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ | 704 | I2C_CLIENT_MODULE_PARM(force, I2C_CLIENT_FORCE_TEXT); \ |
717 | "boldly assume to be present"); \ | ||
718 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ | 705 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ |
719 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ | 706 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ |
720 | I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ | 707 | I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ |
@@ -723,11 +710,10 @@ I2C_CLIENT_MODULE_PARM_FORCE(chip5); \ | |||
723 | I2C_CLIENT_MODULE_PARM_FORCE(chip6); \ | 710 | I2C_CLIENT_MODULE_PARM_FORCE(chip6); \ |
724 | I2C_CLIENT_MODULE_PARM_FORCE(chip7); \ | 711 | I2C_CLIENT_MODULE_PARM_FORCE(chip7); \ |
725 | I2C_CLIENT_MODULE_PARM_FORCE(chip8); \ | 712 | I2C_CLIENT_MODULE_PARM_FORCE(chip8); \ |
726 | static unsigned short *forces[] = { force, force_##chip1, \ | 713 | static const unsigned short * const forces[] = { force, \ |
727 | force_##chip2, force_##chip3, \ | 714 | force_##chip1, force_##chip2, force_##chip3, \ |
728 | force_##chip4, force_##chip5, \ | 715 | force_##chip4, force_##chip5, force_##chip6, \ |
729 | force_##chip6, force_##chip7, \ | 716 | force_##chip7, force_##chip8, NULL }; \ |
730 | force_##chip8, NULL }; \ | ||
731 | I2C_CLIENT_INSMOD_COMMON | 717 | I2C_CLIENT_INSMOD_COMMON |
732 | #endif /* __KERNEL__ */ | 718 | #endif /* __KERNEL__ */ |
733 | #endif /* _LINUX_I2C_H */ | 719 | #endif /* _LINUX_I2C_H */ |
diff --git a/include/asm-arm/arch-omap/tps65010.h b/include/linux/i2c/tps65010.h index b9aa2b3a3909..7021635ed6a0 100644 --- a/include/asm-arm/arch-omap/tps65010.h +++ b/include/linux/i2c/tps65010.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* linux/include/asm-arm/arch-omap/tps65010.h | 1 | /* linux/i2c/tps65010.h |
2 | * | 2 | * |
3 | * Functions to access TPS65010 power management device. | 3 | * Functions to access TPS65010 power management device. |
4 | * | 4 | * |
@@ -25,8 +25,8 @@ | |||
25 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 25 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #ifndef __ASM_ARCH_TPS65010_H | 28 | #ifndef __LINUX_I2C_TPS65010_H |
29 | #define __ASM_ARCH_TPS65010_H | 29 | #define __LINUX_I2C_TPS65010_H |
30 | 30 | ||
31 | /* | 31 | /* |
32 | * ---------------------------------------------------------------------------- | 32 | * ---------------------------------------------------------------------------- |
@@ -152,5 +152,5 @@ extern int tps65010_config_vregs1(unsigned value); | |||
152 | */ | 152 | */ |
153 | extern int tps65013_set_low_pwr(unsigned mode); | 153 | extern int tps65013_set_low_pwr(unsigned mode); |
154 | 154 | ||
155 | #endif /* __ASM_ARCH_TPS65010_H */ | 155 | #endif /* __LINUX_I2C_TPS65010_H */ |
156 | 156 | ||
diff --git a/include/linux/m41t00.h b/include/linux/m41t00.h deleted file mode 100644 index b423360ca38e..000000000000 --- a/include/linux/m41t00.h +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | /* | ||
2 | * Definitions for the ST M41T00 family of i2c rtc chips. | ||
3 | * | ||
4 | * Author: Mark A. Greer <mgreer@mvista.com> | ||
5 | * | ||
6 | * 2005, 2006 (c) MontaVista Software, Inc. This file is licensed under | ||
7 | * the terms of the GNU General Public License version 2. This program | ||
8 | * is licensed "as is" without any warranty of any kind, whether express | ||
9 | * or implied. | ||
10 | */ | ||
11 | |||
12 | #ifndef _M41T00_H | ||
13 | #define _M41T00_H | ||
14 | |||
15 | #define M41T00_DRV_NAME "m41t00" | ||
16 | #define M41T00_I2C_ADDR 0x68 | ||
17 | |||
18 | #define M41T00_TYPE_M41T00 0 | ||
19 | #define M41T00_TYPE_M41T81 81 | ||
20 | #define M41T00_TYPE_M41T85 85 | ||
21 | |||
22 | struct m41t00_platform_data { | ||
23 | u8 type; | ||
24 | u8 i2c_addr; | ||
25 | u8 sqw_freq; | ||
26 | }; | ||
27 | |||
28 | /* SQW output disabled, this is default value by power on */ | ||
29 | #define M41T00_SQW_DISABLE (0) | ||
30 | |||
31 | #define M41T00_SQW_32KHZ (1<<4) /* 32.768 KHz */ | ||
32 | #define M41T00_SQW_8KHZ (2<<4) /* 8.192 KHz */ | ||
33 | #define M41T00_SQW_4KHZ (3<<4) /* 4.096 KHz */ | ||
34 | #define M41T00_SQW_2KHZ (4<<4) /* 2.048 KHz */ | ||
35 | #define M41T00_SQW_1KHZ (5<<4) /* 1.024 KHz */ | ||
36 | #define M41T00_SQW_512HZ (6<<4) /* 512 Hz */ | ||
37 | #define M41T00_SQW_256HZ (7<<4) /* 256 Hz */ | ||
38 | #define M41T00_SQW_128HZ (8<<4) /* 128 Hz */ | ||
39 | #define M41T00_SQW_64HZ (9<<4) /* 64 Hz */ | ||
40 | #define M41T00_SQW_32HZ (10<<4) /* 32 Hz */ | ||
41 | #define M41T00_SQW_16HZ (11<<4) /* 16 Hz */ | ||
42 | #define M41T00_SQW_8HZ (12<<4) /* 8 Hz */ | ||
43 | #define M41T00_SQW_4HZ (13<<4) /* 4 Hz */ | ||
44 | #define M41T00_SQW_2HZ (14<<4) /* 2 Hz */ | ||
45 | #define M41T00_SQW_1HZ (15<<4) /* 1 Hz */ | ||
46 | |||
47 | extern ulong m41t00_get_rtc_time(void); | ||
48 | extern int m41t00_set_rtc_time(ulong nowtime); | ||
49 | |||
50 | #endif /* _M41T00_H */ | ||
diff --git a/include/media/v4l2-i2c-drv-legacy.h b/include/media/v4l2-i2c-drv-legacy.h index 241854229d6f..e7645578fc22 100644 --- a/include/media/v4l2-i2c-drv-legacy.h +++ b/include/media/v4l2-i2c-drv-legacy.h | |||
@@ -34,7 +34,7 @@ struct v4l2_i2c_driver_data { | |||
34 | }; | 34 | }; |
35 | 35 | ||
36 | static struct v4l2_i2c_driver_data v4l2_i2c_data; | 36 | static struct v4l2_i2c_driver_data v4l2_i2c_data; |
37 | static struct i2c_client_address_data addr_data; | 37 | static const struct i2c_client_address_data addr_data; |
38 | static struct i2c_driver v4l2_i2c_driver_legacy; | 38 | static struct i2c_driver v4l2_i2c_driver_legacy; |
39 | static char v4l2_i2c_drv_name_legacy[32]; | 39 | static char v4l2_i2c_drv_name_legacy[32]; |
40 | 40 | ||