Fix IR LED ACTIVE_HIGH
This commit is contained in:
parent
1daea67bbd
commit
642f9ee90e
@ -33,8 +33,6 @@ $ mpv "rtmp://192.168.1.200/live/pinecube" --profile=low-latency --cache-secs=1
|
|||||||
$ echo 1 > /sys/class/leds/pine64\:ir\:led1/brightness
|
$ echo 1 > /sys/class/leds/pine64\:ir\:led1/brightness
|
||||||
$ echo 1 > /sys/class/leds/pine64\:ir\:led2/brightness
|
$ echo 1 > /sys/class/leds/pine64\:ir\:led2/brightness
|
||||||
```
|
```
|
||||||
(Except they seem to be reversed. Setting 0 brightness turns them on, setting 1 turns them off)
|
|
||||||
Change it to `ACTIVE_HIGH` in dtb?
|
|
||||||
|
|
||||||
## GPIO:
|
## GPIO:
|
||||||
https://linux-sunxi.org/GPIO
|
https://linux-sunxi.org/GPIO
|
||||||
|
@ -33,7 +33,7 @@ in
|
|||||||
boot.kernelPackages = pkgs.linuxPackages_5_9;
|
boot.kernelPackages = pkgs.linuxPackages_5_9;
|
||||||
boot.kernelPatches = [
|
boot.kernelPatches = [
|
||||||
{ name = "pine64-pinecube";
|
{ name = "pine64-pinecube";
|
||||||
patch = ./Pine64-PineCube-support.patch;
|
patch = ./kernel/Pine64-PineCube-support.patch;
|
||||||
# sunxi_defconfig is missing wireless support
|
# sunxi_defconfig is missing wireless support
|
||||||
# TODO: Are all of these options needed here?
|
# TODO: Are all of these options needed here?
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
@ -45,6 +45,7 @@ in
|
|||||||
RFKILL_GPIO y
|
RFKILL_GPIO y
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
{ name = "pinecube-ir-leds"; patch = ./kernel/0001-ARM-dts-sun8i-s3l-fix-Pinecube-IR-LEDs.patch; }
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.extraModulePackages = [ config.boot.kernelPackages.rtl8189es ];
|
boot.extraModulePackages = [ config.boot.kernelPackages.rtl8189es ];
|
||||||
|
32
kernel/0001-ARM-dts-sun8i-s3l-fix-Pinecube-IR-LEDs.patch
Normal file
32
kernel/0001-ARM-dts-sun8i-s3l-fix-Pinecube-IR-LEDs.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
From 7ad2976267f04f3b29327e470c9698bd689775d8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Daniel Fullmer <danielrf12@gmail.com>
|
||||||
|
Date: Fri, 23 Oct 2020 16:04:15 -0700
|
||||||
|
Subject: [PATCH 1/2] ARM: dts: sun8i: s3l: fix Pinecube IR LEDs
|
||||||
|
|
||||||
|
Signed-off-by: Daniel Fullmer <danielrf12@gmail.com>
|
||||||
|
---
|
||||||
|
arch/arm/boot/dts/sun8i-s3-pinecube.dts | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/arch/arm/boot/dts/sun8i-s3-pinecube.dts b/arch/arm/boot/dts/sun8i-s3-pinecube.dts
|
||||||
|
index 9bab6b7f4014..a4adf52ef406 100644
|
||||||
|
--- a/arch/arm/boot/dts/sun8i-s3-pinecube.dts
|
||||||
|
+++ b/arch/arm/boot/dts/sun8i-s3-pinecube.dts
|
||||||
|
@@ -25,12 +25,12 @@ leds {
|
||||||
|
|
||||||
|
led1 {
|
||||||
|
label = "pine64:ir:led1";
|
||||||
|
- gpios = <&pio 1 10 GPIO_ACTIVE_LOW>; /* PB10 */
|
||||||
|
+ gpios = <&pio 1 10 GPIO_ACTIVE_HIGH>; /* PB10 */
|
||||||
|
};
|
||||||
|
|
||||||
|
led2 {
|
||||||
|
label = "pine64:ir:led2";
|
||||||
|
- gpios = <&pio 1 12 GPIO_ACTIVE_LOW>; /* PB12 */
|
||||||
|
+ gpios = <&pio 1 12 GPIO_ACTIVE_HIGH>; /* PB12 */
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
--
|
||||||
|
2.28.0
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user