Lines Matching defs:I2C
205 I2CControl I2C;
218 I2C.Command = pI2CControl->Command;
219 I2C.dwCookie = pI2CControl->dwCookie;
220 I2C.Data = pI2CControl->Data;
221 I2C. Flags = pI2CControl->Flags;
222 I2C.Status = pI2CControl->Status;
223 I2C.ClockRate = pI2CControl->ClockRate;
226 /* Reset I2C Bus */
227 I2C.Command = I2C_COMMAND_RESET;
228 I2CAccess(pHWDE, &I2C);
229 if (I2C.Status != I2C_STATUS_NOERROR) {
230 pI2CControl->Status = I2C.Status;
235 I2C.Command = I2C_COMMAND_WRITE;
236 I2C.Flags = I2C_FLAGS_START | I2C_FLAGS_ACK;
237 I2C.Data = (UCHAR)ulDevAddr;
238 I2CAccess(pHWDE, &I2C);
239 if (I2C.Status != I2C_STATUS_NOERROR) {
240 pI2CControl->Status = I2C.Status;
245 I2C.Command = I2C_COMMAND_WRITE;
246 I2C.Flags = I2C_FLAGS_ACK | I2C_FLAGS_STOP;
247 I2C.Data = (UCHAR)ulOffset;
248 I2CAccess(pHWDE, &I2C);
249 if (I2C.Status != I2C_STATUS_NOERROR) {
250 pI2CControl->Status = I2C.Status;
255 I2C.Command = I2C_COMMAND_WRITE;
256 I2C.Flags = I2C_FLAGS_START | I2C_FLAGS_ACK;
257 I2C.Data = (UCHAR)ulDevAddr + 1;
258 I2CAccess(pHWDE, &I2C);
259 if (I2C.Status != I2C_STATUS_NOERROR) {
260 pI2CControl->Status = I2C.Status;
266 I2C.Command = I2C_COMMAND_READ;
267 I2C.Flags = I2C_FLAGS_ACK;
269 I2C.Flags |= I2C_FLAGS_STOP;
271 I2CAccess(pHWDE, &I2C);
272 if (I2C.Status != I2C_STATUS_NOERROR) {
273 pI2CControl->Status = I2C.Status;
276 *pBuffer = I2C.Data;
279 pI2CControl->Status = I2C.Status;
283 /* Reset I2C Bus */
284 I2C.Command = I2C_COMMAND_RESET;
285 I2CAccess(pHWDE, &I2C);
286 if (I2C.Status != I2C_STATUS_NOERROR) {
287 pI2CControl->Status = I2C.Status;
292 I2C.Command = I2C_COMMAND_WRITE;
293 I2C.Flags = I2C_FLAGS_START | I2C_FLAGS_ACK;
294 I2C.Data = (UCHAR)ulDevAddr;
295 I2CAccess(pHWDE, &I2C);
296 if (I2C.Status != I2C_STATUS_NOERROR) {
297 pI2CControl->Status = I2C.Status;
302 I2C.Command = I2C_COMMAND_WRITE;
303 I2C.Flags = I2C_FLAGS_ACK;
304 I2C.Data = (UCHAR)ulOffset;
305 I2CAccess(pHWDE, &I2C);
306 if (I2C.Status != I2C_STATUS_NOERROR) {
307 pI2CControl->Status = I2C.Status;
313 I2C.Command = I2C_COMMAND_WRITE;
314 I2C.Flags = I2C_FLAGS_ACK;
316 I2C.Flags |= I2C_FLAGS_STOP;
318 I2C.Data = *pBuffer;
319 I2CAccess(pHWDE, &I2C);
320 if (I2C.Status != I2C_STATUS_NOERROR) {
321 pI2CControl->Status = I2C.Status;
326 pI2CControl->Status = I2C.Status;
350 // pI2C - I2C pointer
462 // Get the EDID which is in Enhanced-EDID format via I2C. The parse-in block
468 // pI2C - I2C pointer
536 // i.e. which hardware I2C bus is the command for.
543 if (ulI2CEnable) /* Open I2C Port */
557 else /* Close I2C Port*/
621 /* Reset I2C bus */
631 /* printk("\nI2CAccess(): I2C Cmd = 0x%X I2C Flags = 0x%X I2C Status = 0x%X I2C Data = 0x%X", pI2CControl->Command, pI2CControl->Flags, pI2CControl->Status, pI2CControl->Data); */
640 * Purpose: To complete an I2C instruction.
644 * I2CCntl : PI2CControl, pointer to I2C control structure
678 * Purpose: To complete an I2C instruction.
682 * I2CCntl : PI2CControl, pointer to I2C control structure
729 * Purpose: To complete an I2C instruction.
733 * I2CCntl : PI2CControl, pointer to I2C control structure
822 * Purpose: To ask the I2C bus for an acknowledge.
836 if (fPut == SEND_ACK) /* Send Ack into I2C bus */
866 /* Receive Ack from I2C bus */
946 * Purpose: To start a transfer on the I2C bus.
1005 * Purpose: To stop a transfer on the I2C bus.
1048 * Purpose: To write a UCHAR of data to the I2C bus.
1096 * Purpose: To read a UCHAR of data from the I2C bus.
1164 For DVI I2C Interface
1386 // For CRT I2C Interface
1404 PDEBUGI2C(ErrorF("I2C:Write CRT clock = %x\n", data & 1));
1439 PDEBUGI2C(ErrorF("I2C:Write CRT data = %x\n", data & 1));
1476 PDEBUGI2C(ErrorF("I2C:Read Channel CRT clock = %x\n", cPortData));
1498 PDEBUGI2C(ErrorF("I2C:Read Channel CRT data = %x\n", cPortData));
1505 // For Feature Connector I2C Interface
1523 PDEBUGI2C(ErrorF("I2C:Write FCNT clock = %x\n", data & 1));
1547 PDEBUGI2C(ErrorF("I2C:Write FCNT data = %x\n", data & 1));
1574 PDEBUGI2C(ErrorF("I2C:Read Channel FCNT clock = %x\n", cPortData));
1596 PDEBUGI2C(ErrorF("I2C:Read Channel FCNT data = %x\n", cPortData));
1677 // Get the EDID which is in version 1.x format via I2C.
1681 // pI2C - I2C pointer
1753 // Get the EDID which is in version 2.0 format via I2C.
1757 // pI2C - I2C pointer
1811 // For driver to get the monitor EDID through I2C. This function works similar
1834 I2CControl I2C;
1849 if (I2COpen(pHWDE, I2C_OPEN, ulChannelID, &I2C) != NO_ERROR)
1856 I2C.ClockRate = I2C_MAX_CLOCK_RATE;
1857 I2C.Command = I2C_COMMAND_WRITE;
1858 I2C.Flags = I2C_FLAGS_STOP;
1859 I2C.Data = 0xFF;
1860 I2CAccess(pHWDE, &I2C);
1862 // Reset I2C bus
1863 I2C.Command = I2C_COMMAND_RESET;
1864 I2CAccess(pHWDE, &I2C);
1865 if (I2C.Status != I2C_STATUS_NOERROR)
1867 PDEBUGI2C(ErrorF("bGetEDID() fail: Reset I2C bus fail.\n"));
1871 status = vGetEDID_2(pHWDE, &I2C, pjEDIDBuffer, ulBufferSize);
1877 status = vGetEDID_1(pHWDE, &I2C, pjEDIDBuffer, ulBufferSize);
1884 vGetEDIDExtensionBlocks(pHWDE, &I2C, pjEDIDBuffer+128, ulBufferSize-128);
1894 I2COpen(pHWDE, I2C_CLOSE, ulChannelID, &I2C);