Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
a7f52de5
Commit
a7f52de5
authored
Jan 27, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/gregkh/linux/usb-2.6
into home.osdl.org:/home/torvalds/v2.5/linux
parents
8a4ebbc8
de0bee2f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
53 deletions
+14
-53
drivers/usb/gadget/Kconfig
drivers/usb/gadget/Kconfig
+0
-48
drivers/usb/gadget/inode.c
drivers/usb/gadget/inode.c
+14
-5
No files found.
drivers/usb/gadget/Kconfig
View file @
a7f52de5
...
...
@@ -124,33 +124,6 @@ config USB_SA1100
depends on USB_GADGET_SA1100
default USB_GADGET
config USB_GADGET_DUMMY_HCD
boolean "Dummy HCD (DEVELOPMENT)"
depends on USB
help
This host controller driver emulates USB, looping all data transfer
requests back to a USB "gadget driver" in the same host. The host
side is the master; the gadget side is the slave. Gadget drivers
can be high, full, or low speed; and they have access to endpoints
like those from NET2280, PXA2xx, or SA1100 hardware.
This may help in some stages of creating a driver to embed in a
Linux device, since it lets you debug several parts of the gadget
driver without its hardware or drivers being involved.
Since such a gadget side driver needs to interoperate with a host
side Linux-USB device driver, this may help to debug both sides
of a USB protocol stack.
Say "y" to link the driver statically, or "m" to build a
dynamically linked module called "dummy_hcd" and force all
gadget drivers to also be dynamically linked.
config USB_DUMMY_HCD
tristate
depends on USB_GADGET_DUMMY_HCD
default USB_GADGET
endchoice
...
...
@@ -268,27 +241,6 @@ config USB_G_SERIAL
# - none yet
config USB_G_SERIAL
tristate "serial Gadget"
depends on USB_GADGET && (USB_DUMMY_HCD || USB_NET2280 || USB_PXA2XX || USB_SA1100)
config USB_G_SERIAL_NET2280
bool
# for now, treat the "dummy" hcd as if it were a net2280
depends on USB_G_SERIAL && (USB_NET2280 || USB_DUMMY_HCD)
default y
config USB_G_SERIAL_PXA2XX
bool
depends on USB_G_SERIAL && USB_PXA2XX
default y
config USB_G_SERIAL_SA1100
bool
depends on USB_G_SERIAL && USB_SA1100
default y
endchoice
endmenu
drivers/usb/gadget/inode.c
View file @
a7f52de5
...
...
@@ -232,18 +232,27 @@ static void put_ep (struct ep_data *data)
* the usb controller exposes.
*/
#ifdef CONFIG_USB_GADGETFS_NET2280
#ifdef CONFIG_USB_GADGET_DUMMY_HCD
/* act (mostly) like a net2280 */
#define CONFIG_USB_GADGET_NET2280
#endif
#ifdef CONFIG_USB_GADGET_NET2280
#define CHIP "net2280"
#define HIGHSPEED
#endif
#ifdef CONFIG_USB_GADGET
FS
_PXA2XX
#ifdef CONFIG_USB_GADGET_PXA2XX
#define CHIP "pxa2xx_udc"
/* earlier hardware doesn't have UDCCFR, races set_{config,interface} */
#warning works best with pxa255 or newer
#endif
#ifdef CONFIG_USB_GADGETFS_SA1100
#ifdef CONFIG_USB_GADGET_GOKU
#define CHIP "goku_udc"
#endif
#ifdef CONFIG_USB_GADGET_SA1100
#define CHIP "sa1100"
#endif
...
...
@@ -397,7 +406,7 @@ ep_io (struct ep_data *epdata, void *buf, unsigned len)
/* handle a synchronous OUT bulk/intr/iso transfer */
static
ssize_t
ep_read
(
struct
file
*
fd
,
char
*
buf
,
size_t
len
,
loff_t
*
ptr
)
ep_read
(
struct
file
*
fd
,
char
__user
*
buf
,
size_t
len
,
loff_t
*
ptr
)
{
struct
ep_data
*
data
=
fd
->
private_data
;
void
*
kbuf
;
...
...
@@ -441,7 +450,7 @@ ep_read (struct file *fd, char *buf, size_t len, loff_t *ptr)
/* handle a synchronous IN bulk/intr/iso transfer */
static
ssize_t
ep_write
(
struct
file
*
fd
,
const
char
*
buf
,
size_t
len
,
loff_t
*
ptr
)
ep_write
(
struct
file
*
fd
,
const
char
__user
*
buf
,
size_t
len
,
loff_t
*
ptr
)
{
struct
ep_data
*
data
=
fd
->
private_data
;
void
*
kbuf
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment