Skip to contentSkip to conversation

usb:udc:samsung Add functions for storing private gadget data in UDC driver

PATCH New Lukasz Majewski 3 participants 5 messages Apr 12, 2012 – Apr 16, 2012 USB

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/usb/gadget/s3c_udc_otg.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
drivers/usb/gadget/s3c_udc_otg.c +12 -0
index f7f7b54..cb4916c 100644
@@ -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)
+{
+	printf("%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,
Signature · 1 line
1.7.2.3
#1 lore raw

PATCH 1/1 usb:udc:samsung Add functions for storing private gadget data in UDC driver

Dear Lukasz Majewski,

Quoted 20 lines

This commit adds support for storing private data to Samsung's UDC driver. This data is afterward used by usb gadget.

---
 drivers/usb/gadget/s3c_udc_otg.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/drivers/usb/gadget/s3c_udc_otg.c index f7f7b54..cb4916c 100644

drivers/usb/gadget/s3c_udc_otg.c +2 -0
@@ -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)
+{

drivers/usb/gadget/s3c_udc_otg.c static void nuke(struct s3c_ep *ep, int status); · line 147

Quoted 10 lines
drivers/usb/gadget/s3c_udc_otg.c +10 -0
+	printf("%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;
+}
+

Is this part of some bigger patchset or are you simply adding dead code?

drivers/usb/gadget/s3c_udc_otg.c static void nuke(struct s3c_ep *ep, int status); · line 150

Quoted 3 lines
drivers/usb/gadget/s3c_udc_otg.c +0 -0
 static struct usb_ep_ops s3c_ep_ops = {
 	.enable = s3c_ep_enable,
 	.disable = s3c_ep_disable,

Best regards,
Marek Vasut

#2 lore raw

PATCH 1/1 usb:udc:samsung Add functions for storing private gadget data in UDC driver

Hi Marek Vasut,

Quoted 20 lines

Dear Lukasz Majewski,

Quoted 18 lines

This commit adds support for storing private data to Samsung's UDC driver. This data is afterward used by usb gadget.

---
 drivers/usb/gadget/s3c_udc_otg.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/drivers/usb/gadget/s3c_udc_otg.c index f7f7b54..cb4916c 100644

drivers/usb/gadget/s3c_udc_otg.c +0 -0
@@ -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);
 
Quoted 15 lines

drivers/usb/gadget/s3c_udc_otg.c static void nuke(struct s3c_ep *ep, int status); · line 147

Quoted 12 lines
drivers/usb/gadget/s3c_udc_otg.c +12 -0
+void set_udc_gadget_private_data(void *p)
+{
+	printf("%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;
+}
+

Is this part of some bigger patchset or are you simply adding dead code?

Yes, this is the part of a bigger patchset :-) - the composite gadget (g_dnl) requires this change.

e.g.

http://patchwork.ozlabs.org/patch/151989/

Quoted 7 lines

drivers/usb/gadget/s3c_udc_otg.c static void nuke(struct s3c_ep *ep, int status); · line 150

Quoted 4 lines
drivers/usb/gadget/s3c_udc_otg.c +0 -0
 static struct usb_ep_ops s3c_ep_ops = {
 	.enable = s3c_ep_enable,
 	.disable = s3c_ep_disable,

Best regards,
Marek Vasut

Signature · 6 lines
Best regards,

Lukasz Majewski

Samsung Poland R&D Center
Platform Group
#3 lore raw

PATCH 1/1 usb:udc:samsung Add functions for storing private gadget data in UDC driver

Dear Lukasz Majewski,

Quoted 40 lines

Hi Marek Vasut,

Quoted 22 lines

Dear Lukasz Majewski,

Quoted 20 lines

This commit adds support for storing private data to Samsung's UDC driver. This data is afterward used by usb gadget.

---

 drivers/usb/gadget/s3c_udc_otg.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/drivers/usb/gadget/s3c_udc_otg.c index f7f7b54..cb4916c 100644

drivers/usb/gadget/s3c_udc_otg.c +0 -0
@@ -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);
 
Quoted 15 lines

drivers/usb/gadget/s3c_udc_otg.c static void nuke(struct s3c_ep *ep, int status); · line 147

Quoted 12 lines
drivers/usb/gadget/s3c_udc_otg.c +12 -0
+void set_udc_gadget_private_data(void *p)
+{
+	printf("%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;
+}
+

Is this part of some bigger patchset or are you simply adding dead code?

Quoted 6 lines

Yes, this is the part of a bigger patchset :-) - the composite gadget (g_dnl) requires this change.

e.g.

http://patchwork.ozlabs.org/patch/151989/

Can you please make it into a patchset then? You know -- so we all know what this is part of.

Quoted 8 lines
Quoted 8 lines

drivers/usb/gadget/s3c_udc_otg.c static void nuke(struct s3c_ep *ep, int status); · line 150

Quoted 5 lines
drivers/usb/gadget/s3c_udc_otg.c +0 -0
 static struct usb_ep_ops s3c_ep_ops = {
 
drivers/usb/gadget/s3c_udc_otg.c +0 -0
 	.enable = s3c_ep_enable,
 	.disable = s3c_ep_disable,

Best regards,
Marek Vasut

Best regards,
Marek Vasut

#4 lore raw

PATCH 1/1 usb:udc:samsung Add functions for storing private gadget data in UDC driver

In reply to Lukasz Majewski

Dear Lukasz Majewski,

Quoted 6 lines · In message <[email protected]> you wrote:

This commit adds support for storing private data to Samsung's UDC driver. This data is afterward used by usb gadget.

...

drivers/usb/gadget/s3c_udc_otg.c static void nuke(struct s3c_ep *ep, int status); · line 138

Quoted 3 lines
drivers/usb/gadget/s3c_udc_otg.c +3 -0
+void set_udc_gadget_private_data(void *p)
+{
+	printf("%s: the_controller: 0x%p, p: 0x%p\n", __func__,

s/printf/debug/ ??

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
You Don't Have To Be 'Damned' To Work Here, But It Helps!!!
                                             - Terry Pratchett, _Eric_