if (((dev->board.tuner_type == TUNER_XC5000) ||
(dev->board.tuner_type == TUNER_XC5000C)) &&
(dev->board.tuner_addr == msg->addr)) { /* * Due to I2C clock stretch, we need to use a lower speed * on xc5000 for commands. However, firmware transfer can * speed up to 400 KHz.
*/ if (msg->len == 64)
i2c_speed = AU0828_I2C_CLK_250KHZ; else
i2c_speed = AU0828_I2C_CLK_20KHZ;
} /* Set the I2C clock */
au0828_write(dev, AU0828_I2C_CLK_DIVIDER_202, i2c_speed);
/* Deal with i2c_scan */ if (msg->len == 0) { /* The analog tuner detection code makes use of the SMBUS_QUICK message (which involves a zero length i2c write). To avoid checking the status register when we didn't strobe out any actual bytes to the bus, just do a read check. This is consistent with how I saw i2c device checking done in the
USB trace of the Windows driver */
au0828_write(dev, AU0828_I2C_TRIGGER_200,
AU0828_I2C_TRIGGER_READ);
/* Strobe the byte into the bus */ if (i < msg->len)
au0828_write(dev, AU0828_I2C_TRIGGER_200,
AU0828_I2C_TRIGGER_WRITE |
AU0828_I2C_TRIGGER_HOLD); else
au0828_write(dev, AU0828_I2C_TRIGGER_200,
AU0828_I2C_TRIGGER_WRITE);
/* * Due to xc5000c clock stretch, we cannot use full speed at * readings from xc5000, as otherwise they'll fail.
*/ if (((dev->board.tuner_type == TUNER_XC5000) ||
(dev->board.tuner_type == TUNER_XC5000C)) &&
(dev->board.tuner_addr == msg->addr))
i2c_speed = AU0828_I2C_CLK_20KHZ;
/* Set the I2C clock */
au0828_write(dev, AU0828_I2C_CLK_DIVIDER_202, i2c_speed);
if (0 == dev->i2c_rc) {
pr_info("i2c bus registered\n"); if (i2c_scan)
do_i2c_scan(KBUILD_MODNAME, &dev->i2c_client);
} else
pr_info("i2c bus register FAILED\n");
return dev->i2c_rc;
}
int au0828_i2c_unregister(struct au0828_dev *dev)
{
i2c_del_adapter(&dev->i2c_adap); return 0;
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet am 2026-04-27)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.