Lines Matching defs:ehcp

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