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
32b01a36
Commit
32b01a36
authored
Nov 07, 2012
by
Jean-Christophe PLAGNIOL-VILLARD
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pinctrl: at91: provide gpio names
Signed-off-by:
Jean-Christophe PLAGNIOL-VILLARD
<
plagnioj@jcrosoft.com
>
parent
f6f94f66
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
drivers/pinctrl/pinctrl-at91.c
drivers/pinctrl/pinctrl-at91.c
+14
-1
No files found.
drivers/pinctrl/pinctrl-at91.c
View file @
32b01a36
...
...
@@ -1364,9 +1364,10 @@ static int __devinit at91_gpio_probe(struct platform_device *pdev)
struct
gpio_chip
*
chip
;
struct
pinctrl_gpio_range
*
range
;
int
ret
=
0
;
int
irq
;
int
irq
,
i
;
int
alias_idx
=
of_alias_get_id
(
np
,
"gpio"
);
uint32_t
ngpio
;
char
**
names
;
BUG_ON
(
alias_idx
>=
ARRAY_SIZE
(
gpio_chips
));
if
(
gpio_chips
[
alias_idx
])
{
...
...
@@ -1436,6 +1437,18 @@ static int __devinit at91_gpio_probe(struct platform_device *pdev)
chip
->
ngpio
=
ngpio
;
}
names
=
devm_kzalloc
(
&
pdev
->
dev
,
sizeof
(
char
*
)
*
chip
->
ngpio
,
GFP_KERNEL
);
if
(
!
names
)
{
ret
=
-
ENOMEM
;
goto
clk_err
;
}
for
(
i
=
0
;
i
<
chip
->
ngpio
;
i
++
)
names
[
i
]
=
kasprintf
(
GFP_KERNEL
,
"pio%c%d"
,
alias_idx
+
'A'
,
i
);
chip
->
names
=
(
const
char
*
const
*
)
names
;
range
=
&
at91_chip
->
range
;
range
->
name
=
chip
->
label
;
range
->
id
=
alias_idx
;
...
...
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