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".
28 lines
598 B
Text
28 lines
598 B
Text
/*
|
|
* Copyright (c) 2021 The ZMK Contributors
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
/dts-v1/;
|
|
#include "nice_nano.dtsi"
|
|
|
|
/ {
|
|
chosen {
|
|
zmk,battery = &vbatt;
|
|
};
|
|
|
|
// Node name must match original "EXT_POWER" label to preserve user settings.
|
|
EXT_POWER {
|
|
compatible = "zmk,ext-power-generic";
|
|
control-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
|
|
};
|
|
|
|
vbatt: vbatt {
|
|
compatible = "zmk,battery-voltage-divider";
|
|
label = "BATTERY";
|
|
io-channels = <&adc 2>;
|
|
output-ohms = <2000000>;
|
|
full-ohms = <(2000000 + 806000)>;
|
|
};
|
|
};
|