forked from kofal.net/zmk
refactor: Move away from deprecated label usages.
* Move away from DT_LABEL. * Move to DEVICE_DT_GET for non-behavior device access. * Move various drivers to `gpio_spec_dt` and `DT` related macros. * Remove mcp23017 while at it, since better upstream driver is available.
This commit is contained in:
committed by
Pete Johanson
parent
062f94d014
commit
09ed79a867
@@ -104,11 +104,10 @@
|
||||
clock-frequency = <I2C_BITRATE_FAST>;
|
||||
|
||||
right_io: mcp23017@20 {
|
||||
compatible = "microchip,mcp23017";
|
||||
compatible = "microchip,mcp230xx";
|
||||
status = "okay";
|
||||
gpio-controller;
|
||||
reg = <0x20>;
|
||||
label = "RIGHT_IO";
|
||||
#gpio-cells = <2>;
|
||||
ngpios = <16>;
|
||||
};
|
||||
|
||||
@@ -20,9 +20,6 @@ CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_KSCAN_MATRIX_POLLING=y
|
||||
CONFIG_USB_SELF_POWERED=n
|
||||
|
||||
# Enable IO multiplexer
|
||||
CONFIG_GPIO_MCP23017=y
|
||||
|
||||
# Needed to reduce this to size that will fit on F072
|
||||
CONFIG_HEAP_MEM_POOL_SIZE=1024
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@ static int pinmux_mikoto_init(const struct device *port) {
|
||||
ARG_UNUSED(port);
|
||||
|
||||
#if CONFIG_BOARD_MIKOTO_520
|
||||
const struct device *p0 = device_get_binding("GPIO_0");
|
||||
const struct device *p1 = device_get_binding("GPIO_1");
|
||||
const struct device *p0 = DEVICE_DT_GET(DT_NODELABEL(gpio0));
|
||||
const struct device *p1 = DEVICE_DT_GET(DT_NODELABEL(gpio1));
|
||||
#if CONFIG_BOARD_MIKOTO_CHARGER_CURRENT_40MA
|
||||
gpio_pin_configure(p0, 26, GPIO_INPUT | GPIO_PULL_DOWN);
|
||||
gpio_pin_configure(p1, 15, GPIO_INPUT);
|
||||
|
||||
@@ -15,7 +15,7 @@ static int pinmux_nrfmicro_init(const struct device *port) {
|
||||
ARG_UNUSED(port);
|
||||
|
||||
#if (CONFIG_BOARD_NRFMICRO_13 || CONFIG_BOARD_NRFMICRO_13_52833)
|
||||
const struct device *p0 = device_get_binding("GPIO_0");
|
||||
const struct device *p0 = DEVICE_DT_GET(DT_NODELABEL(gpio0));
|
||||
#if CONFIG_BOARD_NRFMICRO_CHARGER
|
||||
gpio_pin_configure(p0, 5, GPIO_OUTPUT);
|
||||
gpio_pin_set(p0, 5, 0);
|
||||
|
||||
@@ -15,7 +15,7 @@ static int pinmux_puchi_ble_init(const struct device *port) {
|
||||
ARG_UNUSED(port);
|
||||
|
||||
#if CONFIG_BOARD_PUCHI_BLE_v1
|
||||
const struct device *p0 = device_get_binding("GPIO_0");
|
||||
const struct device *p0 = DEVICE_DT_GET(DT_NODELABEL(gpio0));
|
||||
#if CONFIG_BOARD_PUCHI_BLE_CHARGER
|
||||
gpio_pin_configure(p0, 5, GPIO_OUTPUT);
|
||||
gpio_pin_set(p0, 5, 0);
|
||||
|
||||
Reference in New Issue
Block a user