536 ddi_soft_state_free(pcf8574soft_statep, instance);
537
538 return (DDI_FAILURE);
539 }
540
541 err = ddi_prop_lookup_int_array(DDI_DEV_T_ANY, dip,
542 DDI_PROP_DONTPASS,
543 "reg", (int **)®s, &len);
544 if (err != DDI_PROP_SUCCESS) {
545 return (DDI_FAILURE);
546 }
547
548 /*
549 * regs[0] contains the bus number and regs[1] contains the device
550 * address of the i2c device. 0x7c is the device address of the
551 * i2c device from which the key switch position is read.
552 */
553 if (regs[0] == 0 && regs[1] == 0x7c) {
554 abort_seq_handler = littleneck_abort_seq_handler;
555 keypoll_timeout_hz =
556 drv_usectohz(LNECK_KEY_POLL_INTVL * MICROSEC);
557 littleneck_ks_poll(unitp);
558 }
559
560 ddi_prop_free(regs);
561
562 mutex_init(&unitp->pcf8574_mutex, NULL, MUTEX_DRIVER, NULL);
563
564 return (DDI_SUCCESS);
565 }
566
567 static int
568 pcf8574_do_resume()
569 {
570 int ret = DDI_SUCCESS;
571
572 return (ret);
573 }
574
575 static int
576 pcf8574_do_suspend()
|
536 ddi_soft_state_free(pcf8574soft_statep, instance);
537
538 return (DDI_FAILURE);
539 }
540
541 err = ddi_prop_lookup_int_array(DDI_DEV_T_ANY, dip,
542 DDI_PROP_DONTPASS,
543 "reg", (int **)®s, &len);
544 if (err != DDI_PROP_SUCCESS) {
545 return (DDI_FAILURE);
546 }
547
548 /*
549 * regs[0] contains the bus number and regs[1] contains the device
550 * address of the i2c device. 0x7c is the device address of the
551 * i2c device from which the key switch position is read.
552 */
553 if (regs[0] == 0 && regs[1] == 0x7c) {
554 abort_seq_handler = littleneck_abort_seq_handler;
555 keypoll_timeout_hz =
556 drv_sectohz(LNECK_KEY_POLL_INTVL);
557 littleneck_ks_poll(unitp);
558 }
559
560 ddi_prop_free(regs);
561
562 mutex_init(&unitp->pcf8574_mutex, NULL, MUTEX_DRIVER, NULL);
563
564 return (DDI_SUCCESS);
565 }
566
567 static int
568 pcf8574_do_resume()
569 {
570 int ret = DDI_SUCCESS;
571
572 return (ret);
573 }
574
575 static int
576 pcf8574_do_suspend()
|