synaptics: Remove usb reset
It will trigger firmware to do some activities, remove it in device open and device probe.
This commit is contained in:
parent
e7eaecedc6
commit
dbd20ec669
1 changed files with 2 additions and 7 deletions
|
@ -1158,7 +1158,8 @@ prob_msg_cb (FpiDeviceSynaptics *self,
|
||||||
g_usb_device_get_serial_number_index (usb_dev),
|
g_usb_device_get_serial_number_index (usb_dev),
|
||||||
&error);
|
&error);
|
||||||
|
|
||||||
if (resp->result == BMKT_SUCCESS)
|
/* BMKT_OPERATION_DENIED is returned if the sensor is already initialized */
|
||||||
|
if (resp->result == BMKT_SUCCESS || resp->result == BMKT_OPERATION_DENIED)
|
||||||
{
|
{
|
||||||
g_usb_device_close (usb_dev, NULL);
|
g_usb_device_close (usb_dev, NULL);
|
||||||
fpi_device_probe_complete (FP_DEVICE (self), serial, NULL, error);
|
fpi_device_probe_complete (FP_DEVICE (self), serial, NULL, error);
|
||||||
|
@ -1196,9 +1197,6 @@ dev_probe (FpDevice *device)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!g_usb_device_reset (usb_dev, &error))
|
|
||||||
goto err_close;
|
|
||||||
|
|
||||||
if (!g_usb_device_claim_interface (usb_dev, 0, 0, &error))
|
if (!g_usb_device_claim_interface (usb_dev, 0, 0, &error))
|
||||||
goto err_close;
|
goto err_close;
|
||||||
|
|
||||||
|
@ -1342,9 +1340,6 @@ dev_init (FpDevice *device)
|
||||||
|
|
||||||
self->interrupt_cancellable = g_cancellable_new ();
|
self->interrupt_cancellable = g_cancellable_new ();
|
||||||
|
|
||||||
if (!g_usb_device_reset (fpi_device_get_usb_device (device), &error))
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
/* Claim usb interface */
|
/* Claim usb interface */
|
||||||
if (!g_usb_device_claim_interface (fpi_device_get_usb_device (device), 0, 0, &error))
|
if (!g_usb_device_claim_interface (fpi_device_get_usb_device (device), 0, 0, &error))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
Loading…
Reference in a new issue