Skip to content

Commit

Permalink
raspberry-pi.4.leds.{eth,pwr}: fix target rename
Browse files Browse the repository at this point in the history
  • Loading branch information
Stunkymonkey authored and mergify[bot] committed Jan 7, 2025
1 parent c422bae commit 90ecc4a
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions raspberry-pi/4/leds.nix
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,16 @@ in
{
name = "disable-act-led";
filter = "*rpi-4-b*";
dtsText = ''
dtsText = let
kernelVersion = lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.2";
target = if kernelVersion then "<&led_act>" else "<&act_led>";
in ''
/dts-v1/;
/plugin/;
/{
compatible = "raspberrypi,4-model-b";
fragment@0 {
target = <&act_led>;
target = ${target};
__overlay__ {
gpios = <&gpio 42 0>; /* first two values copied from bcm2711-rpi-4-b.dts */
linux,default-trigger = "none";
Expand All @@ -98,13 +101,16 @@ in
{
name = "disable-pwr-led";
filter = "*rpi-4-b*";
dtsText = ''
dtsText = let
kernelVersion = lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.2";
target = if kernelVersion then "<&led_pwr>" else "<&pwr_led>";
in ''
/dts-v1/;
/plugin/;
/{
compatible = "raspberrypi,4-model-b";
fragment@0 {
target = <&pwr_led>;
target = ${target};
__overlay__ {
gpios = <&expgpio 2 0>; /* first two values copied from bcm2711-rpi-4-b.dts */
linux,default-trigger = "default-on";
Expand Down

0 comments on commit 90ecc4a

Please sign in to comment.