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
2a6ac65c
Commit
2a6ac65c
authored
Mar 29, 2023
by
Linus Walleij
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ib-qcom-quad-spi' into devel
parents
94df03a4
e49eabe3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
6 deletions
+34
-6
Documentation/devicetree/bindings/pinctrl/qcom,tlmm-common.yaml
...ntation/devicetree/bindings/pinctrl/qcom,tlmm-common.yaml
+3
-1
drivers/pinctrl/qcom/pinctrl-msm.c
drivers/pinctrl/qcom/pinctrl-msm.c
+31
-5
No files found.
Documentation/devicetree/bindings/pinctrl/qcom,tlmm-common.yaml
View file @
2a6ac65c
...
@@ -75,7 +75,9 @@ $defs:
...
@@ -75,7 +75,9 @@ $defs:
bias-pull-down
:
true
bias-pull-down
:
true
bias-pull-up
:
true
bias-pull-up
:
true
bias-disable
:
true
bias-disable
:
true
input-enable
:
true
input-enable
:
false
output-disable
:
true
output-enable
:
true
output-high
:
true
output-high
:
true
output-low
:
true
output-low
:
true
...
...
drivers/pinctrl/qcom/pinctrl-msm.c
View file @
2a6ac65c
...
@@ -323,6 +323,7 @@ static int msm_config_reg(struct msm_pinctrl *pctrl,
...
@@ -323,6 +323,7 @@ static int msm_config_reg(struct msm_pinctrl *pctrl,
break
;
break
;
case
PIN_CONFIG_OUTPUT
:
case
PIN_CONFIG_OUTPUT
:
case
PIN_CONFIG_INPUT_ENABLE
:
case
PIN_CONFIG_INPUT_ENABLE
:
case
PIN_CONFIG_OUTPUT_ENABLE
:
*
bit
=
g
->
oe_bit
;
*
bit
=
g
->
oe_bit
;
*
mask
=
1
;
*
mask
=
1
;
break
;
break
;
...
@@ -414,11 +415,9 @@ static int msm_config_group_get(struct pinctrl_dev *pctldev,
...
@@ -414,11 +415,9 @@ static int msm_config_group_get(struct pinctrl_dev *pctldev,
val
=
msm_readl_io
(
pctrl
,
g
);
val
=
msm_readl_io
(
pctrl
,
g
);
arg
=
!!
(
val
&
BIT
(
g
->
in_bit
));
arg
=
!!
(
val
&
BIT
(
g
->
in_bit
));
break
;
break
;
case
PIN_CONFIG_INPUT_ENABLE
:
case
PIN_CONFIG_OUTPUT_ENABLE
:
/* Pin is output */
if
(
!
arg
)
if
(
arg
)
return
-
EINVAL
;
return
-
EINVAL
;
arg
=
1
;
break
;
break
;
default:
default:
return
-
ENOTSUPP
;
return
-
ENOTSUPP
;
...
@@ -502,9 +501,36 @@ static int msm_config_group_set(struct pinctrl_dev *pctldev,
...
@@ -502,9 +501,36 @@ static int msm_config_group_set(struct pinctrl_dev *pctldev,
arg
=
1
;
arg
=
1
;
break
;
break
;
case
PIN_CONFIG_INPUT_ENABLE
:
case
PIN_CONFIG_INPUT_ENABLE
:
/* disable output */
/*
* According to pinctrl documentation this should
* actually be a no-op.
*
* The docs are explicit that "this does not affect
* the pin's ability to drive output" but what we do
* here is to modify the output enable bit. Thus, to
* follow the docs we should remove that.
*
* The docs say that we should enable any relevant
* input buffer, but TLMM there is no input buffer that
* can be enabled/disabled. It's always on.
*
* The points above, explain why this _should_ be a
* no-op. However, for historical reasons and to
* support old device trees, we'll violate the docs
* still affect the output.
*
* It should further be noted that this old historical
* behavior actually overrides arg to 0. That means
* that "input-enable" and "input-disable" in a device
* tree would _both_ disable the output. We'll
* continue to preserve this behavior as well since
* we have no other use for this attribute.
*/
arg
=
0
;
arg
=
0
;
break
;
break
;
case
PIN_CONFIG_OUTPUT_ENABLE
:
arg
=
!!
arg
;
break
;
default:
default:
dev_err
(
pctrl
->
dev
,
"Unsupported config parameter: %x
\n
"
,
dev_err
(
pctrl
->
dev
,
"Unsupported config parameter: %x
\n
"
,
param
);
param
);
...
...
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