drivers: Print some debug when we can't find the trigger

This commit is contained in:
Bastien Nocera
2021-01-20 15:54:44 +01:00
parent 7591a2a76e
commit 132b30a337
3 changed files with 9 additions and 3 deletions

View File

@@ -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 */
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;
}
g_free (trigger_name);
g_debug ("Found IIO buffer accelerometer at %s", g_udev_device_get_sysfs_path (device));

View File

@@ -157,8 +157,10 @@ iio_buffer_compass_open (GUdevDevice *device)
/* Get the trigger name, and build the channels from that */
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;
}
buffer_data = buffer_drv_data_new (device, trigger_name);
if (!buffer_data)

View File

@@ -184,8 +184,10 @@ iio_buffer_light_open (GUdevDevice *device)
/* Get the trigger name, and build the channels from that */
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;
}
buffer_data = buffer_drv_data_new (device, trigger_name);
if (!buffer_data)
return NULL;