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

Commit 9e7a1556 authored by David Collins's avatar David Collins
Browse files

bif: qpnp-bsi: eliminate redundant RBL1 command during register read



When performing a BIF slave register read of a single register
there is no need to specify a burst read length of 1.  All reads
are assumed to be of length 1 unless specified otherwise.
Therefore, remove the redundant RBL1 BIF bus command.

Change-Id: I000637a4bec5f6d2c9b48fa848c63779745b662a
Signed-off-by: default avatarDavid Collins <collinsd@codeaurora.org>
parent 25b61f71
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -826,10 +826,10 @@ static int qpnp_bsi_send_burst_length(struct qpnp_bsi_chip *chip, int burst_len)
	/*
	 * Send burst read length bus commands according to the following:
	 *
	 * 1                     --> No RBE or RBL
	 * 2  - 15  = x          --> RBLx
	 * 16 - 255 = 16 * y + x --> RBEy and RBLx (RBL0 not sent)
	 * 256                   --> RBL0
	 * 0-255 = 16 * y + x --> RBEy and RBLx
	 *		RBE0 does not need to be sent
	 *		RBL0 does not need to be sent
	 */
	if (burst_len == 256) {
		rc = qpnp_bsi_issue_transaction(chip, BIF_TRANS_BC,
@@ -851,7 +851,7 @@ static int qpnp_bsi_send_burst_length(struct qpnp_bsi_chip *chip, int burst_len)
			return rc;
	}

	if (burst_len % 16) {
	if (burst_len % 16 && burst_len > 1) {
		rc = qpnp_bsi_issue_transaction(chip, BIF_TRANS_BC,
					BIF_CMD_RBL + (burst_len % 16));
		if (rc)