i2c: qcom-geni: Store DMA mapping data in geni_i2c_dev struct
authorRoja Rani Yarubandi <rojay@codeaurora.org>
Mon, 21 Dec 2020 12:38:00 +0000 (18:08 +0530)
committerWolfram Sang <wsa@kernel.org>
Tue, 5 Jan 2021 15:22:33 +0000 (16:22 +0100)
commit357ee8841d0b7bd822f25fc768afbc0c2ab7e47b
tree4e094545629f8435aec1b609eb55f81e8ddf7c49
parent5581b4167c0f309d5556673d93e96fb90b31c64d
i2c: qcom-geni: Store DMA mapping data in geni_i2c_dev struct

Store DMA mapping data in geni_i2c_dev struct to enhance DMA mapping
data scope. For example during shutdown callback to unmap DMA mapping,
this stored DMA mapping data can be used to call geni_se_tx_dma_unprep
and geni_se_rx_dma_unprep functions.

Add two helper functions geni_i2c_rx_msg_cleanup and
geni_i2c_tx_msg_cleanup to unwrap the things after rx/tx FIFO/DMA
transfers, so that the same can be used in geni_i2c_stop_xfer()
function during shutdown callback.

Signed-off-by: Roja Rani Yarubandi <rojay@codeaurora.org>
Reviewed-by: Akash Asthana <akashast@codeaurora.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-qcom-geni.c