[coreboot-gerrit] Patch set updated for coreboot: ec/lenovo/h8: re-factor handling of power_management_beeps

Francis Rowe (info@gluglug.org.uk) gerrit at coreboot.org
Sat Jun 13 01:40:16 CEST 2015


Francis Rowe (info at gluglug.org.uk) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10531

-gerrit

commit 9efef07620d27171cb8160c9dcd3176f0cb63d72
Author: Francis Rowe <info at gluglug.org.uk>
Date:   Fri Jun 12 23:10:52 2015 +0100

    ec/lenovo/h8: re-factor handling of power_management_beeps
    
    Also add some comments.
    
    Change-Id: I189c5ce382e1a270d24b9b6e897358268b9a141d
    Signed-off-by: Francis Rowe <info at gluglug.org.uk>
---
 src/ec/lenovo/h8/h8.c | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c
index 46480f4..1079be2 100644
--- a/src/ec/lenovo/h8/h8.c
+++ b/src/ec/lenovo/h8/h8.c
@@ -2,6 +2,7 @@
  * This file is part of the coreboot project.
  *
  * Copyright (C) 2011 Sven Schnelle <svens at stackframe.org>
+ * Copyright (C) 2015 Francis Rowe <info at gluglug.org.uk>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -212,14 +213,21 @@ static void h8_enable(struct device *dev)
 	beepmask0 = conf->beepmask0;
 	beepmask1 = conf->beepmask1;
 
-	if (conf->has_power_management_beeps
-	    && get_option(&val, "power_management_beeps") == CB_SUCCESS
-	    && val == 0) {
-		beepmask0 = 0x00;
-		beepmask1 = 0x00;
-	}
-
 	if (conf->has_power_management_beeps) {
+		/* Controls whether a "beep" occurs, when connecting
+		 * or disconnecting a power supply for charging the battery
+		 */
+		if (get_option(&val, "power_management_beeps") != CB_SUCCESS)
+			val = 1;
+		if (!val) {
+			beepmask0 = 0x00;
+			beepmask1 = 0x00;
+		}
+
+		/*
+		 * Controls whether a "beep" occurs, when the
+		 * battery reaches critically low levels
+		 */
 		if (get_option(&val, "low_battery_beep") != CB_SUCCESS)
 			val = 1;
 		if (val)



More information about the coreboot-gerrit mailing list