Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
u-boot-stm32
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sami Nurmenniemi
u-boot-stm32
Commits
7c239aed
Commit
7c239aed
authored
Feb 21, 2017
by
Sergei Miroshnichenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RM#1313 gpio: stm32: Add IN and IN_PULLUP roles
parent
ca816b8f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
drivers/gpio/stm32f2_gpio.c
drivers/gpio/stm32f2_gpio.c
+14
-0
include/asm-arm/arch-stm32/stm32f2_gpio.h
include/asm-arm/arch-stm32/stm32f2_gpio.h
+2
-0
No files found.
drivers/gpio/stm32f2_gpio.c
View file @
7c239aed
...
...
@@ -147,6 +147,8 @@ static const u32 af_val[STM32F2_GPIO_ROLE_LAST] = {
(
u32
)
-
1
,
STM32F2_GPIO_AF_QSPI9
,
/* STM32F2_GPIO_ROLE_QSPI_AF9 */
STM32F2_GPIO_AF_QSPI10
,
/* STM32F2_GPIO_ROLE_QSPI_AF10 */
STM32F2_GPIO_MODE_IN
,
STM32F2_GPIO_MODE_IN
,
};
/*
...
...
@@ -211,6 +213,18 @@ s32 stm32f2_gpio_config(const struct stm32f2_gpio_dsc *dsc,
pupd
=
STM32F2_GPIO_PUPD_NO
;
mode
=
STM32F2_GPIO_MODE_AF
;
break
;
case
STM32F2_GPIO_ROLE_GPIN
:
otype
=
STM32F2_GPIO_OTYPE_PP
;
ospeed
=
STM32F2_GPIO_SPEED_2M
;
pupd
=
STM32F2_GPIO_PUPD_NO
;
mode
=
STM32F2_GPIO_MODE_IN
;
break
;
case
STM32F2_GPIO_ROLE_GPIN_PULLUP
:
otype
=
STM32F2_GPIO_OTYPE_PP
;
ospeed
=
STM32F2_GPIO_SPEED_2M
;
pupd
=
STM32F2_GPIO_PUPD_UP
;
mode
=
STM32F2_GPIO_MODE_IN
;
break
;
default:
if
(
gd
->
have_console
)
printf
(
"%s: incorrect role %d.
\n
"
,
__func__
,
role
);
...
...
include/asm-arm/arch-stm32/stm32f2_gpio.h
View file @
7c239aed
...
...
@@ -79,6 +79,8 @@ enum stm32f2_gpio_role {
STM32F2_GPIO_ROLE_GPOUT
,
/* GPOUT */
STM32F2_GPIO_ROLE_QSPI_AF9
,
STM32F2_GPIO_ROLE_QSPI_AF10
,
STM32F2_GPIO_ROLE_GPIN
,
STM32F2_GPIO_ROLE_GPIN_PULLUP
,
STM32F2_GPIO_ROLE_LAST
/* for internal usage, must be last */
};
...
...
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