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

Commit 1dfb678f authored by Arjun Singh's avatar Arjun Singh Committed by Gerrit - the friendly Code Review server
Browse files

soc: qcom: bgcom: fixes Glink faliure on BG soft reset.



Sends BG ssr  notification to Glink to clear channels state

Change-Id: If759973d2e22a754896c16d97cf432bdb6eb14d6
Signed-off-by: default avatarArjun Singh <arsingh@codeaurora.org>
parent f38ea00b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -208,4 +208,6 @@ int bgcom_resume(void **handle);

int bgcom_set_spi_state(enum bgcom_spi_state state);

void bgcom_bgdown_handler(void);

#endif /* BGCOM_H */
+2 −1
Original line number Diff line number Diff line
/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -285,6 +285,7 @@ static int ssr_bg_cb(struct notifier_block *this,
	switch (opcode) {
	case SUBSYS_BEFORE_SHUTDOWN:
		bge.e_type = BG_BEFORE_POWER_DOWN;
		bgcom_bgdown_handler();
		bgcom_set_spi_state(BGCOM_SPI_BUSY);
		send_uevent(&bge);
		break;
+8 −1
Original line number Diff line number Diff line
/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -261,6 +261,13 @@ void send_event(enum bgcom_event_type event,
	}
}

void bgcom_bgdown_handler(void)
{
	send_event(BGCOM_EVENT_RESET_OCCURRED, NULL);
	g_slav_status_reg = 0;
}
EXPORT_SYMBOL(bgcom_bgdown_handler);

static void parse_fifo(uint8_t *data, union bgcom_event_data_type *event_data)
{
	uint16_t p_len;