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 dcd8d52
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 28 deletions.
30 changes: 30 additions & 0 deletions config/boards/shields/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 dcd8d52

Please sign in to comment.