summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2014-09-23 10:04:53 -0400
committerChris Michael <cp.michael@samsung.com>2014-09-23 10:04:53 -0400
commit5a0e67e81d0603e4d4c397f47ea4ca3f0af4ae1d (patch)
tree36aea4cdae8b7aa00469f5017d50a6b8b88f3a12
parentb33372b1f6191c4d671cff0e0a96cda5dd000f50 (diff)
parente597f0b30b1dcf2e1bc5a0daa8398c146edca1c3 (diff)
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
-rw-r--r--src/lib/eeze/Eeze.h8
-rw-r--r--src/lib/eeze/eeze_udev_find.c6
-rw-r--r--src/lib/eeze/eeze_udev_watch.c11
3 files changed, 24 insertions, 1 deletions
diff --git a/src/lib/eeze/Eeze.h b/src/lib/eeze/Eeze.h
index 5b25d6a..65e90bd 100644
--- a/src/lib/eeze/Eeze.h
+++ b/src/lib/eeze/Eeze.h
@@ -134,6 +134,7 @@
134 * @li block 134 * @li block
135 * @li bsg 135 * @li bsg
136 * @li dmi 136 * @li dmi
137 * @li drm
137 * @li graphics 138 * @li graphics
138 * @li hid 139 * @li hid
139 * @li hwmon 140 * @li hwmon
@@ -169,6 +170,7 @@
169 * @li cd 170 * @li cd
170 * @li char 171 * @li char
171 * @li disk 172 * @li disk
173 * @li drm_minor
172 * @li floppy 174 * @li floppy
173 * @li generic 175 * @li generic
174 * @li hid 176 * @li hid
@@ -258,7 +260,11 @@ typedef enum
258 /** - Joystick 260 /** - Joystick
259 * @since 1.7 261 * @since 1.7
260 */ 262 */
261 EEZE_UDEV_TYPE_JOYSTICK 263 EEZE_UDEV_TYPE_JOYSTICK,
264 /** - Drm
265 * @since 1.12
266 */
267 EEZE_UDEV_TYPE_DRM
262} Eeze_Udev_Type; 268} Eeze_Udev_Type;
263/**@}*/ 269/**@}*/
264 270
diff --git a/src/lib/eeze/eeze_udev_find.c b/src/lib/eeze/eeze_udev_find.c
index 805f4e6..71aa30b 100644
--- a/src/lib/eeze/eeze_udev_find.c
+++ b/src/lib/eeze/eeze_udev_find.c
@@ -235,6 +235,12 @@ eeze_udev_find_by_type(Eeze_Udev_Type etype,
235 case EEZE_UDEV_TYPE_BLUETOOTH: 235 case EEZE_UDEV_TYPE_BLUETOOTH:
236 udev_enumerate_add_match_subsystem(en, "bluetooth"); 236 udev_enumerate_add_match_subsystem(en, "bluetooth");
237 break; 237 break;
238
239 case EEZE_UDEV_TYPE_DRM:
240 udev_enumerate_add_match_subsystem(en, "drm");
241 udev_enumerate_add_match_subsystem(en, "card[0-9]*");
242 break;
243
238 default: 244 default:
239 break; 245 break;
240 } 246 }
diff --git a/src/lib/eeze/eeze_udev_watch.c b/src/lib/eeze/eeze_udev_watch.c
index 6ff9e85..c51f396 100644
--- a/src/lib/eeze/eeze_udev_watch.c
+++ b/src/lib/eeze/eeze_udev_watch.c
@@ -235,6 +235,12 @@ _get_syspath_from_watch(void *data,
235 goto error; 235 goto error;
236 break; 236 break;
237 237
238 case EEZE_UDEV_TYPE_DRM:
239 if ((!(test = udev_device_get_subsystem(device)))
240 || (strcmp(test, "drm")))
241 goto error;
242
243 break;
238 default: 244 default:
239 break; 245 break;
240 } 246 }
@@ -315,6 +321,11 @@ eeze_udev_watch_add(Eeze_Udev_Type type,
315 NULL); 321 NULL);
316 break; 322 break;
317 323
324 case EEZE_UDEV_TYPE_DRM:
325 udev_monitor_filter_add_match_subsystem_devtype(mon, "drm_minor",
326 NULL);
327 break;
328
318 default: 329 default:
319 break; 330 break;
320 } 331 }