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:
parent
1f386531d9
commit
e480918789
@ -196,6 +196,13 @@ static inline void spi_geni_clk_conf(struct spi_geni_master *mas,
|
||||
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,
|
||||
int *clk_idx, int *clk_div)
|
||||
{
|
||||
|
@ -11,4 +11,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___*/
|
||||
|
Loading…
Reference in New Issue
Block a user