Lines Matching defs:i2ctp
234 i2c_transfer_t *i2ctp;
243 &i2ctp, 2, 0, I2C_SLEEP);
244 i2ctp->i2c_version = I2C_XFER_REV;
245 i2ctp->i2c_flags = I2C_WR;
248 i2ctp->i2c_wbuf[0] = MAX1617_CONFIG_WR_REG;
249 i2ctp->i2c_wbuf[1] = unitp->max1617_cpr_state.max1617_config;
251 if (i2c_transfer(unitp->max1617_hdl, i2ctp) != I2C_SUCCESS) {
256 i2ctp->i2c_wbuf[0] = MAX1617_CONV_RATE_WR_REG;
257 i2ctp->i2c_wbuf[1] = unitp->max1617_cpr_state.max1617_conv_rate;
258 if (i2c_transfer(unitp->max1617_hdl, i2ctp) != I2C_SUCCESS) {
263 i2ctp->i2c_wbuf[0] = MAX1617_LOCALTEMP_HIGH_WR_REG;
264 i2ctp->i2c_wbuf[1] = unitp->max1617_cpr_state.max1617_lcl_hlimit;
266 if (i2c_transfer(unitp->max1617_hdl, i2ctp) != I2C_SUCCESS) {
271 i2ctp->i2c_wbuf[0] = MAX1617_REMOTETEMP_HIGH_WR_REG;
272 i2ctp->i2c_wbuf[1] = unitp->max1617_cpr_state.max1617_remote_hlimit;
274 if (i2c_transfer(unitp->max1617_hdl, i2ctp) != I2C_SUCCESS) {
279 i2ctp->i2c_wbuf[0] = MAX1617_LOCALTEMP_LOW_REG;
280 i2ctp->i2c_wbuf[1] = unitp->max1617_cpr_state.max1617_lcl_llimit;
282 if (i2c_transfer(unitp->max1617_hdl, i2ctp) != I2C_SUCCESS) {
287 i2ctp->i2c_wbuf[0] = MAX1617_REMOTETEMP_LOW_REG;
288 i2ctp->i2c_wbuf[1] = unitp->max1617_cpr_state.max1617_remote_llimit;
290 if (i2c_transfer(unitp->max1617_hdl, i2ctp) != I2C_SUCCESS) {
301 i2c_transfer_free(unitp->max1617_hdl, i2ctp);
351 i2c_transfer_t *i2ctp;
360 &i2ctp, 1, 1, I2C_SLEEP);
373 i2ctp->i2c_version = I2C_XFER_REV;
374 i2ctp->i2c_flags = I2C_WR_RD;
375 i2ctp->i2c_wbuf[0] = MAX1617_CONFIG_REG;
376 if (i2c_transfer(unitp->max1617_hdl, i2ctp) != I2C_SUCCESS) {
380 unitp->max1617_cpr_state.max1617_config = i2ctp->i2c_rbuf[0];
382 i2ctp->i2c_wbuf[0] = MAX1617_CONV_RATE_REG;
383 if (i2c_transfer(unitp->max1617_hdl, i2ctp) != I2C_SUCCESS) {
387 unitp->max1617_cpr_state.max1617_conv_rate = i2ctp->i2c_rbuf[0];
389 i2ctp->i2c_wbuf[0] = MAX1617_LOCALTEMP_HIGH_REG;
390 if (i2c_transfer(unitp->max1617_hdl, i2ctp) != I2C_SUCCESS) {
394 unitp->max1617_cpr_state.max1617_lcl_hlimit = i2ctp->i2c_rbuf[0];
396 i2ctp->i2c_wbuf[0] = MAX1617_REMOTETEMP_HIGH_REG;
397 if (i2c_transfer(unitp->max1617_hdl, i2ctp) != I2C_SUCCESS) {
401 unitp->max1617_cpr_state.max1617_remote_hlimit = i2ctp->i2c_rbuf[0];
403 i2ctp->i2c_wbuf[0] = MAX1617_LOCALTEMP_LOW_REG;
404 if (i2c_transfer(unitp->max1617_hdl, i2ctp) != I2C_SUCCESS) {
408 unitp->max1617_cpr_state.max1617_lcl_llimit = i2ctp->i2c_rbuf[0];
410 i2ctp->i2c_wbuf[0] = MAX1617_REMOTETEMP_LOW_REG;
411 if (i2c_transfer(unitp->max1617_hdl, i2ctp) != I2C_SUCCESS) {
415 unitp->max1617_cpr_state.max1617_remote_llimit = i2ctp->i2c_rbuf[0];
418 i2c_transfer_free(unitp->max1617_hdl, i2ctp);
534 i2c_transfer_t *i2ctp;
537 (void) i2c_transfer_alloc(unitp->max1617_hdl, &i2ctp, 2, 0, I2C_SLEEP);
538 i2ctp->i2c_version = I2C_XFER_REV;
539 i2ctp->i2c_flags = I2C_WR;
540 i2ctp->i2c_wbuf[0] = device_reg;
544 i2c_transfer_free(unitp->max1617_hdl, i2ctp);
549 i2ctp->i2c_wbuf[1] = (int8_t)temp;
551 if (i2c_transfer(unitp->max1617_hdl, i2ctp) != I2C_SUCCESS) {
555 i2c_transfer_free(unitp->max1617_hdl, i2ctp);
567 i2c_transfer_t *i2ctp;
570 (void) i2c_transfer_alloc(unitp->max1617_hdl, &i2ctp, 1, 1, I2C_SLEEP);
571 i2ctp->i2c_version = I2C_XFER_REV;
572 i2ctp->i2c_flags = I2C_WR_RD;
573 i2ctp->i2c_wbuf[0] = reg;
574 if (i2c_transfer(unitp->max1617_hdl, i2ctp) == I2C_SUCCESS) {
579 temp16 = (int16_t)((int8_t)i2ctp->i2c_rbuf[0]);
587 i2c_transfer_free(unitp->max1617_hdl, i2ctp);
599 i2c_transfer_t *i2ctp;
647 (void) i2c_transfer_alloc(unitp->max1617_hdl, &i2ctp,
649 i2ctp->i2c_version = I2C_XFER_REV;
650 i2ctp->i2c_flags = I2C_WR_RD;
651 i2ctp->i2c_wbuf[0] = reg;
653 if (i2c_transfer(unitp->max1617_hdl, i2ctp) == I2C_SUCCESS) {
660 int16_t temp = (int16_t)((int8_t)i2ctp->i2c_rbuf[0]);
668 i2c_transfer_free(unitp->max1617_hdl, i2ctp);
672 (void) i2c_transfer_alloc(unitp->max1617_hdl, &i2ctp,
674 i2ctp->i2c_version = I2C_XFER_REV;
675 i2ctp->i2c_flags = I2C_WR_RD;
676 i2ctp->i2c_wbuf[0] = MAX1617_STATUS_REG;
678 if (i2c_transfer(unitp->max1617_hdl, i2ctp) == I2C_SUCCESS) {
679 if (ddi_copyout((caddr_t)i2ctp->i2c_rbuf, (caddr_t)arg,
686 i2c_transfer_free(unitp->max1617_hdl, i2ctp);
689 (void) i2c_transfer_alloc(unitp->max1617_hdl, &i2ctp, 1, 1,
691 i2ctp->i2c_version = I2C_XFER_REV;
692 i2ctp->i2c_flags = I2C_WR_RD;
693 i2ctp->i2c_wbuf[0] = MAX1617_CONFIG_REG;
694 if (i2c_transfer(unitp->max1617_hdl, i2ctp) == I2C_SUCCESS) {
695 if (ddi_copyout((caddr_t)i2ctp->i2c_rbuf, (caddr_t)arg,
702 i2c_transfer_free(unitp->max1617_hdl, i2ctp);
705 (void) i2c_transfer_alloc(unitp->max1617_hdl, &i2ctp,
707 i2ctp->i2c_version = I2C_XFER_REV;
708 i2ctp->i2c_flags = I2C_WR_RD;
709 i2ctp->i2c_wbuf[0] = MAX1617_CONV_RATE_REG;
710 if (i2c_transfer(unitp->max1617_hdl, i2ctp) == I2C_SUCCESS) {
711 if (ddi_copyout((caddr_t)i2ctp->i2c_rbuf, (caddr_t)arg,
718 i2c_transfer_free(unitp->max1617_hdl, i2ctp);
754 (void) i2c_transfer_alloc(unitp->max1617_hdl, &i2ctp,
756 i2ctp->i2c_version = I2C_XFER_REV;
757 i2ctp->i2c_flags = I2C_WR;
758 i2ctp->i2c_wbuf[0] = MAX1617_CONV_RATE_WR_REG;
759 if (ddi_copyin((caddr_t)arg, (caddr_t)&i2ctp->i2c_wbuf[1],
764 if (i2c_transfer(unitp->max1617_hdl, i2ctp) != I2C_SUCCESS) {
767 i2c_transfer_free(unitp->max1617_hdl, i2ctp);
771 (void) i2c_transfer_alloc(unitp->max1617_hdl, &i2ctp,
773 i2ctp->i2c_version = I2C_XFER_REV;
774 i2ctp->i2c_flags = I2C_WR;
775 i2ctp->i2c_wbuf[0] = MAX1617_CONFIG_WR_REG;
776 if (ddi_copyin((caddr_t)arg, (caddr_t)&i2ctp->i2c_wbuf[1],
781 if (i2c_transfer(unitp->max1617_hdl, i2ctp) != I2C_SUCCESS) {
785 i2c_transfer_free(unitp->max1617_hdl, i2ctp);
819 (void) i2c_transfer_alloc(unitp->max1617_hdl, &i2ctp, 1, 0,
821 i2ctp->i2c_version = I2C_XFER_REV;
822 i2ctp->i2c_flags = I2C_WR;
823 i2ctp->i2c_wbuf[0] = MAX1617_ONE_SHOT_CMD_REG;
824 if (i2c_transfer(unitp->max1617_hdl, i2ctp) != I2C_SUCCESS) {
828 i2c_transfer_free(unitp->max1617_hdl, i2ctp);