refactor(ext_power): Remove label property

Changed the label property on zmk,ext-power-generic to be optional and
removed it from existing uses. Renamed the nodes for all non-development
boards to "EXT_POWER" to preserve user settings.

rgb_underglow.c now finds the correct device by finding the first
instance of zmk,ext-power-generic instead of looking for a node named
"EXT_POWER".
This commit is contained in:
Joel Spadin
2023-09-05 17:52:18 -05:00
parent 179bdbc41a
commit 05925c72d7
17 changed files with 34 additions and 36 deletions

View File

@@ -29,9 +29,9 @@
};
};
ext-power {
// Node name must match original "EXT_POWER" label to preserve user settings.
EXT_POWER {
compatible = "zmk,ext-power-generic";
label = "EXT_POWER";
init-delay-ms = <20>;
control-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
};

View File

@@ -66,9 +66,9 @@
;
};
ext-power {
// Node name must match original "EXT_POWER" label to preserve user settings.
EXT_POWER {
compatible = "zmk,ext-power-generic";
label = "EXT_POWER";
control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
};

View File

@@ -28,9 +28,9 @@
};
};
ext-power {
// Node name must match original "EXT_POWER" label to preserve user settings.
EXT_POWER {
compatible = "zmk,ext-power-generic";
label = "EXT_POWER";
control-gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>; /* WS2812_CE */
init-delay-ms = <100>;
};

View File

@@ -29,9 +29,9 @@
};
};
ext-power {
// Node name must match original "EXT_POWER" label to preserve user settings.
EXT_POWER {
compatible = "zmk,ext-power-generic";
label = "EXT_POWER";
control-gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>; /* WS2812_CE */
init-delay-ms = <100>;
};

View File

@@ -29,9 +29,9 @@
};
};
ext-power {
// Node name must match original "EXT_POWER" label to preserve user settings.
EXT_POWER {
compatible = "zmk,ext-power-generic";
label = "EXT_POWER";
control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
init-delay-ms = <50>;
};

View File

@@ -78,9 +78,9 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) R
};
};
ext-power {
// Node name must match original "EXT_POWER" label to preserve user settings.
EXT_POWER {
compatible = "zmk,ext-power-generic";
label = "EXT_POWER";
control-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
};

View File

@@ -12,9 +12,9 @@
zmk,battery = &vbatt;
};
ext-power {
// Node name must match original "EXT_POWER" label to preserve user settings.
EXT_POWER {
compatible = "zmk,ext-power-generic";
label = "EXT_POWER";
control-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
};

View File

@@ -12,9 +12,9 @@
zmk,battery = &vbatt;
};
ext-power {
// Node name must match original "EXT_POWER" label to preserve user settings.
EXT_POWER {
compatible = "zmk,ext-power-generic";
label = "EXT_POWER";
control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
init-delay-ms = <50>;
};

View File

@@ -28,9 +28,9 @@
};
};
ext-power {
// Node name must match original "EXT_POWER" label to preserve user settings.
EXT_POWER {
compatible = "zmk,ext-power-generic";
label = "EXT_POWER";
control-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
};
};

View File

@@ -28,9 +28,9 @@
};
};
ext-power {
// Node name must match original "EXT_POWER" label to preserve user settings.
EXT_POWER {
compatible = "zmk,ext-power-generic";
label = "EXT_POWER";
control-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
};
};

View File

@@ -29,9 +29,9 @@
};
};
ext-power {
// Node name must match original "EXT_POWER" label to preserve user settings.
EXT_POWER {
compatible = "zmk,ext-power-generic";
label = "EXT_POWER";
control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
};

View File

@@ -29,9 +29,9 @@
};
};
ext-power {
// Node name must match original "EXT_POWER" label to preserve user settings.
EXT_POWER {
compatible = "zmk,ext-power-generic";
label = "EXT_POWER";
control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
};

View File

@@ -30,9 +30,9 @@
};
};
ext-power {
// Node name must match original "EXT_POWER" label to preserve user settings.
EXT_POWER {
compatible = "zmk,ext-power-generic";
label = "EXT_POWER";
control-gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
init-delay-ms = <50>;
};

View File

@@ -29,9 +29,9 @@
};
};
ext-power {
// Node name must match original "EXT_POWER" label to preserve user settings.
EXT_POWER {
compatible = "zmk,ext-power-generic";
label = "EXT_POWER";
control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
};

View File

@@ -49,15 +49,12 @@ nice_view_spi: &arduino_spi {
// Commented out until we add more powerful power domain support
// external_power {
// compatible = "zmk,ext-power-generic";
// label = "EXT_POWER";
// init-delay-ms = <200>;
// control-gpios = <&arduino_header 1 GPIO_ACTIVE_LOW>;
// };
rgb_power {
compatible = "zmk,ext-power-generic";
label = "EXT_POWER";
// label = "RGB_POWER";
init-delay-ms = <200>;
control-gpios = <&arduino_header 1 GPIO_ACTIVE_LOW>;
};