summaryrefslogtreecommitdiff
path: root/drivers/i2c/i2c-core.h
diff options
context:
space:
mode:
authorWolfram Sang <wsa@the-dreams.de>2017-05-23 17:22:23 +0300
committerWolfram Sang <wsa@the-dreams.de>2017-05-31 22:01:04 +0300
commit53f8f7c5cf145d639ebd6d13cfdf2e3e9764add3 (patch)
tree2b69acd17f0daac9bc508f7135c50cffcb20bc9a /drivers/i2c/i2c-core.h
parent5bf4fa7daea6d5257357b613d0bb81c68e2d1af2 (diff)
downloadlinux-53f8f7c5cf145d639ebd6d13cfdf2e3e9764add3.tar.xz
i2c: break out ACPI support into separate file
Removes some ifdeffery. Also add the new file to the relevant MAINTAINERS section. Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.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.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/i2c/i2c-core.h b/drivers/i2c/i2c-core.h
index 22151c88e885..3b63f5e5b89c 100644
--- a/drivers/i2c/i2c-core.h
+++ b/drivers/i2c/i2c-core.h
@@ -30,6 +30,21 @@ extern int __i2c_first_dynamic_bus_num;
int i2c_check_addr_validity(unsigned addr, unsigned short flags);
int i2c_check_7bit_addr_validity_strict(unsigned short addr);
+#ifdef CONFIG_ACPI
+void i2c_acpi_register_devices(struct i2c_adapter *adap);
+#else /* CONFIG_ACPI */
+static inline void i2c_acpi_register_devices(struct i2c_adapter *adap) { }
+#endif /* CONFIG_ACPI */
+extern struct notifier_block i2c_acpi_notifier;
+
+#ifdef CONFIG_ACPI_I2C_OPREGION
+int i2c_acpi_install_space_handler(struct i2c_adapter *adapter);
+void i2c_acpi_remove_space_handler(struct i2c_adapter *adapter);
+#else /* CONFIG_ACPI_I2C_OPREGION */
+static inline int i2c_acpi_install_space_handler(struct i2c_adapter *adapter) { return 0; }
+static inline void i2c_acpi_remove_space_handler(struct i2c_adapter *adapter) { }
+#endif /* CONFIG_ACPI_I2C_OPREGION */
+
#ifdef CONFIG_OF
void of_i2c_register_devices(struct i2c_adapter *adap);
#else