Lines Matching defs:i2ctp
386 i2c_transfer_t *i2ctp = NULL;
433 if (i2ctp == NULL) {
435 &i2ctp,
440 if ((err = uiomove(&i2ctp->i2c_wbuf[
444 i2ctp);
447 i2ctp->i2c_version = I2C_XFER_REV;
448 i2ctp->i2c_flags = I2C_WR;
456 i2ctp->i2c_wbuf += actual_data_xfer;
458 i2ctp->i2c_wlen -= actual_data_xfer;
462 i2ctp->i2c_wbuf[0] = (seeprom_addr >> 8);
463 i2ctp->i2c_wbuf[1] = (uchar_t)seeprom_addr;
465 i2ctp->i2c_wbuf[0] = (uchar_t)seeprom_addr;
468 if ((err = i2c_transfer(unitp->seeprom_hdl, i2ctp)) !=
470 i2c_transfer_free(unitp->seeprom_hdl, i2ctp);
474 actual_data_xfer = i2ctp->i2c_wlen -
475 i2ctp->i2c_w_resid - unitp->seeprom_addrsize;
477 if (i2ctp->i2c_w_resid == 0) {
478 i2c_transfer_free(unitp->seeprom_hdl, i2ctp);
479 i2ctp = NULL;
491 (void) i2c_transfer_alloc(unitp->seeprom_hdl, &i2ctp,
494 i2ctp->i2c_version = I2C_XFER_REV;
497 i2ctp->i2c_wbuf[0] = (seeprom_addr >> 8);
498 i2ctp->i2c_wbuf[1] = (uchar_t)seeprom_addr;
500 i2ctp->i2c_wbuf[0] = (uchar_t)seeprom_addr;
503 i2ctp->i2c_flags = I2C_WR_RD;
505 if ((err = i2c_transfer(unitp->seeprom_hdl, i2ctp)) !=
507 i2c_transfer_free(unitp->seeprom_hdl, i2ctp);
511 actual_data_xfer = i2ctp->i2c_rlen - i2ctp->i2c_r_resid;
513 err = uiomove(i2ctp->i2c_rbuf, actual_data_xfer,
515 i2c_transfer_free(unitp->seeprom_hdl, i2ctp);