Lower power consumption on suspend.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2017-11-15 NIIBE Yutaka <gniibe@fsij.org>
|
||||||
|
|
||||||
|
* src/usb-ccid.c (usb_event_handle): Allow sleep on suspend.
|
||||||
|
|
||||||
|
* src/usb_ctrl.c (usb_device_reset): Fix device state.
|
||||||
|
|
||||||
2017-11-14 NIIBE Yutaka <gniibe@fsij.org>
|
2017-11-14 NIIBE Yutaka <gniibe@fsij.org>
|
||||||
|
|
||||||
* src/usb-ccid.c (ccid_usb_reset): Remove
|
* src/usb-ccid.c (ccid_usb_reset): Remove
|
||||||
|
|||||||
2
chopstx
2
chopstx
Submodule chopstx updated: 5ac8a1f251...bbe09de209
@@ -1648,10 +1648,12 @@ usb_event_handle (struct usb_dev *dev)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case USB_EVENT_DEVICE_SUSPEND:
|
case USB_EVENT_DEVICE_SUSPEND:
|
||||||
|
chopstx_conf_idle (1);
|
||||||
bDeviceState |= USB_DEVICE_STATE_SUSPEND;
|
bDeviceState |= USB_DEVICE_STATE_SUSPEND;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case USB_EVENT_DEVICE_WAKEUP:
|
case USB_EVENT_DEVICE_WAKEUP:
|
||||||
|
chopstx_conf_idle (0);
|
||||||
bDeviceState &= ~USB_DEVICE_STATE_SUSPEND;
|
bDeviceState &= ~USB_DEVICE_STATE_SUSPEND;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -1731,8 +1733,9 @@ ccid_thread (void *arg)
|
|||||||
|
|
||||||
/* RESET handling:
|
/* RESET handling:
|
||||||
* (1) After DEVICE_RESET, it needs to re-start out of the loop.
|
* (1) After DEVICE_RESET, it needs to re-start out of the loop.
|
||||||
* (2) After SET_INTERFACE, the endpoint is reset to RX_NAK.
|
* (2) After SET_CONFIGURATION or SET_INTERFACE, the
|
||||||
* It needs to prepare receive again.
|
* endpoint is reset to RX_NAK. It needs to prepare
|
||||||
|
* receive again.
|
||||||
*/
|
*/
|
||||||
if (c->application)
|
if (c->application)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ usb_device_reset (struct usb_dev *dev)
|
|||||||
for (i = 0; i < NUM_INTERFACES; i++)
|
for (i = 0; i < NUM_INTERFACES; i++)
|
||||||
gnuk_setup_endpoints_for_interface (dev, i, 1);
|
gnuk_setup_endpoints_for_interface (dev, i, 1);
|
||||||
|
|
||||||
bDeviceState = USB_DEVICE_STATE_ATTACHED;
|
bDeviceState = USB_DEVICE_STATE_DEFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define USB_CCID_REQ_ABORT 0x01
|
#define USB_CCID_REQ_ABORT 0x01
|
||||||
|
|||||||
Reference in New Issue
Block a user