Skip to content

Commit

Permalink
move backlight config from shield to board
Browse files Browse the repository at this point in the history
  • Loading branch information
cyril279 committed Mar 19, 2024
1 parent d14ce6b commit ffaac94
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 30 deletions.
4 changes: 2 additions & 2 deletions config/boards/shields/rev1350/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ if SHIELD_REV1350
config ZMK_KEYBOARD_NAME
default "rev1350"

endif # SHIELD_REV1350

if ZMK_BACKLIGHT

config PWM
Expand All @@ -17,3 +15,5 @@ config LED_PWM
default y

endif # ZMK_BACKLIGHT

endif # SHIELD_REV1350
30 changes: 30 additions & 0 deletions config/boards/shields/rev1350/boards/nice_nano_v2.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
&pinctrl {
// Other pinctrl definitions for other hardware
pwm0_default: pwm0_default {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 9)>;
};
};
pwm0_sleep: pwm0_sleep {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 9)>;
low-power-enable;
};
};
};

&pwm0 {
status = "okay";
pinctrl-0 = <&pwm0_default>;
pinctrl-1 = <&pwm0_sleep>;
pinctrl-names = "default", "sleep";
};

/ {
backlight: pwmleds {
compatible = "pwm-leds";
pwm_led_0 {
pwms = <&pwm0 0 PWM_MSEC(10) PWM_POLARITY_NORMAL>;
};
};
};
28 changes: 0 additions & 28 deletions config/boards/shields/rev1350/rev1350.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@
zmk,matrix_transform = &default_transform;
zmk,backlight = &backlight;
};
backlight: pwmleds {
compatible = "pwm-leds";
pwm_led_0 {
pwms = <&pwm0 0 PWM_MSEC(10) PWM_POLARITY_NORMAL>;
};
};

default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform";
Expand Down Expand Up @@ -57,25 +51,3 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(5,0) RC(5,1) RC(5,2) RC(5,3)
;
};
};

&pinctrl {
// Other pinctrl definitions for other hardware
pwm0_default: pwm0_default {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 9)>;
};
};
pwm0_sleep: pwm0_sleep {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 9)>;
low-power-enable;
};
};
};

&pwm0 {
status = "okay";
pinctrl-0 = <&pwm0_default>;
pinctrl-1 = <&pwm0_sleep>;
pinctrl-names = "default", "sleep";
};

0 comments on commit ffaac94

Please sign in to comment.