1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2025-01-11 03:19:48 +01:00

raspberry-pi.4.leds.{eth,pwr}: fix target rename

This commit is contained in:
Felix Buehler 2024-12-28 13:52:01 +01:00 committed by mergify[bot]
parent c422baea26
commit 90ecc4a20c

View file

@ -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";
@ -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";