Add a function to the bif-core driver which provides a means to
write new BIF data objects into the non-volatile memory (NVM)
of a BIF slave. Also add functions which can be used to
overwrite or delete an existing BIF object.
Change-Id: I6cd48409c696bd60a4d52b0fac8782c58d744df1
Signed-off-by: David Collins <collinsd@codeaurora.org>
Update the BIF slave matching criteria so that BIF consumer
drivers can find BIF slaves which contain BIF objects of a
certain type. Also add functions which allow consumers to get
handles for the BIF objects which match specified search
criteria.
Change-Id: Ice7042ecb3829db8f5601d91940c5f7bef383d3d
Signed-off-by: David Collins <collinsd@codeaurora.org>
Add support for reading and writing the non-volatile memory (NVM)
of BIF slaves.
Change-Id: Ie422ec57327102584bab2b039a733505320b065b
Signed-off-by: David Collins <collinsd@codeaurora.org>
Add support in the bif-core driver for enabling and disabling
automatic task triggering for specified tasks. One example of
auto task triggering is the periodic polling method employed by
the BIF slave temperature function to check for high or low
temperature conditions.
Change-Id: If01071debd430c084be344549ecf2e8b281d4e05
Signed-off-by: David Collins <collinsd@codeaurora.org>
Add a length check in the non-volatile memory (NVM) BIF object
parsing function so that it does not attempt to read past the
end of the NVM address space of the BIF slave.
Change-Id: Iafd40e61e7ca0bfa2e2be95c294a0e17d5cf515c
Signed-off-by: David Collins <collinsd@codeaurora.org>
Mark all stub functions in the BIF consumer.h header file with
'static inline' in order to avoid compilation errors in files
that include consumer.h when CONFIG_BIF=n.
Change-Id: I3a5c7dc58f8eed93b1f30d0e021b65ab200b4271
Signed-off-by: David Collins <collinsd@codeaurora.org>
Move functions calls which clear PMIC BSI hardware errors and
reset IRQ flags to immediately before BIF transmit calls. This
ensures that the BSI RX and TX blocks are in the correct state
before errors are cleared.
Change-Id: Id266f076968d48484a9366274d30e8ff6f47dc23
Signed-off-by: David Collins <collinsd@codeaurora.org>
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: David Collins <collinsd@codeaurora.org>
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: David Collins <collinsd@codeaurora.org>
Fall back and use time-invariant individual transactions for BIF
slave register read and write operations if high level read or
write controller callback functions fail.
Change-Id: Ieaf479717383719dc1f5b94cc4be72f2e8901127
Signed-off-by: David Collins <collinsd@codeaurora.org>
Ensure that BIF data of secondary slaves is parsed when selecting
the secondary slaves based on a BIF secondary slave object read
out of the primary slave.
Change-Id: Id0daceb37c5c052fd149cd7f8015bb54e5b425fb
Signed-off-by: David Collins <collinsd@codeaurora.org>
Goodix GT9xx touchscreen driver supports up to six groups of config
data and uses hardware GPIO configuration to select which one will
be used. This change allows these six config groups to be loaded
from devicetree.
Change-Id: I9dfd698e7084164688dd964ed914d5eecc75ecd3
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
Replace non-standard debug function with the conventional
functions in Goodix driver. And remove unnecessary debug
function used in Goodix driver.
Change-Id: Ia89d225333c1309710aab67b9c406784567e3050
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
Add dynamic detection support to goodix driver, where
the driver tries to read the chip id and make sure
it is communicating with the right chip.
gtp_read_version is modified to gtp_read_fw_version
which reads the firmware version from the controller
and will be used during fw update process.
CRs-fixed: 538818
Change-Id: I2dc51b84f817413da6bf9b266e2fe7e0bb09c4bc
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
Even if external micbias is used for recording, callback
needs to be registered to setup for recording. Register
same callback as used with internal micbias.
CRs-Fixed: 550513
Change-Id: If7f606f265d46aa20a29fc97afd2468e7fe97379
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>