drivers: Print some debug when we can't find the trigger
This commit is contained in:
@@ -168,8 +168,10 @@ iio_buffer_accel_discover (GUdevDevice *device)
|
|||||||
|
|
||||||
/* If we can't find an associated trigger, fallback to the iio-poll-accel driver */
|
/* If we can't find an associated trigger, fallback to the iio-poll-accel driver */
|
||||||
trigger_name = get_trigger_name (device);
|
trigger_name = get_trigger_name (device);
|
||||||
if (!trigger_name)
|
if (!trigger_name) {
|
||||||
|
g_debug ("Could not find trigger for %s", g_udev_device_get_sysfs_path (device));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
g_free (trigger_name);
|
g_free (trigger_name);
|
||||||
|
|
||||||
g_debug ("Found IIO buffer accelerometer at %s", g_udev_device_get_sysfs_path (device));
|
g_debug ("Found IIO buffer accelerometer at %s", g_udev_device_get_sysfs_path (device));
|
||||||
|
@@ -157,8 +157,10 @@ iio_buffer_compass_open (GUdevDevice *device)
|
|||||||
|
|
||||||
/* Get the trigger name, and build the channels from that */
|
/* Get the trigger name, and build the channels from that */
|
||||||
trigger_name = get_trigger_name (device);
|
trigger_name = get_trigger_name (device);
|
||||||
if (!trigger_name)
|
if (!trigger_name) {
|
||||||
|
g_debug ("Could not find trigger for %s", g_udev_device_get_sysfs_path (device));
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
buffer_data = buffer_drv_data_new (device, trigger_name);
|
buffer_data = buffer_drv_data_new (device, trigger_name);
|
||||||
if (!buffer_data)
|
if (!buffer_data)
|
||||||
|
@@ -184,8 +184,10 @@ iio_buffer_light_open (GUdevDevice *device)
|
|||||||
|
|
||||||
/* Get the trigger name, and build the channels from that */
|
/* Get the trigger name, and build the channels from that */
|
||||||
trigger_name = get_trigger_name (device);
|
trigger_name = get_trigger_name (device);
|
||||||
if (!trigger_name)
|
if (!trigger_name) {
|
||||||
|
g_debug ("Could not find trigger for %s", g_udev_device_get_sysfs_path (device));
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
buffer_data = buffer_drv_data_new (device, trigger_name);
|
buffer_data = buffer_drv_data_new (device, trigger_name);
|
||||||
if (!buffer_data)
|
if (!buffer_data)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Reference in New Issue
Block a user