diff options
author | Wolfram Sang <wsa@the-dreams.de> | 2017-05-23 16:22:23 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2017-05-31 21:01:04 +0200 |
commit | 53f8f7c5cf145d639ebd6d13cfdf2e3e9764add3 (patch) | |
tree | 2b69acd17f0daac9bc508f7135c50cffcb20bc9a /drivers/i2c/i2c-core.h | |
parent | i2c: break out OF support into separate file (diff) | |
download | linux-53f8f7c5cf145d639ebd6d13cfdf2e3e9764add3.tar.xz linux-53f8f7c5cf145d639ebd6d13cfdf2e3e9764add3.zip |
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 '')
-rw-r--r-- | drivers/i2c/i2c-core.h | 15 |
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 |