Lines Matching refs:ehcp

168 int ehc_read_tda8444(struct ehc_envcunit *ehcp);
195 ehc_start_pcf8584(struct ehc_envcunit *ehcp, uint8_t byteaddress) in ehc_start_pcf8584() argument
207 ddi_get8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s1); in ehc_start_pcf8584()
218 ehc_init_pcf8584(ehcp); in ehc_start_pcf8584()
224 ehc_init_pcf8584(ehcp); in ehc_start_pcf8584()
234 ddi_put8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s0, DUMMY_WRITE_ADDR); in ehc_start_pcf8584()
237 ddi_put8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s1, in ehc_start_pcf8584()
245 ddi_get8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s1); in ehc_start_pcf8584()
256 ehc_init_pcf8584(ehcp); in ehc_start_pcf8584()
262 ehc_init_pcf8584(ehcp); in ehc_start_pcf8584()
267 ddi_put8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s0, DUMMY_WRITE_DATA); in ehc_start_pcf8584()
274 ddi_get8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s1); in ehc_start_pcf8584()
285 ehc_init_pcf8584(ehcp); in ehc_start_pcf8584()
291 ehc_init_pcf8584(ehcp); in ehc_start_pcf8584()
299 ddi_put8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s1, in ehc_start_pcf8584()
303 ddi_put8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s0, byteaddress); in ehc_start_pcf8584()
310 ddi_get8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s1); in ehc_start_pcf8584()
321 ehc_init_pcf8584(ehcp); in ehc_start_pcf8584()
327 ehc_init_pcf8584(ehcp); in ehc_start_pcf8584()
345 discard = ddi_get8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s0); in ehc_start_pcf8584()
354 ddi_get8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s1); in ehc_start_pcf8584()
366 ehc_init_pcf8584(ehcp); in ehc_start_pcf8584()
372 ehc_init_pcf8584(ehcp); in ehc_start_pcf8584()
385 ehc_stop_pcf8584(struct ehc_envcunit *ehcp) in ehc_stop_pcf8584() argument
387 ddi_put8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s1, in ehc_stop_pcf8584()
392 ehc_read_pcf8584(struct ehc_envcunit *ehcp, uint8_t *data) in ehc_read_pcf8584() argument
398 *data = ddi_get8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s0); in ehc_read_pcf8584()
404 ddi_get8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s1); in ehc_read_pcf8584()
415 ehc_init_pcf8584(ehcp); in ehc_read_pcf8584()
421 ehc_init_pcf8584(ehcp); in ehc_read_pcf8584()
434 ehc_write_pcf8584(struct ehc_envcunit *ehcp, uint8_t data) in ehc_write_pcf8584() argument
440 ddi_put8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s0, data); in ehc_write_pcf8584()
446 ddi_get8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s1); in ehc_write_pcf8584()
457 ehc_init_pcf8584(ehcp); in ehc_write_pcf8584()
463 ehc_init_pcf8584(ehcp); in ehc_write_pcf8584()
476 ehc_after_read_pcf8584(struct ehc_envcunit *ehcp, uint8_t *data) in ehc_after_read_pcf8584() argument
483 ddi_put8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s1, EHC_S1_ES0); in ehc_after_read_pcf8584()
489 *data = ddi_get8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s0); in ehc_after_read_pcf8584()
495 ddi_get8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s1); in ehc_after_read_pcf8584()
506 ehc_init_pcf8584(ehcp); in ehc_after_read_pcf8584()
512 ehc_init_pcf8584(ehcp); in ehc_after_read_pcf8584()
519 ehc_stop_pcf8584(ehcp); in ehc_after_read_pcf8584()
524 discard = ddi_get8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s0); in ehc_after_read_pcf8584()
541 ehc_init_pcf8584(struct ehc_envcunit *ehcp) in ehc_init_pcf8584() argument
548 ddi_put8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s1, EHC_S1_PIN); in ehc_init_pcf8584()
556 ddi_put8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s0, EHC_S0_OWN); in ehc_init_pcf8584()
565 ddi_put8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s1, in ehc_init_pcf8584()
574 ddi_put8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s0, EHC_S0_CLK); in ehc_init_pcf8584()
583 ddi_put8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s1, in ehc_init_pcf8584()
602 ehc_read_tda8444(struct ehc_envcunit *ehcp) in ehc_read_tda8444() argument
605 ehcp = ehcp; in ehc_read_tda8444()
615 ehc_write_tda8444(struct ehc_envcunit *ehcp, int byteaddress, int instruction, in ehc_write_tda8444() argument
624 ASSERT(MUTEX_HELD(&ehcp->umutex)); in ehc_write_tda8444()
628 if ((status = ehc_start_pcf8584(ehcp, byteaddress)) != EHC_SUCCESS) { in ehc_write_tda8444()
633 ehc_stop_pcf8584(ehcp); in ehc_write_tda8444()
638 if ((status = ehc_write_pcf8584(ehcp, control)) != EHC_SUCCESS) { in ehc_write_tda8444()
643 ehc_stop_pcf8584(ehcp); in ehc_write_tda8444()
649 if ((status = ehc_write_pcf8584(ehcp, (buf[i] & 0x3f))) != in ehc_write_tda8444()
652 ehc_stop_pcf8584(ehcp); in ehc_write_tda8444()
657 ehc_stop_pcf8584(ehcp); in ehc_write_tda8444()
667 ehc_read_pcf8574a(struct ehc_envcunit *ehcp, int byteaddress, uint8_t *buf, in ehc_read_pcf8574a() argument
675 ASSERT(MUTEX_HELD(&ehcp->umutex)); in ehc_read_pcf8574a()
680 if ((status = ehc_start_pcf8584(ehcp, EHC_BYTE_READ | byteaddress)) != in ehc_read_pcf8574a()
686 ehc_stop_pcf8584(ehcp); in ehc_read_pcf8574a()
691 ddi_get8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s0); in ehc_read_pcf8574a()
700 if ((status = ehc_read_pcf8584(ehcp, &buf[i])) != EHC_SUCCESS) { in ehc_read_pcf8574a()
710 if (ehc_after_read_pcf8584(ehcp, &buf[i]) != EHC_SUCCESS) { in ehc_read_pcf8574a()
722 ehc_write_pcf8574a(struct ehc_envcunit *ehcp, int byteaddress, uint8_t *buf, in ehc_write_pcf8574a() argument
729 ASSERT(MUTEX_HELD(&ehcp->umutex)); in ehc_write_pcf8574a()
734 if ((status = ehc_start_pcf8584(ehcp, byteaddress)) != EHC_SUCCESS) { in ehc_write_pcf8574a()
739 ehc_stop_pcf8584(ehcp); in ehc_write_pcf8574a()
748 if ((status = ehc_write_pcf8584(ehcp, buf[i])) != EHC_SUCCESS) { in ehc_write_pcf8574a()
750 ehc_stop_pcf8584(ehcp); in ehc_write_pcf8574a()
759 ehc_stop_pcf8584(ehcp); in ehc_write_pcf8574a()
769 ehc_read_pcf8574(struct ehc_envcunit *ehcp, int byteaddress, uint8_t *buf, in ehc_read_pcf8574() argument
777 ASSERT(MUTEX_HELD(&ehcp->umutex)); in ehc_read_pcf8574()
782 if ((status = ehc_start_pcf8584(ehcp, EHC_BYTE_READ | byteaddress)) != in ehc_read_pcf8574()
788 ehc_stop_pcf8584(ehcp); in ehc_read_pcf8574()
793 ddi_get8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s0); in ehc_read_pcf8574()
802 if ((status = ehc_read_pcf8584(ehcp, &buf[i])) != EHC_SUCCESS) { in ehc_read_pcf8574()
812 if (ehc_after_read_pcf8584(ehcp, &buf[i]) != EHC_SUCCESS) { in ehc_read_pcf8574()
824 ehc_write_pcf8574(struct ehc_envcunit *ehcp, int byteaddress, uint8_t *buf, in ehc_write_pcf8574() argument
831 ASSERT(MUTEX_HELD(&ehcp->umutex)); in ehc_write_pcf8574()
836 if ((status = ehc_start_pcf8584(ehcp, byteaddress)) != EHC_SUCCESS) { in ehc_write_pcf8574()
841 ehc_stop_pcf8584(ehcp); in ehc_write_pcf8574()
850 if ((status = ehc_write_pcf8584(ehcp, buf[i])) != EHC_SUCCESS) { in ehc_write_pcf8574()
852 ehc_stop_pcf8584(ehcp); in ehc_write_pcf8574()
860 ehc_stop_pcf8584(ehcp); in ehc_write_pcf8574()
870 ehc_read_lm75(struct ehc_envcunit *ehcp, int byteaddress, uint8_t *buf, in ehc_read_lm75() argument
878 ASSERT(MUTEX_HELD(&ehcp->umutex)); in ehc_read_lm75()
883 if ((status = ehc_start_pcf8584(ehcp, EHC_BYTE_READ | byteaddress)) != in ehc_read_lm75()
889 ehc_stop_pcf8584(ehcp); in ehc_read_lm75()
894 ddi_get8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s0); in ehc_read_lm75()
903 if ((status = ehc_read_pcf8584(ehcp, &buf[i])) != EHC_SUCCESS) { in ehc_read_lm75()
912 if (ehc_after_read_pcf8584(ehcp, &buf[i]) != EHC_SUCCESS) { in ehc_read_lm75()
924 ehc_write_pcf8583(struct ehc_envcunit *ehcp, int byteaddress, uint8_t *buf, in ehc_write_pcf8583() argument
931 ASSERT(MUTEX_HELD(&ehcp->umutex)); in ehc_write_pcf8583()
933 if ((status = ehc_start_pcf8584(ehcp, byteaddress)) != EHC_SUCCESS) { in ehc_write_pcf8583()
938 ehc_stop_pcf8584(ehcp); in ehc_write_pcf8583()
947 if ((status = ehc_write_pcf8584(ehcp, buf[i])) != EHC_SUCCESS) { in ehc_write_pcf8583()
949 ehc_stop_pcf8584(ehcp); in ehc_write_pcf8583()
958 ehc_stop_pcf8584(ehcp); in ehc_write_pcf8583()
967 ehc_read_pcf8591(struct ehc_envcunit *ehcp, int byteaddress, int channel, in ehc_read_pcf8591() argument
978 ASSERT(MUTEX_HELD(&ehcp->umutex)); in ehc_read_pcf8591()
989 if ((status = ehc_start_pcf8584(ehcp, byteaddress)) != EHC_SUCCESS) { in ehc_read_pcf8591()
991 ehc_stop_pcf8584(ehcp); in ehc_read_pcf8591()
996 if ((status = ehc_write_pcf8584(ehcp, control)) != EHC_SUCCESS) { in ehc_read_pcf8591()
998 ehc_stop_pcf8584(ehcp); in ehc_read_pcf8591()
1008 ddi_put8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s1, in ehc_read_pcf8591()
1011 ddi_put8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s0, in ehc_read_pcf8591()
1019 ddi_get8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s1); in ehc_read_pcf8591()
1030 ehc_init_pcf8584(ehcp); in ehc_read_pcf8591()
1036 ehc_init_pcf8584(ehcp); in ehc_read_pcf8591()
1045 ehc_stop_pcf8584(ehcp); in ehc_read_pcf8591()
1049 discard = ddi_get8(ehcp->ctlr_handle, &ehcp->bus_ctl_regs->s0); in ehc_read_pcf8591()
1060 if ((status = ehc_read_pcf8584(ehcp, &discard)) != EHC_SUCCESS) { in ehc_read_pcf8591()
1065 if ((status = ehc_read_pcf8584(ehcp, &discard)) != EHC_SUCCESS) { in ehc_read_pcf8591()
1070 if ((status = ehc_read_pcf8584(ehcp, &buf[i])) != EHC_SUCCESS) { in ehc_read_pcf8591()
1075 if (ehc_after_read_pcf8584(ehcp, &buf[i]) != EHC_SUCCESS) { in ehc_read_pcf8591()
1087 ehc_write_pcf8591(struct ehc_envcunit *ehcp, int byteaddress, int channel, in ehc_write_pcf8591() argument
1094 ASSERT(MUTEX_HELD(&ehcp->umutex)); in ehc_write_pcf8591()
1098 status = ehc_start_pcf8584(ehcp, byteaddress); in ehc_write_pcf8591()
1104 ehc_stop_pcf8584(ehcp); in ehc_write_pcf8591()
1109 if ((status = ehc_write_pcf8584(ehcp, control)) != EHC_SUCCESS) { in ehc_write_pcf8591()
1111 ehc_stop_pcf8584(ehcp); in ehc_write_pcf8591()
1116 status = ehc_write_pcf8584(ehcp, buf[i]); in ehc_write_pcf8591()
1119 ehc_stop_pcf8584(ehcp); in ehc_write_pcf8591()
1124 ehc_stop_pcf8584(ehcp); in ehc_write_pcf8591()