diff options
author | Charles Keepax <ckeepax@opensource.cirrus.com> | 2019-06-27 11:24:09 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2019-06-29 13:17:44 +0200 |
commit | 16c9db1dd84cef50c819733a19def842bdb3d5ef (patch) | |
tree | 991e9206488f2d1ed3cbce7757c0d11c87e53e3b /drivers/i2c/i2c-core.h | |
parent | i2c: acpi: Factor out getting the IRQ from ACPI (diff) | |
download | linux-16c9db1dd84cef50c819733a19def842bdb3d5ef.tar.xz linux-16c9db1dd84cef50c819733a19def842bdb3d5ef.zip |
i2c: core: Move ACPI IRQ handling to probe time
Bring the ACPI path in sync with the device tree path and handle all the
IRQ fetching at probe time. This leaves the only IRQ handling at device
registration time being that which is passed directly through the board
info as either a resource or an actual IRQ number.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/i2c-core.h')
-rw-r--r-- | drivers/i2c/i2c-core.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/i2c/i2c-core.h b/drivers/i2c/i2c-core.h index 8f3a08dc73a2..15c1411f35f0 100644 --- a/drivers/i2c/i2c-core.h +++ b/drivers/i2c/i2c-core.h @@ -72,6 +72,8 @@ const struct acpi_device_id * i2c_acpi_match_device(const struct acpi_device_id *matches, struct i2c_client *client); void i2c_acpi_register_devices(struct i2c_adapter *adap); + +int i2c_acpi_get_irq(struct i2c_client *client); #else /* CONFIG_ACPI */ static inline void i2c_acpi_register_devices(struct i2c_adapter *adap) { } static inline const struct acpi_device_id * @@ -80,6 +82,11 @@ i2c_acpi_match_device(const struct acpi_device_id *matches, { return NULL; } + +static inline int i2c_acpi_get_irq(struct i2c_client *client) +{ + return 0; +} #endif /* CONFIG_ACPI */ extern struct notifier_block i2c_acpi_notifier; |