diff options
author | Arminder Singh <arminders208@outlook.com> | 2022-11-05 07:56:49 -0400 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2022-11-12 21:30:16 +0100 |
commit | e826192cc26bd69746bbf22e6bdf72b87cb3d97b (patch) | |
tree | 4804e25a3a288f03b4eddb69a05f72e32ee1d574 /drivers/i2c/busses/i2c-pasemi-core.h | |
parent | 8502bee5584235943c4d371597c740d6779991db (diff) |
i2c: /pasemi: PASemi I2C controller IRQ enablement
This patch adds IRQ support to the PASemi I2C controller driver to
increase the performace of I2C transactions on platforms with PASemi I2C
controllers. While primarily intended for Apple silicon platforms, this
patch should also help in enabling IRQ support for older PASemi hardware
as well should the need arise.
This version of the patch has been tested on an M1 Ultra Mac Studio,
as well as an M1 MacBook Pro, and userspace launches successfully
while using the IRQ path for I2C transactions.
Signed-off-by: Arminder Singh <arminders208@outlook.com>
Reviewed-by: Sven Peter <sven@svenpeter.dev>
Reviewed-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'drivers/i2c/busses/i2c-pasemi-core.h')
-rw-r--r-- | drivers/i2c/busses/i2c-pasemi-core.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-pasemi-core.h b/drivers/i2c/busses/i2c-pasemi-core.h index 4655124a37f3..88821f4e8a9f 100644 --- a/drivers/i2c/busses/i2c-pasemi-core.h +++ b/drivers/i2c/busses/i2c-pasemi-core.h @@ -7,6 +7,7 @@ #include <linux/i2c-smbus.h> #include <linux/io.h> #include <linux/kernel.h> +#include <linux/completion.h> #define PASEMI_HW_REV_PCI -1 @@ -16,6 +17,10 @@ struct pasemi_smbus { void __iomem *ioaddr; unsigned int clk_div; int hw_rev; + int use_irq; + struct completion irq_completion; }; int pasemi_i2c_common_probe(struct pasemi_smbus *smbus); + +irqreturn_t pasemi_irq_handler(int irq, void *dev_id); |