diff options
Diffstat (limited to 'drivers/gpio/gpiolib-acpi.c')
-rw-r--r-- | drivers/gpio/gpiolib-acpi.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c index fdee8afa5339..2b6fdc9947f7 100644 --- a/drivers/gpio/gpiolib-acpi.c +++ b/drivers/gpio/gpiolib-acpi.c | |||
@@ -728,6 +728,16 @@ static struct gpio_desc *acpi_get_gpiod_by_index(struct acpi_device *adev, | |||
728 | return ret ? ERR_PTR(ret) : lookup.desc; | 728 | return ret ? ERR_PTR(ret) : lookup.desc; |
729 | } | 729 | } |
730 | 730 | ||
731 | static bool acpi_can_fallback_to_crs(struct acpi_device *adev, | ||
732 | const char *con_id) | ||
733 | { | ||
734 | /* Never allow fallback if the device has properties */ | ||
735 | if (acpi_dev_has_props(adev) || adev->driver_gpios) | ||
736 | return false; | ||
737 | |||
738 | return con_id == NULL; | ||
739 | } | ||
740 | |||
731 | struct gpio_desc *acpi_find_gpio(struct device *dev, | 741 | struct gpio_desc *acpi_find_gpio(struct device *dev, |
732 | const char *con_id, | 742 | const char *con_id, |
733 | unsigned int idx, | 743 | unsigned int idx, |
@@ -1264,15 +1274,6 @@ int acpi_gpio_count(struct device *dev, const char *con_id) | |||
1264 | return count ? count : -ENOENT; | 1274 | return count ? count : -ENOENT; |
1265 | } | 1275 | } |
1266 | 1276 | ||
1267 | bool acpi_can_fallback_to_crs(struct acpi_device *adev, const char *con_id) | ||
1268 | { | ||
1269 | /* Never allow fallback if the device has properties */ | ||
1270 | if (acpi_dev_has_props(adev) || adev->driver_gpios) | ||
1271 | return false; | ||
1272 | |||
1273 | return con_id == NULL; | ||
1274 | } | ||
1275 | |||
1276 | /* Run deferred acpi_gpiochip_request_irqs() */ | 1277 | /* Run deferred acpi_gpiochip_request_irqs() */ |
1277 | static int acpi_gpio_handle_deferred_request_irqs(void) | 1278 | static int acpi_gpio_handle_deferred_request_irqs(void) |
1278 | { | 1279 | { |