From a250b9fdc53a286d32e22f21170382a46b3a3ef5 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 15 Dec 2010 07:13:55 +1000 Subject: drm: add usb framework This adds an initial framework to plug USB graphics devices into the drm/kms subsystem. I've started writing a displaylink driver using this interface. Signed-off-by: Dave Airlie --- include/drm/drmP.h | 2 ++ include/drm/drm_usb.h | 15 +++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 include/drm/drm_usb.h (limited to 'include') diff --git a/include/drm/drmP.h b/include/drm/drmP.h index a99aefb9537c..52a2fd2f7789 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -925,6 +925,7 @@ struct drm_driver { union { struct pci_driver *pci; struct platform_device *platform_device; + struct usb_driver *usb; } kdriver; struct drm_bus *bus; @@ -1130,6 +1131,7 @@ struct drm_device { #endif struct platform_device *platformdev; /**< Platform device struture */ + struct usb_device *usbdev; struct drm_sg_mem *sg; /**< Scatter gather memory */ int num_crtcs; /**< Number of CRTCs on this device */ diff --git a/include/drm/drm_usb.h b/include/drm/drm_usb.h new file mode 100644 index 000000000000..33506c11da8b --- /dev/null +++ b/include/drm/drm_usb.h @@ -0,0 +1,15 @@ +#ifndef DRM_USB_H +#define DRM_USB_H + +#include + +#include + +extern int drm_usb_init(struct drm_driver *driver, struct usb_driver *udriver); +extern void drm_usb_exit(struct drm_driver *driver, struct usb_driver *udriver); + +int drm_get_usb_dev(struct usb_interface *interface, + const struct usb_device_id *id, + struct drm_driver *driver); + +#endif -- cgit v1.2.2