Skip to content
Commit 12028d2d authored by Mika Westerberg's avatar Mika Westerberg Committed by Linus Walleij
Browse files

gpiolib-acpi: introduce acpi_get_gpio_by_index() helper



Instead of open-coding ACPI GPIO resource lookup in each driver, we provide
a helper function analogous to Device Tree version that allows drivers to
specify which GPIO resource they are interested (using an index to the GPIO
resources). The function then finds out the correct resource, translates
the ACPI GPIO number to the corresponding Linux GPIO number and returns
that.

Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 2ce7c62d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment