diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2018-11-28 14:45:29 +0300 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2018-12-03 22:40:02 +0300 |
commit | 0d5102fe85302aa06a3e5fd8e63b09294aed4c48 (patch) | |
tree | 45b9e87087ae806e017978ed2b4c4eca29a64775 /include/linux/acpi.h | |
parent | 5f59d6a1109ce6ade2ad0ba2eb09d8011155daaf (diff) | |
download | linux-0d5102fe85302aa06a3e5fd8e63b09294aed4c48.tar.xz |
i2c: acpi: Introduce i2c_acpi_get_i2c_resource() helper
Besides current two users one more is coming. Definitely makes sense to
introduce a helper.
No functional change intended.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'include/linux/acpi.h')
-rw-r--r-- | include/linux/acpi.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index ed80f147bd50..6afc6e3c4c5c 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -1054,6 +1054,17 @@ static inline int acpi_dev_gpio_irq_get(struct acpi_device *adev, int index) } #endif +#if defined(CONFIG_ACPI) && IS_ENABLED(CONFIG_I2C) +bool i2c_acpi_get_i2c_resource(struct acpi_resource *ares, + struct acpi_resource_i2c_serialbus **i2c); +#else +static inline bool i2c_acpi_get_i2c_resource(struct acpi_resource *ares, + struct acpi_resource_i2c_serialbus **i2c) +{ + return false; +} +#endif + /* Device properties */ #ifdef CONFIG_ACPI |