drivers: gpio_mcux: update to use new GPIO API

Update driver code and board files to use new GPIO configuration flags
such as GPIO_ACTIVE_LOW. Also add implementation of new port_* driver
API as well as gpio_pin_interrupt_configure function.

Tested on frdm_k64f board.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
This commit is contained in:
Piotr Mienkowski 2019-08-09 01:28:40 +02:00 committed by Carles Cufí
commit 30a97ce28e
7 changed files with 198 additions and 64 deletions

View file

@ -46,32 +46,32 @@
leds {
compatible = "gpio-leds";
orange_led: led_0 {
gpios = <&gpioc 13 0>;
gpios = <&gpioc 13 GPIO_ACTIVE_LOW>;
label = "User LED D9";
};
yellow_led: led_1 {
gpios = <&gpioc 12 0>;
gpios = <&gpioc 12 GPIO_ACTIVE_LOW>;
label = "User LED D8";
};
green_led: led_2 {
gpios = <&gpioc 11 0>;
gpios = <&gpioc 11 GPIO_ACTIVE_LOW>;
label = "User LED D7";
};
red_led: led_3 {
gpios = <&gpioc 10 0>;
gpios = <&gpioc 10 GPIO_ACTIVE_LOW>;
label = "User LED D6";
};
tri_red_led: led_4 {
gpios = <&gpiod 16 0>;
gpios = <&gpiod 16 GPIO_ACTIVE_LOW>;
label = "User Tricolor LED D5 (Red)";
};
tri_green_led: led_5 {
gpios = <&gpiod 15 0>;
gpios = <&gpiod 15 GPIO_ACTIVE_LOW>;
label = "User Tricolor LED D5 (Green)";
};
tri_blue_led: led_6 {
gpios = <&gpiob 5 0>;
gpios = <&gpiob 5 GPIO_ACTIVE_LOW>;
label = "User Tricolor LED D5 (Blue)";
};
};
@ -113,11 +113,11 @@
compatible = "gpio-keys";
user_button_2: button_0 {
label = "User SW2";
gpios = <&gpiod 3 GPIO_INT_ACTIVE_LOW>;
gpios = <&gpiod 3 GPIO_ACTIVE_LOW>;
};
user_button_3: button_1 {
label = "User SW3";
gpios = <&gpiod 6 GPIO_INT_ACTIVE_LOW>;
gpios = <&gpiod 6 GPIO_ACTIVE_LOW>;
};
};
};