boards: nrf: Changed GPIO default driver to NRFX shim

I removed GPIO configuration from board files and enabled them
as default in driver Kconfig file. All boards had GPIO ports
enabled that is why I decided to enable it by default.

Power management example was changed to use new driver.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
This commit is contained in:
Mieszko Mierunski 2018-07-04 12:17:24 +02:00 committed by Anas Nashif
parent b468b24d75
commit 15813d343c
22 changed files with 3 additions and 158 deletions

View file

@ -11,7 +11,6 @@
#include <soc_power.h>
#include <nrf_power.h>
extern void nrf_gpiote_clear_port_event(void);
#if defined(CONFIG_SYS_POWER_DEEP_SLEEP)
/* System_OFF is deepest Power state available, On exiting from this
* state CPU including all peripherals reset
@ -55,8 +54,6 @@ static void _low_power_mode(enum power_states state)
/* Issue __WFE*/
_issue_low_power_command();
/* Clear the Port Event */
nrf_gpiote_clear_port_event();
}
/* Invoke Low Power/System Off specific Tasks */

View file

@ -9,17 +9,4 @@ if BOARD_96B_CARBON_NRF51
config BOARD
default "96b_carbon_nrf51"
if UART_NRFX
config GPIO
default y
config GPIO_NRF5
default y
config GPIO_NRF5_P0
default y
endif # UART_NRFX
endif # BOARD_96B_CARBON_NRF51

View file

@ -9,13 +9,6 @@ if BOARD_96B_NITROGEN
config BOARD
default "96b_nitrogen"
if GPIO_NRF5
config GPIO_NRF5_P0
default y
endif # GPIO_NRF5
if UART_NRFX
config UART_0_NRF_TX_PIN

View file

@ -9,13 +9,6 @@ if BOARD_BBC_MICROBIT
config BOARD
default "bbc_microbit"
if GPIO_NRF5
config GPIO_NRF5_P0
default y
endif # GPIO_NRF5
if UART_NRFX
config UART_0_NRF_TX_PIN

View file

@ -11,15 +11,6 @@ config BOARD
if UART_NRFX
config GPIO
default y
config GPIO_NRF5
default y
config GPIO_NRF5_P0
default y
config UART_0_NRF_TX_PIN
default 9

View file

@ -9,13 +9,6 @@ if BOARD_NRF51_BLE400
config BOARD
default "nrf51_ble400"
if GPIO_NRF5
config GPIO_NRF5_P0
default y
endif # GPIO_NRF5
if UART_NRFX
config UART_0_NRF_TX_PIN

View file

@ -9,13 +9,6 @@ if BOARD_NRF51_BLENANO
config BOARD
default "nrf51_blenano"
if GPIO_NRF5
config GPIO_NRF5_P0
default y
endif # GPIO_NRF5
if UART_NRFX
config UART_0_NRF_TX_PIN

View file

@ -9,13 +9,6 @@ if BOARD_NRF51_PCA10028
config BOARD
default "nrf51_pca10028"
if GPIO_NRF5
config GPIO_NRF5_P0
default y
endif # GPIO_NRF5
if UART_NRFX
config UART_0_NRF_TX_PIN

View file

@ -9,13 +9,6 @@ if BOARD_NRF51_VBLUNO51
config BOARD
default "nrf51_vbluno51"
if GPIO_NRF5
config GPIO_NRF5_P0
default y
endif # GPIO_NRF5
if UART_NRFX
config UART_0_NRF_TX_PIN

View file

@ -9,13 +9,6 @@ if BOARD_NRF52810_PCA10040
config BOARD
default "nrf52810_pca10040"
if GPIO_NRF5
config GPIO_NRF5_P0
default y
endif # GPIO_NRF5
if UART_NRFX
config UART_0_NRF_TX_PIN

View file

@ -9,13 +9,6 @@ if BOARD_NRF52840_PCA10056
config BOARD
default "nrf52840_pca10056"
if GPIO_NRF5
config GPIO_NRF5_P0
default y
endif # GPIO_NRF5
if UART_NRFX
config UART_0_NRF_TX_PIN

View file

@ -9,17 +9,6 @@ if BOARD_NRF52840_PCA10059
config BOARD
default "nrf52840_pca10059"
if GPIO_NRF5
config GPIO_NRF5_P0
default y
# One LED and the user button are connected to P1
config GPIO_NRF5_P1
default y
endif # GPIO_NRF5
if UART_NRFX
config UART_0_NRF_TX_PIN

View file

@ -9,13 +9,6 @@ if BOARD_NRF52_ADAFRUIT_FEATHER
config BOARD
default "nrf52_adafruit_feather"
if GPIO_NRF5
config GPIO_NRF5_P0
default y
endif # GPIO_NRF5
if UART_NRFX
config UART_0_NRF_TX_PIN

View file

@ -9,13 +9,6 @@ if BOARD_NRF52_BLENANO2
config BOARD
default "nrf52_blenano2"
if GPIO_NRF5
config GPIO_NRF5_P0
default y
endif # GPIO_NRF5
if UART_NRFX
config UART_0_NRF_TX_PIN

View file

@ -9,13 +9,6 @@ if BOARD_NRF52_PCA10040
config BOARD
default "nrf52_pca10040"
if GPIO_NRF5
config GPIO_NRF5_P0
default y
endif # GPIO_NRF5
if UART_NRFX
config UART_0_NRF_TX_PIN

View file

@ -9,13 +9,6 @@ if BOARD_NRF52_PCA20020
config BOARD
default "nrf52_pca20020"
if GPIO_NRF5
config GPIO_NRF5_P0
default y
endif # GPIO_NRF5
if UART_NRFX
config UART_0_NRF_TX_PIN

View file

@ -10,13 +10,6 @@ if BOARD_NRF52_SPARKFUN
config BOARD
default "nrf52_sparkfun"
if GPIO_NRF5
config GPIO_NRF5_P0
default y
endif # GPIO_NRF5
if UART_NRFX
config UART_0_NRF_TX_PIN

View file

@ -9,13 +9,6 @@ if BOARD_NRF52_VBLUNO52
config BOARD
default "nrf52_vbluno52"
if GPIO_NRF5
config GPIO_NRF5_P0
default y
endif # GPIO_NRF5
if UART_NRFX
config UART_0_NRF_TX_PIN

View file

@ -11,15 +11,6 @@ config BOARD
if UART_NRFX
config GPIO
default y
config GPIO_NRF5
default y
config GPIO_NRF5_P0
default y
config UART_0_NRF_TX_PIN
default 9

View file

@ -26,7 +26,7 @@ config WS2812B_SW_NAME
config WS2812B_SW_GPIO_NAME
string "GPIO port that the LED strip is connected to"
default GPIO_NRF5_P0_DEV_NAME if SOC_FAMILY_NRF
default "GPIO_0" if SOC_FAMILY_NRF
help
GPIO port name.

View file

@ -9,13 +9,6 @@ if BOARD_NRF52840_PCA10056
config BOARD
default "nrf52840_pca10056"
if GPIO_NRF5
config GPIO_NRF5_P0
default y
endif # GPIO_NRF5
if UART_NRFX
config UART_0_NRF_TX_PIN

View file

@ -18,9 +18,6 @@ static int device_count;
static char device_ordered_list[DEVICE_POLICY_MAX];
static char device_retval[DEVICE_POLICY_MAX];
extern int nrf_gpiote_interrupt_enable(uint32_t mask);
extern void nrf_gpiote_clear_port_event(void);
/* Initialize and configure GPIO */
void gpio_setup(void)
{
@ -34,12 +31,10 @@ void gpio_setup(void)
/* Configure button 2 as wake source from deep sleep */
gpio_pin_configure(gpiob, BUTTON_2, GPIO_DIR_IN
| GPIO_PUD_PULL_UP
| GPIO_INT | GPIO_INT_LEVEL
| GPIO_CFG_SENSE_LOW);
nrf_gpiote_clear_port_event();
/* Enable GPIOTE Port Event */
nrf_gpiote_interrupt_enable(GPIOTE_INTENSET_PORT_Msk);
NVIC_EnableIRQ(GPIOTE_IRQn);
gpio_pin_enable_callback(gpiob, BUTTON_2);
}
void suspend_devices(void)