Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
e21ff927
Commit
e21ff927
authored
Feb 09, 2006
by
Juha Yrjola
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARM: OMAP: Have the gpio-switch driver use SA_TRIGGER_ flags
parent
306f83a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
arch/arm/plat-omap/gpio-switch.c
arch/arm/plat-omap/gpio-switch.c
+7
-8
No files found.
arch/arm/plat-omap/gpio-switch.c
View file @
e21ff927
...
...
@@ -142,7 +142,7 @@ static void gpio_sw_handler(void *data)
static
int
__init
new_switch
(
struct
gpio_switch
*
sw
)
{
int
r
,
direction
;
int
r
,
direction
,
trigger
;
sw
->
pdev
.
name
=
sw
->
name
;
sw
->
pdev
.
id
=
-
1
;
...
...
@@ -166,11 +166,6 @@ static int __init new_switch(struct gpio_switch *sw)
direction
=
!
(
sw
->
flags
&
OMAP_GPIO_SWITCH_FLAG_OUTPUT
);
omap_set_gpio_direction
(
sw
->
gpio
,
direction
);
if
(
omap_get_gpio_datain
(
sw
->
gpio
))
set_irq_type
(
OMAP_GPIO_IRQ
(
sw
->
gpio
),
IRQT_FALLING
);
else
set_irq_type
(
OMAP_GPIO_IRQ
(
sw
->
gpio
),
IRQT_RISING
);
switch
(
sw
->
type
)
{
case
OMAP_GPIO_SWITCH_TYPE_COVER
:
device_create_file
(
&
sw
->
pdev
.
dev
,
&
dev_attr_cover_switch
);
...
...
@@ -185,8 +180,12 @@ static int __init new_switch(struct gpio_switch *sw)
if
(
!
direction
)
return
0
;
r
=
request_irq
(
OMAP_GPIO_IRQ
(
sw
->
gpio
),
gpio_sw_irq_handler
,
SA_SHIRQ
,
sw
->
name
,
sw
);
if
(
omap_get_gpio_datain
(
sw
->
gpio
))
trigger
=
SA_TRIGGER_FALLING
;
else
trigger
=
SA_TRIGGER_RISING
;
r
=
request_irq
(
OMAP_GPIO_IRQ
(
sw
->
gpio
),
gpio_sw_irq_handler
,
SA_SHIRQ
|
trigger
,
sw
->
name
,
sw
);
if
(
r
<
0
)
{
printk
(
KERN_ERR
"gpio-switch: request_irq() failed "
"for GPIO %d
\n
"
,
sw
->
gpio
);
...
...
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