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
nexedi
linux
Commits
8fb105f5
Commit
8fb105f5
authored
Jun 25, 2008
by
Ian Molton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PXA UDC - allow use of inverted GPIO for pullup
Signed-off-by:
Ian Molton
<
spyro@f2s.com
>
parent
b3d354b8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
drivers/usb/gadget/pxa25x_udc.c
drivers/usb/gadget/pxa25x_udc.c
+4
-2
include/asm-arm/mach/udc_pxa2xx.h
include/asm-arm/mach/udc_pxa2xx.h
+1
-0
No files found.
drivers/usb/gadget/pxa25x_udc.c
View file @
8fb105f5
...
...
@@ -152,9 +152,10 @@ static int is_vbus_present(void)
static
void
pullup_off
(
void
)
{
struct
pxa2xx_udc_mach_info
*
mach
=
the_controller
->
mach
;
int
off_level
=
mach
->
gpio_pullup_inverted
;
if
(
mach
->
gpio_pullup
)
gpio_set_value
(
mach
->
gpio_pullup
,
0
);
gpio_set_value
(
mach
->
gpio_pullup
,
off_level
);
else
if
(
mach
->
udc_command
)
mach
->
udc_command
(
PXA2XX_UDC_CMD_DISCONNECT
);
}
...
...
@@ -162,9 +163,10 @@ static void pullup_off(void)
static
void
pullup_on
(
void
)
{
struct
pxa2xx_udc_mach_info
*
mach
=
the_controller
->
mach
;
int
on_level
=
!
mach
->
gpio_pullup_inverted
;
if
(
mach
->
gpio_pullup
)
gpio_set_value
(
mach
->
gpio_pullup
,
1
);
gpio_set_value
(
mach
->
gpio_pullup
,
on_level
);
else
if
(
mach
->
udc_command
)
mach
->
udc_command
(
PXA2XX_UDC_CMD_CONNECT
);
}
...
...
include/asm-arm/mach/udc_pxa2xx.h
View file @
8fb105f5
...
...
@@ -23,6 +23,7 @@ struct pxa2xx_udc_mach_info {
*/
bool
gpio_vbus_inverted
;
u16
gpio_vbus
;
/* high == vbus present */
bool
gpio_pullup_inverted
;
u16
gpio_pullup
;
/* high == pullup activated */
};
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