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

Commit 25b61f71 authored by David Collins's avatar David Collins
Browse files

bif: qpnp-bsi: correct maximum transaction delay time



The value QPNP_BSI_MAX_TRANSMIT_CYCLES is used to define the
timeout interval when sending or receiving BIF data words.
The MIPI-BIF specification allows for some skew in the length
of bits received from a slave.  A '1' can take up to 3.5 tau_bif
and a '0' can take up to 1.5 tau_bif.  Therefore, the maximum word
transmission time can be calculated as follows.

max-transmission-time =
= n(1)_max * t(1)_max + (17 - n(1)_max) * t(0)_max + t(stop)_min
= 8 * 3.5 tau_bif + 9 * 1.5 tau_bif + 4.5 tau_bif
= 46 tau_bif

Change QPNP_BSI_MAX_TRANSMIT_CYCLES to 46 in order to match the
value calculated from the MIPI-BIF specification.

Change-Id: Ibb199b54c99cc2de29ae54f6f891a667a30213b2
Signed-off-by: default avatarDavid Collins <collinsd@codeaurora.org>
parent 1fb2dc25
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -170,7 +170,7 @@ static const struct qpnp_bsi_tau qpnp_bsi_tau_period = {
#define QPNP_BSI_DEFAULT_VID_REF_UV	1800000

/* These have units of tau_bif. */
#define QPNP_BSI_MAX_TRANSMIT_CYCLES	36
#define QPNP_BSI_MAX_TRANSMIT_CYCLES	46
#define QPNP_BSI_MIN_RECEIVE_CYCLES	24
#define QPNP_BSI_MAX_BUS_QUERY_CYCLES	17