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
e1641c9d
Commit
e1641c9d
authored
Apr 01, 2016
by
Linus Walleij
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Revert "pinctrl: lantiq: Implement gpio_chip.to_irq""
This reverts commit
446f59ac
.
parent
a9b0b1fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
drivers/pinctrl/pinctrl-xway.c
drivers/pinctrl/pinctrl-xway.c
+17
-0
No files found.
drivers/pinctrl/pinctrl-xway.c
View file @
e1641c9d
...
...
@@ -1573,6 +1573,22 @@ static int xway_gpio_dir_out(struct gpio_chip *chip, unsigned int pin, int val)
return
0
;
}
/*
* gpiolib gpiod_to_irq callback function.
* Returns the mapped IRQ (external interrupt) number for a given GPIO pin.
*/
static
int
xway_gpio_to_irq
(
struct
gpio_chip
*
chip
,
unsigned
offset
)
{
struct
ltq_pinmux_info
*
info
=
dev_get_drvdata
(
chip
->
parent
);
int
i
;
for
(
i
=
0
;
i
<
info
->
num_exin
;
i
++
)
if
(
info
->
exin
[
i
]
==
offset
)
return
ltq_eiu_get_irq
(
i
);
return
-
1
;
}
static
struct
gpio_chip
xway_chip
=
{
.
label
=
"gpio-xway"
,
.
direction_input
=
xway_gpio_dir_in
,
...
...
@@ -1581,6 +1597,7 @@ static struct gpio_chip xway_chip = {
.
set
=
xway_gpio_set
,
.
request
=
gpiochip_generic_request
,
.
free
=
gpiochip_generic_free
,
.
to_irq
=
xway_gpio_to_irq
,
.
base
=
-
1
,
};
...
...
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