diff options
author | Lukasz Majewski <l.majewski@samsung.com> | 2012-05-02 13:11:38 +0200 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2012-05-20 08:32:33 +0200 |
commit | 6734b6b2340ea87c275ec090370bc87d9d3cc9d5 (patch) | |
tree | a1987d389e721501c276c103a42c338e312e143f /drivers | |
parent | 4eec44d84ffb6de469891f493481521ec4d992e2 (diff) | |
download | u-boot-imx-6734b6b2340ea87c275ec090370bc87d9d3cc9d5.zip u-boot-imx-6734b6b2340ea87c275ec090370bc87d9d3cc9d5.tar.gz u-boot-imx-6734b6b2340ea87c275ec090370bc87d9d3cc9d5.tar.bz2 |
usb:udc:samsung Add functions for storing private gadget data in UDC driver
This commit adds support for storing private data to Samsung's UDC
driver. This data is afterward used by usb gadget.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Vasut <marex@denx.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/gadget/s3c_udc_otg.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/usb/gadget/s3c_udc_otg.c b/drivers/usb/gadget/s3c_udc_otg.c index 997d0ff..3fdfdf7 100644 --- a/drivers/usb/gadget/s3c_udc_otg.c +++ b/drivers/usb/gadget/s3c_udc_otg.c @@ -30,7 +30,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ - +#undef DEBUG #include <common.h> #include <asm/errno.h> #include <linux/list.h> @@ -125,6 +125,19 @@ static void nuke(struct s3c_ep *ep, int status); static int s3c_udc_set_halt(struct usb_ep *_ep, int value); static void s3c_udc_set_nak(struct s3c_ep *ep); +void set_udc_gadget_private_data(void *p) +{ + debug_cond(DEBUG_SETUP != 0, + "%s: the_controller: 0x%p, p: 0x%p\n", __func__, + the_controller, p); + the_controller->gadget.dev.device_data = p; +} + +void *get_udc_gadget_private_data(struct usb_gadget *gadget) +{ + return gadget->dev.device_data; +} + static struct usb_ep_ops s3c_ep_ops = { .enable = s3c_ep_enable, .disable = s3c_ep_disable, |