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
c1ca05c2
Commit
c1ca05c2
authored
Dec 16, 2019
by
Linus Walleij
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ib-pinctrl-default-state' into devel
parents
15711ba6
55d54d1e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
14 deletions
+25
-14
drivers/pinctrl/core.c
drivers/pinctrl/core.c
+19
-14
include/linux/pinctrl/consumer.h
include/linux/pinctrl/consumer.h
+6
-0
No files found.
drivers/pinctrl/core.c
View file @
c1ca05c2
...
@@ -1535,15 +1535,8 @@ int pinctrl_init_done(struct device *dev)
...
@@ -1535,15 +1535,8 @@ int pinctrl_init_done(struct device *dev)
return
ret
;
return
ret
;
}
}
#ifdef CONFIG_PM
static
int
pinctrl_select_bound_state
(
struct
device
*
dev
,
struct
pinctrl_state
*
state
)
/**
* pinctrl_pm_select_state() - select pinctrl state for PM
* @dev: device to select default state for
* @state: state to set
*/
static
int
pinctrl_pm_select_state
(
struct
device
*
dev
,
struct
pinctrl_state
*
state
)
{
{
struct
dev_pin_info
*
pins
=
dev
->
pins
;
struct
dev_pin_info
*
pins
=
dev
->
pins
;
int
ret
;
int
ret
;
...
@@ -1558,15 +1551,27 @@ static int pinctrl_pm_select_state(struct device *dev,
...
@@ -1558,15 +1551,27 @@ static int pinctrl_pm_select_state(struct device *dev,
}
}
/**
/**
* pinctrl_
pm_select_default_state() - select default pinctrl state for PM
* pinctrl_
select_default_state() - select default pinctrl state
* @dev: device to select default state for
* @dev: device to select default state for
*/
*/
int
pinctrl_
pm_
select_default_state
(
struct
device
*
dev
)
int
pinctrl_select_default_state
(
struct
device
*
dev
)
{
{
if
(
!
dev
->
pins
)
if
(
!
dev
->
pins
)
return
0
;
return
0
;
return
pinctrl_pm_select_state
(
dev
,
dev
->
pins
->
default_state
);
return
pinctrl_select_bound_state
(
dev
,
dev
->
pins
->
default_state
);
}
EXPORT_SYMBOL_GPL
(
pinctrl_select_default_state
);
#ifdef CONFIG_PM
/**
* pinctrl_pm_select_default_state() - select default pinctrl state for PM
* @dev: device to select default state for
*/
int
pinctrl_pm_select_default_state
(
struct
device
*
dev
)
{
return
pinctrl_select_default_state
(
dev
);
}
}
EXPORT_SYMBOL_GPL
(
pinctrl_pm_select_default_state
);
EXPORT_SYMBOL_GPL
(
pinctrl_pm_select_default_state
);
...
@@ -1579,7 +1584,7 @@ int pinctrl_pm_select_sleep_state(struct device *dev)
...
@@ -1579,7 +1584,7 @@ int pinctrl_pm_select_sleep_state(struct device *dev)
if
(
!
dev
->
pins
)
if
(
!
dev
->
pins
)
return
0
;
return
0
;
return
pinctrl_
pm_select
_state
(
dev
,
dev
->
pins
->
sleep_state
);
return
pinctrl_
select_bound
_state
(
dev
,
dev
->
pins
->
sleep_state
);
}
}
EXPORT_SYMBOL_GPL
(
pinctrl_pm_select_sleep_state
);
EXPORT_SYMBOL_GPL
(
pinctrl_pm_select_sleep_state
);
...
@@ -1592,7 +1597,7 @@ int pinctrl_pm_select_idle_state(struct device *dev)
...
@@ -1592,7 +1597,7 @@ int pinctrl_pm_select_idle_state(struct device *dev)
if
(
!
dev
->
pins
)
if
(
!
dev
->
pins
)
return
0
;
return
0
;
return
pinctrl_
pm_select
_state
(
dev
,
dev
->
pins
->
idle_state
);
return
pinctrl_
select_bound
_state
(
dev
,
dev
->
pins
->
idle_state
);
}
}
EXPORT_SYMBOL_GPL
(
pinctrl_pm_select_idle_state
);
EXPORT_SYMBOL_GPL
(
pinctrl_pm_select_idle_state
);
#endif
#endif
...
...
include/linux/pinctrl/consumer.h
View file @
c1ca05c2
...
@@ -40,6 +40,7 @@ extern int pinctrl_select_state(struct pinctrl *p, struct pinctrl_state *s);
...
@@ -40,6 +40,7 @@ extern int pinctrl_select_state(struct pinctrl *p, struct pinctrl_state *s);
extern
struct
pinctrl
*
__must_check
devm_pinctrl_get
(
struct
device
*
dev
);
extern
struct
pinctrl
*
__must_check
devm_pinctrl_get
(
struct
device
*
dev
);
extern
void
devm_pinctrl_put
(
struct
pinctrl
*
p
);
extern
void
devm_pinctrl_put
(
struct
pinctrl
*
p
);
extern
int
pinctrl_select_default_state
(
struct
device
*
dev
);
#ifdef CONFIG_PM
#ifdef CONFIG_PM
extern
int
pinctrl_pm_select_default_state
(
struct
device
*
dev
);
extern
int
pinctrl_pm_select_default_state
(
struct
device
*
dev
);
...
@@ -122,6 +123,11 @@ static inline void devm_pinctrl_put(struct pinctrl *p)
...
@@ -122,6 +123,11 @@ static inline void devm_pinctrl_put(struct pinctrl *p)
{
{
}
}
static
inline
int
pinctrl_select_default_state
(
struct
device
*
dev
)
{
return
0
;
}
static
inline
int
pinctrl_pm_select_default_state
(
struct
device
*
dev
)
static
inline
int
pinctrl_pm_select_default_state
(
struct
device
*
dev
)
{
{
return
0
;
return
0
;
...
...
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