~ubuntu-branches/ubuntu/vivid/xorg-server/vivid

« back to all changes in this revision

Viewing changes to hw/xfree86/i2c/fi1236.c

  • Committer: Package Import Robot
  • Author(s): Maarten Lankhorst
  • Date: 2013-07-03 12:03:57 UTC
  • mfrom: (1.1.56)
  • Revision ID: package-import@ubuntu.com-20130703120357-caosebpn11zu2zj0
Tags: 2:1.14.1-0ubuntu0.8
Use correct version for libxfixes3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
    CARD8 in;
92
92
 
93
93
    in = 0x11;
94
 
    I2C_WriteRead(&(f->d), (I2CByte *) & in, 1, out, 4);
 
94
    I2C_WriteRead(&(f->d), (I2CByte *) &in, 1, out, 4);
95
95
    xf86DrvMsg(f->d.pI2CBus->scrnIndex, X_INFO,
96
96
               "MT2032: Company code 0x%02x%02x, part code 0x%02x, revision code 0x%02x\n",
97
97
               out[0], out[1], out[2], out[3]);
432
432
    CARD8 AFC;
433
433
 
434
434
    in = 0x0e;
435
 
    I2C_WriteRead(&(f->d), (I2CByte *) & in, 1, out, 2);
 
435
    I2C_WriteRead(&(f->d), (I2CByte *) &in, 1, out, 2);
436
436
    AFC = (out[0] >> 4) & 0x7;
437
437
#if 0
438
438
    xf86DrvMsg(f->d.pI2CBus->scrnIndex, X_INFO, "AFC=%d TAD1=%d TAD2=%d\n",
467
467
    CARD8 TAD2, TAD1;
468
468
 
469
469
    in = 0x0e;
470
 
    I2C_WriteRead(&(f->d), (I2CByte *) & in, 1, out, 2);
 
470
    I2C_WriteRead(&(f->d), (I2CByte *) &in, 1, out, 2);
471
471
    XOK = out[0] & 1;
472
472
    LO1LK = (out[0] >> 2) & 1;
473
473
    LO2LK = (out[0] >> 1) & 1;
589
589
 
590
590
    if ((f->type == TUNER_TYPE_FM1216ME) || (f->type == TUNER_TYPE_FI1236W)) {
591
591
        f->tuner_data.aux = 0x20;
592
 
        I2C_WriteRead(&(f->d), (I2CByte *) & (f->tuner_data), 5, NULL, 0);
 
592
        I2C_WriteRead(&(f->d), (I2CByte *) &(f->tuner_data), 5, NULL, 0);
593
593
        I2C_WriteRead(&(f->d), NULL, 0, &data, 1);
594
594
        xf86DrvMsg(f->d.pI2CBus->scrnIndex, X_INFO, "Tuner status %x\n", data);
595
595
    }
596
596
    else
597
 
        I2C_WriteRead(&(f->d), (I2CByte *) & (f->tuner_data), 4, NULL, 0);
 
597
        I2C_WriteRead(&(f->d), (I2CByte *) &(f->tuner_data), 4, NULL, 0);
598
598
}
599
599
 
600
600
void