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
fe4a6485
Commit
fe4a6485
authored
Jan 22, 2019
by
Linus Walleij
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ib-meson-fixes' into devel
parents
40e37958
64856974
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
13 deletions
+22
-13
Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt
Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt
+5
-5
drivers/pinctrl/meson/pinctrl-meson.c
drivers/pinctrl/meson/pinctrl-meson.c
+16
-8
drivers/pinctrl/meson/pinctrl-meson.h
drivers/pinctrl/meson/pinctrl-meson.h
+1
-0
No files found.
Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt
View file @
fe4a6485
...
...
@@ -23,11 +23,11 @@ The GPIO bank for the controller is represented as a sub-node and it acts as a
GPIO controller.
Required properties for sub-nodes are:
- reg: should contain a
ddress and size for mux, pull-enable, pull and
gpio register sets
- reg-names: an array of strings describing the "reg" entries.
Must
contain "mux", "pull" and "gpio". "pull-enable" is optional and
when it is missing the "pull" registers are used instead
- reg: should contain a
list of address and size, one tuple for each entry
in reg-names.
- reg-names: an array of strings describing the "reg" entries.
Must contain "mux" and "gpio".
May contain "pull", "pull-enable" and "ds" when appropriate.
- gpio-controller: identifies the node as a gpio controller
- #gpio-cells: must be 2
...
...
drivers/pinctrl/meson/pinctrl-meson.c
View file @
fe4a6485
...
...
@@ -31,6 +31,9 @@
* In some cases the register ranges for pull enable and pull
* direction are the same and thus there are only 3 register ranges.
*
* Since Meson G12A SoC, the ao register ranges for gpio, pull enable
* and pull direction are the same, so there are only 2 register ranges.
*
* For the pull and GPIO configuration every bank uses a contiguous
* set of bits in the register sets described above; the same register
* can be shared by more banks with different offsets.
...
...
@@ -488,21 +491,26 @@ static int meson_pinctrl_parse_dt(struct meson_pinctrl *pc,
return
PTR_ERR
(
pc
->
reg_mux
);
}
pc
->
reg_
pull
=
meson_map_resource
(
pc
,
gpio_np
,
"pull
"
);
if
(
IS_ERR
(
pc
->
reg_
pull
))
{
dev_err
(
pc
->
dev
,
"
pull
registers not found
\n
"
);
return
PTR_ERR
(
pc
->
reg_
pull
);
pc
->
reg_
gpio
=
meson_map_resource
(
pc
,
gpio_np
,
"gpio
"
);
if
(
IS_ERR
(
pc
->
reg_
gpio
))
{
dev_err
(
pc
->
dev
,
"
gpio
registers not found
\n
"
);
return
PTR_ERR
(
pc
->
reg_
gpio
);
}
pc
->
reg_pull
=
meson_map_resource
(
pc
,
gpio_np
,
"pull"
);
/* Use gpio region if pull one is not present */
if
(
IS_ERR
(
pc
->
reg_pull
))
pc
->
reg_pull
=
pc
->
reg_gpio
;
pc
->
reg_pullen
=
meson_map_resource
(
pc
,
gpio_np
,
"pull-enable"
);
/* Use pull region if pull-enable one is not present */
if
(
IS_ERR
(
pc
->
reg_pullen
))
pc
->
reg_pullen
=
pc
->
reg_pull
;
pc
->
reg_
gpio
=
meson_map_resource
(
pc
,
gpio_np
,
"gpio
"
);
if
(
IS_ERR
(
pc
->
reg_
gpio
))
{
dev_
err
(
pc
->
dev
,
"gpio registers not found
\n
"
);
return
PTR_ERR
(
pc
->
reg_gpio
)
;
pc
->
reg_
ds
=
meson_map_resource
(
pc
,
gpio_np
,
"ds
"
);
if
(
IS_ERR
(
pc
->
reg_
ds
))
{
dev_
dbg
(
pc
->
dev
,
"ds registers not found - skipping
\n
"
);
pc
->
reg_ds
=
NULL
;
}
return
0
;
...
...
drivers/pinctrl/meson/pinctrl-meson.h
View file @
fe4a6485
...
...
@@ -120,6 +120,7 @@ struct meson_pinctrl {
struct
regmap
*
reg_pullen
;
struct
regmap
*
reg_pull
;
struct
regmap
*
reg_gpio
;
struct
regmap
*
reg_ds
;
struct
gpio_chip
chip
;
struct
device_node
*
of_node
;
};
...
...
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