Skip to content
This repository has been archived by the owner on Jul 30, 2022. It is now read-only.

Commit

Permalink
spi-geni-qcom: Add a function to get the IRQ of a device's master
Browse files Browse the repository at this point in the history
Exporting the IRQ of a SPI device's master controller can help device
drivers utilize the PM QoS API to force the SPI master IRQ to be
serviced with low latency.

Signed-off-by: Sultan Alsawaf <[email protected]>
Signed-off-by: Yaroslav Furman <[email protected]>
Change-Id: I4d7c597b390438c6bda97d94062794bf08c30b21
Signed-off-by: rzlamrr <[email protected]>
Signed-off-by: fajar <[email protected]>
  • Loading branch information
kerneltoast authored and fajar3109 committed May 28, 2022
1 parent b2fc18d commit 558b6bf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/spi/spi-geni-qcom.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,13 @@ static int spi_slv_abort(struct spi_master *spi)
return 0;
}

int geni_spi_get_master_irq(struct spi_device *spi_slv)
{
struct spi_geni_master *mas = spi_master_get_devdata(spi_slv->master);

return mas->irq;
}

static int get_spi_clk_cfg(u32 speed_hz, struct spi_geni_master *mas,
int *clk_idx, int *clk_div)
{
Expand Down
3 changes: 3 additions & 0 deletions include/linux/spi/spi-geni-qcom.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ struct spi_geni_qcom_ctrl_data {
u32 spi_inter_words_delay;
};

struct spi_device;
int geni_spi_get_master_irq(struct spi_device *spi_slv);

#endif /*__SPI_GENI_QCOM_HEADER___*/

0 comments on commit 558b6bf

Please sign in to comment.