spi: spi-geni-qcom: Add a function to get the IRQ of a device's master

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 <sultan@kerneltoast.com>
This commit is contained in:
Sultan Alsawaf 2020-12-05 17:17:02 -08:00 committed by spakkkk
parent 1f386531d9
commit e480918789
2 changed files with 10 additions and 0 deletions

View File

@ -196,6 +196,13 @@ static inline void spi_geni_clk_conf(struct spi_geni_master *mas,
mb(); mb();
} }
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, static int get_spi_clk_cfg(u32 speed_hz, struct spi_geni_master *mas,
int *clk_idx, int *clk_div) int *clk_idx, int *clk_div)
{ {

View File

@ -11,4 +11,7 @@ struct spi_geni_qcom_ctrl_data {
u32 spi_inter_words_delay; u32 spi_inter_words_delay;
}; };
struct spi_device;
int geni_spi_get_master_irq(struct spi_device *spi_slv);
#endif /*__SPI_GENI_QCOM_HEADER___*/ #endif /*__SPI_GENI_QCOM_HEADER___*/