Merge branch 'devs/devilhorns/eeze'

eeze: Add ability for Eeze to find DRM cards

Ecore-Drm is going to use Eeze (instead of udev directly) to locate
drm cards and other inputs. As such, I needed the ability (inside
Eeze) to locate devices based on the drm subsystem. This merge adds
code to handle that.

@feature
This commit is contained in:
Chris Michael 2014-09-23 10:04:53 -04:00
commit 5a0e67e81d
3 changed files with 24 additions and 1 deletions

View File

@ -134,6 +134,7 @@
* @li block
* @li bsg
* @li dmi
* @li drm
* @li graphics
* @li hid
* @li hwmon
@ -169,6 +170,7 @@
* @li cd
* @li char
* @li disk
* @li drm_minor
* @li floppy
* @li generic
* @li hid
@ -258,7 +260,11 @@ typedef enum
/** - Joystick
* @since 1.7
*/
EEZE_UDEV_TYPE_JOYSTICK
EEZE_UDEV_TYPE_JOYSTICK,
/** - Drm
* @since 1.12
*/
EEZE_UDEV_TYPE_DRM
} Eeze_Udev_Type;
/**@}*/

View File

@ -235,6 +235,12 @@ eeze_udev_find_by_type(Eeze_Udev_Type etype,
case EEZE_UDEV_TYPE_BLUETOOTH:
udev_enumerate_add_match_subsystem(en, "bluetooth");
break;
case EEZE_UDEV_TYPE_DRM:
udev_enumerate_add_match_subsystem(en, "drm");
udev_enumerate_add_match_subsystem(en, "card[0-9]*");
break;
default:
break;
}

View File

@ -235,6 +235,12 @@ _get_syspath_from_watch(void *data,
goto error;
break;
case EEZE_UDEV_TYPE_DRM:
if ((!(test = udev_device_get_subsystem(device)))
|| (strcmp(test, "drm")))
goto error;
break;
default:
break;
}
@ -315,6 +321,11 @@ eeze_udev_watch_add(Eeze_Udev_Type type,
NULL);
break;
case EEZE_UDEV_TYPE_DRM:
udev_monitor_filter_add_match_subsystem_devtype(mon, "drm_minor",
NULL);
break;
default:
break;
}