[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-7.2.7 40/62] misc/led: LED state is set opposite of what is expe
From: |
Michael Tokarev |
Subject: |
[Stable-7.2.7 40/62] misc/led: LED state is set opposite of what is expected |
Date: |
Thu, 9 Nov 2023 16:59:08 +0300 |
From: Glenn Miles <milesg@linux.vnet.ibm.com>
Testing of the LED state showed that when the LED polarity was
set to GPIO_POLARITY_ACTIVE_LOW and a low logic value was set on
the input GPIO of the LED, the LED was being turn off when it was
expected to be turned on.
Fixes: ddb67f6402 ("hw/misc/led: Allow connecting from GPIO output")
Signed-off-by: Glenn Miles <milesg@linux.vnet.ibm.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Andrew Jeffery <andrew@codeconstruct.com.au>
Message-id: 20231024191945.4135036-1-milesg@linux.vnet.ibm.com
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
(cherry picked from commit 6f83dc67168d17856744275e2a0d7a6addf6cfb9)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/hw/misc/led.c b/hw/misc/led.c
index f6d6d68bce..42bb43a39a 100644
--- a/hw/misc/led.c
+++ b/hw/misc/led.c
@@ -63,7 +63,7 @@ static void led_set_state_gpio_handler(void *opaque, int
line, int new_state)
LEDState *s = LED(opaque);
assert(line == 0);
- led_set_state(s, !!new_state != s->gpio_active_high);
+ led_set_state(s, !!new_state == s->gpio_active_high);
}
static void led_reset(DeviceState *dev)
--
2.39.2
- [Stable-7.2.7 27/62] hw/display/ramfb: plug slight guest-triggerable leak on mode setting, (continued)
- [Stable-7.2.7 27/62] hw/display/ramfb: plug slight guest-triggerable leak on mode setting, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 22/62] target/i386: Fix and add some comments next to SSE/AVX instructions., Michael Tokarev, 2023/11/09
- [Stable-7.2.7 28/62] chardev/char-pty: Avoid losing bytes when the other side just (re-)connected, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 29/62] linux-user/hppa: Fix struct target_sigcontext layout, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 30/62] amd_iommu: Fix APIC address check, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 31/62] migration/qmp: Fix crash on setting tls-authz with null, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 32/62] hw/audio/es1370: reset current sample counter, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 34/62] hw/pvrdma: Protect against buggy or malicious guest driver, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 33/62] disas/riscv: Fix the typo of inverted order of pmpaddr13 and pmpaddr14, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 35/62] migration: Fix analyze-migration read operation signedness, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 40/62] misc/led: LED state is set opposite of what is expected,
Michael Tokarev <=
- [Stable-7.2.7 46/62] Revert "linux-user: fix compat with glibc >= 2.36 sys/mount.h", Michael Tokarev, 2023/11/09
- [Stable-7.2.7 37/62] linux-user/sh4: Fix crashes on signal delivery, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 45/62] Revert "linux-user: add more compat ioctl definitions", Michael Tokarev, 2023/11/09
- [Stable-7.2.7 36/62] linux-user/mips: fix abort on integer overflow, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 38/62] lasips2: LASI PS/2 devices are not user-createable, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 41/62] tests/migration: Add -fno-stack-protector, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 44/62] qemu-iotests: 024: add rebasing test case for overlay_size > backing_size, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 39/62] hw/sd/sdhci: Block Size Register bits [14:12] is lost, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 42/62] tests/tcg: Add -fno-stack-protector, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 47/62] target/arm: Don't access TCG code when debugging with KVM, Michael Tokarev, 2023/11/09