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
c09f431c
Commit
c09f431c
authored
Apr 20, 2010
by
Eric Miao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ARM] pxa: allow keypad GPIOs to wakeup when configured as generic
Signed-off-by:
Eric Miao
<
eric.y.miao@gmail.com
>
parent
1106143d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
9 deletions
+22
-9
arch/arm/mach-pxa/mfp-pxa2xx.c
arch/arm/mach-pxa/mfp-pxa2xx.c
+22
-9
No files found.
arch/arm/mach-pxa/mfp-pxa2xx.c
View file @
c09f431c
...
@@ -178,8 +178,17 @@ int gpio_set_wake(unsigned int gpio, unsigned int on)
...
@@ -178,8 +178,17 @@ int gpio_set_wake(unsigned int gpio, unsigned int on)
if
(
!
d
->
valid
)
if
(
!
d
->
valid
)
return
-
EINVAL
;
return
-
EINVAL
;
if
(
d
->
keypad_gpio
)
/* Allow keypad GPIOs to wakeup system when
return
-
EINVAL
;
* configured as generic GPIOs.
*/
if
(
d
->
keypad_gpio
&&
(
MFP_AF
(
d
->
config
)
==
0
)
&&
(
d
->
config
&
MFP_LPM_CAN_WAKEUP
))
{
if
(
on
)
PKWR
|=
d
->
mask
;
else
PKWR
&=
~
d
->
mask
;
return
0
;
}
mux_taken
=
(
PWER
&
d
->
mux_mask
)
&
(
~
d
->
mask
);
mux_taken
=
(
PWER
&
d
->
mux_mask
)
&
(
~
d
->
mask
);
if
(
on
&&
mux_taken
)
if
(
on
&&
mux_taken
)
...
@@ -239,21 +248,25 @@ static int pxa27x_pkwr_gpio[] = {
...
@@ -239,21 +248,25 @@ static int pxa27x_pkwr_gpio[] = {
int
keypad_set_wake
(
unsigned
int
on
)
int
keypad_set_wake
(
unsigned
int
on
)
{
{
unsigned
int
i
,
gpio
,
mask
=
0
;
unsigned
int
i
,
gpio
,
mask
=
0
;
struct
gpio_desc
*
d
;
if
(
!
on
)
{
PKWR
=
0
;
return
0
;
}
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
pxa27x_pkwr_gpio
);
i
++
)
{
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
pxa27x_pkwr_gpio
);
i
++
)
{
gpio
=
pxa27x_pkwr_gpio
[
i
];
gpio
=
pxa27x_pkwr_gpio
[
i
];
d
=
&
gpio_desc
[
gpio
];
if
(
gpio_desc
[
gpio
].
config
&
MFP_LPM_CAN_WAKEUP
)
/* skip if configured as generic GPIO */
if
(
MFP_AF
(
d
->
config
)
==
0
)
continue
;
if
(
d
->
config
&
MFP_LPM_CAN_WAKEUP
)
mask
|=
gpio_desc
[
gpio
].
mask
;
mask
|=
gpio_desc
[
gpio
].
mask
;
}
}
PKWR
=
mask
;
if
(
on
)
PKWR
|=
mask
;
else
PKWR
&=
~
mask
;
return
0
;
return
0
;
}
}
...
...
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