* [PATCH v2 RESEND] misc/led: LED state is set opposite of what is expected
@ 2023-10-24 19:19 Glenn Miles
2023-10-25 12:59 ` Peter Maydell
2023-10-27 11:51 ` Peter Maydell
0 siblings, 2 replies; 4+ messages in thread
From: Glenn Miles @ 2023-10-24 19:19 UTC (permalink / raw)
To: qemu-devel
Cc: Glenn Miles, qemu-arm, clg, andrew, joel, philmd, peter.maydell
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.
Signed-off-by: Glenn Miles <milesg@linux.vnet.ibm.com>
---
Changes from v1:
- Changed logic for readability
hw/misc/led.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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.31.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 RESEND] misc/led: LED state is set opposite of what is expected
2023-10-24 19:19 [PATCH v2 RESEND] misc/led: LED state is set opposite of what is expected Glenn Miles
@ 2023-10-25 12:59 ` Peter Maydell
2023-10-27 11:51 ` Peter Maydell
1 sibling, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2023-10-25 12:59 UTC (permalink / raw)
To: Glenn Miles; +Cc: qemu-devel, qemu-arm, clg, andrew, joel, philmd
On Tue, 24 Oct 2023 at 20:20, Glenn Miles <milesg@linux.vnet.ibm.com> wrote:
>
> 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.
>
> Signed-off-by: Glenn Miles <milesg@linux.vnet.ibm.com>
> ---
>
> Changes from v1:
> - Changed logic for readability
>
> hw/misc/led.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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.31.1
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 RESEND] misc/led: LED state is set opposite of what is expected
2023-10-24 19:19 [PATCH v2 RESEND] misc/led: LED state is set opposite of what is expected Glenn Miles
2023-10-25 12:59 ` Peter Maydell
@ 2023-10-27 11:51 ` Peter Maydell
2023-10-27 13:33 ` Philippe Mathieu-Daudé
1 sibling, 1 reply; 4+ messages in thread
From: Peter Maydell @ 2023-10-27 11:51 UTC (permalink / raw)
To: Glenn Miles; +Cc: qemu-devel, qemu-arm, clg, andrew, joel, philmd
On Tue, 24 Oct 2023 at 20:20, Glenn Miles <milesg@linux.vnet.ibm.com> wrote:
>
> 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.
>
> Signed-off-by: Glenn Miles <milesg@linux.vnet.ibm.com>
> ---
Applied to target-arm.next, thanks.
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 RESEND] misc/led: LED state is set opposite of what is expected
2023-10-27 11:51 ` Peter Maydell
@ 2023-10-27 13:33 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-10-27 13:33 UTC (permalink / raw)
To: Peter Maydell, Glenn Miles; +Cc: qemu-devel, qemu-arm, clg, andrew, joel
On 27/10/23 13:51, Peter Maydell wrote:
> On Tue, 24 Oct 2023 at 20:20, Glenn Miles <milesg@linux.vnet.ibm.com> wrote:
>>
>> 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.
>>
>> Signed-off-by: Glenn Miles <milesg@linux.vnet.ibm.com>
>> ---
>
>
>
> Applied to target-arm.next, thanks.
Sorry I'm still catching up.
Fixes: ddb67f6402 ("hw/misc/led: Allow connecting from GPIO output")
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-10-27 13:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-24 19:19 [PATCH v2 RESEND] misc/led: LED state is set opposite of what is expected Glenn Miles
2023-10-25 12:59 ` Peter Maydell
2023-10-27 11:51 ` Peter Maydell
2023-10-27 13:33 ` Philippe Mathieu-Daudé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).