Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01ac17ec authored by Juuso Oikarinen's avatar Juuso Oikarinen Committed by John W. Linville
Browse files

wl1271: Add pre-power-on sleep



This patch adds a short delay before powering on the wl1271. Normally, it is
not needed, but if the wl1271 has been powered off shortly before, for reliable
firmware-booting this small stabilization delay is required.

Signed-off-by: default avatarJuuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: default avatarLuciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: default avatarLuciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 9ccd9217
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -458,7 +458,9 @@ int wl1271_plt_stop(struct wl1271 *wl);


#define WL1271_TX_QUEUE_MAX_LENGTH 20
#define WL1271_TX_QUEUE_MAX_LENGTH 20


/* WL1271 needs a 200ms sleep after power on */
/* WL1271 needs a 200ms sleep after power on, and a 20ms sleep before power
   on in case is has been shut down shortly before */
#define WL1271_PRE_POWER_ON_SLEEP 20 /* in miliseconds */
#define WL1271_POWER_ON_SLEEP 200 /* in miliseconds */
#define WL1271_POWER_ON_SLEEP 200 /* in miliseconds */


static inline bool wl1271_11a_enabled(void)
static inline bool wl1271_11a_enabled(void)
+1 −0
Original line number Original line Diff line number Diff line
@@ -618,6 +618,7 @@ static int wl1271_chip_wakeup(struct wl1271 *wl)
	struct wl1271_partition_set partition;
	struct wl1271_partition_set partition;
	int ret = 0;
	int ret = 0;


	msleep(WL1271_PRE_POWER_ON_SLEEP);
	wl1271_power_on(wl);
	wl1271_power_on(wl);
	msleep(WL1271_POWER_ON_SLEEP);
	msleep(WL1271_POWER_ON_SLEEP);
	wl1271_spi_reset(wl);
	wl1271_spi_reset(wl);