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

Commit 7db43c1b authored by Lior Barenboim's avatar Lior Barenboim
Browse files

QBT1000: fix release change SPI ownership and vote for sleep



This fix modifies the sequence in qbt1000_release() and
qbt1000_remove() functions to first change SPI ownership to SSC,
only then request SSC to vote for sleep.

Change-Id: I1b6a5a407741665bd99e18c7a874d59f3e3a98f4
Signed-off-by: default avatarLior Barenboim <liorb@codeaurora.org>
parent 13fe987c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -721,8 +721,8 @@ static int qbt1000_release(struct inode *inode, struct file *file)
	if (drvdata->sensor_conn_type == SPI) {
		clocks_off(drvdata);
	} else if (drvdata->sensor_conn_type == SSC_SPI) {
		qbt1000_sns_keep_alive_req(drvdata, 0);
		qbt1000_set_blsp_ownership(drvdata, drvdata->ssc_subsys_id);
		qbt1000_sns_keep_alive_req(drvdata, 0);
		qbt1000_sns_close_req(drvdata);
		drvdata->ssc_state = 0;
	}
@@ -1239,8 +1239,8 @@ static int qbt1000_remove(struct platform_device *pdev)
	if (drvdata->sensor_conn_type == SPI) {
		clocks_off(drvdata);
	} else if (drvdata->sensor_conn_type == SSC_SPI) {
		qbt1000_sns_keep_alive_req(drvdata, 0);
		qbt1000_set_blsp_ownership(drvdata, drvdata->ssc_subsys_id);
		qbt1000_sns_keep_alive_req(drvdata, 0);
		qbt1000_sns_close_req(drvdata);
		qmi_handle_destroy(drvdata->qmi_handle);
		qmi_svc_event_notifier_unregister(QBT1000_SNS_SERVICE_ID,