From patchwork Tue Apr 17 14:07:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?=C5=81ukasz_Majewski?= X-Patchwork-Id: 153186 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 2B894B705C for ; Wed, 18 Apr 2012 00:08:08 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 68CFE28093; Tue, 17 Apr 2012 16:07:49 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Y9n5HbPvLUKt; Tue, 17 Apr 2012 16:07:49 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F105728094; Tue, 17 Apr 2012 16:07:35 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7A2BD28084 for ; Tue, 17 Apr 2012 16:07:32 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PVBT1eLcqsoC for ; Tue, 17 Apr 2012 16:07:30 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by theia.denx.de (Postfix) with ESMTP id 7794728086 for ; Tue, 17 Apr 2012 16:07:29 +0200 (CEST) Received: from euspt1 (mailout1.w1.samsung.com [210.118.77.11]) by mailout1.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0M2M00CYVN6D7O@mailout1.w1.samsung.com> for u-boot@lists.denx.de; Tue, 17 Apr 2012 15:06:13 +0100 (BST) Received: from linux.samsung.com ([106.116.38.10]) by spt1.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0M2M0047UN8D3Y@spt1.w1.samsung.com> for u-boot@lists.denx.de; Tue, 17 Apr 2012 15:07:25 +0100 (BST) Received: from mcdsrvbld02.digital.local (unknown [106.116.37.23]) by linux.samsung.com (Postfix) with ESMTP id B73E9270056; Tue, 17 Apr 2012 16:19:39 +0200 (CEST) Date: Tue, 17 Apr 2012 16:07:21 +0200 From: Lukasz Majewski In-reply-to: <1334671641-644-1-git-send-email-l.majewski@samsung.com> To: u-boot@lists.denx.de Message-id: <1334671641-644-4-git-send-email-l.majewski@samsung.com> MIME-version: 1.0 X-Mailer: git-send-email 1.7.9.1 References: <1334214931-19480-1-git-send-email-l.majewski@samsung.com> <1334671641-644-1-git-send-email-l.majewski@samsung.com> Cc: Marek Vasut , Kyungmin Park Subject: [U-Boot] [PATCH v3 3/3] usb:udc:samsung Add functions for storing private gadget data in UDC driver X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 Signed-off-by: Kyungmin Park Cc: Marek Vasut --- drivers/usb/gadget/s3c_udc_otg.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/drivers/usb/gadget/s3c_udc_otg.c b/drivers/usb/gadget/s3c_udc_otg.c index f7f7b54..925d2f2 100644 --- a/drivers/usb/gadget/s3c_udc_otg.c +++ b/drivers/usb/gadget/s3c_udc_otg.c @@ -133,6 +133,18 @@ 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_SETUP("%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,