mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] mfd: rave-sp: Fix rave_sp_emulated_get_status()
@ 2020-03-31 17:22 Andrey Smirnov
  2020-04-01  5:52 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Andrey Smirnov @ 2020-03-31 17:22 UTC (permalink / raw)
  To: Barebox List; +Cc: Andrey Smirnov

Original code in rave_sp_emulated_get_status() got the meaning of
RAVE_SP_STATUS_GS_FIRMWARE_MODE wrong. Invert it to correctly detect
if RAVE SP device is in bootloader mode or not.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/mfd/rave-sp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/rave-sp.c b/drivers/mfd/rave-sp.c
index 67f7d4c65..c6ad57d51 100644
--- a/drivers/mfd/rave-sp.c
+++ b/drivers/mfd/rave-sp.c
@@ -661,7 +661,7 @@ static int rave_sp_emulated_get_status(struct rave_sp *sp,
 		return ret;

 	status->general_status =
-		firmware_mode ? RAVE_SP_STATUS_GS_FIRMWARE_MODE : 0;
+		firmware_mode ? 0 : RAVE_SP_STATUS_GS_FIRMWARE_MODE;

 	return 0;
 }
--
2.21.0

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] mfd: rave-sp: Fix rave_sp_emulated_get_status()
  2020-03-31 17:22 [PATCH] mfd: rave-sp: Fix rave_sp_emulated_get_status() Andrey Smirnov
@ 2020-04-01  5:52 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2020-04-01  5:52 UTC (permalink / raw)
  To: Andrey Smirnov; +Cc: Barebox List

On Tue, Mar 31, 2020 at 10:22:52AM -0700, Andrey Smirnov wrote:
> Original code in rave_sp_emulated_get_status() got the meaning of
> RAVE_SP_STATUS_GS_FIRMWARE_MODE wrong. Invert it to correctly detect
> if RAVE SP device is in bootloader mode or not.
> 
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> ---
>  drivers/mfd/rave-sp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Sascha

> 
> diff --git a/drivers/mfd/rave-sp.c b/drivers/mfd/rave-sp.c
> index 67f7d4c65..c6ad57d51 100644
> --- a/drivers/mfd/rave-sp.c
> +++ b/drivers/mfd/rave-sp.c
> @@ -661,7 +661,7 @@ static int rave_sp_emulated_get_status(struct rave_sp *sp,
>  		return ret;
> 
>  	status->general_status =
> -		firmware_mode ? RAVE_SP_STATUS_GS_FIRMWARE_MODE : 0;
> +		firmware_mode ? 0 : RAVE_SP_STATUS_GS_FIRMWARE_MODE;
> 
>  	return 0;
>  }
> --
> 2.21.0
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-01  5:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-31 17:22 [PATCH] mfd: rave-sp: Fix rave_sp_emulated_get_status() Andrey Smirnov
2020-04-01  5:52 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox