Skip to contentSkip to conversation

Only delay boot if keyboard open

PATCH New Matan Ziv-Av 1 participant 1 message Dec 7, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 4/15 Only delay boot if keyboard open

---
 board/nokia/rx51/rx51.c      |    7 +++++++
 include/configs/nokia_rx51.h |    1 +
 2 files changed, 8 insertions(+), 0 deletions(-)
board/nokia/rx51/rx51.c +7 -0
index 3149a79..347d08a 100644
@@ -104,6 +104,13 @@ int misc_init_r(void)
 	setenv("nolo_atagaddr", buf);
 #endif
 
+	// set environment variable slide_sw
+	// if keyboard slide is open/close
+	omap_set_gpio_direction(71, 1);
+	unsigned val = omap_get_gpio_datain(71);
+	omap_free_gpio(71);
+	setenv("slide_sw", val ? "close" : "open");
+
 	dieid_num_r();
 
 	return 0;
include/configs/nokia_rx51.h +1 -0
index 45b942a..5c3b068 100644
@@ -200,6 +200,7 @@ int rx51_kp_getc(void);
 		"bootm ${nolo_kernaddr}\0"
 
 #define CONFIG_PREBOOT \
+	"if test $slide_sw != open ; then run noloboot; fi ;" \
 	"echo Extra commands:;" \
 	"echo run sercon - Use serial port for control.;" \
 	"echo run usbcon - Use usbtty for control.;" \
Signature · 7 lines
1.7.4.1


--nextPart1511561.nRVgJThL9n
Content-Disposition: attachment; filename="0005-Change-Wireless-LAN-mode-from-M4-to-M0.patch"
Content-Transfer-Encoding: 7Bit
Content-Type: text/x-patch; charset="UTF-8"; name="0005-Change-Wireless-LAN-mode-from-M4-to-M0.patch"