Lines Matching full:lookup

727 	struct acpi_gpio_lookup *lookup = data;  in acpi_populate_gpio_lookup()  local
732 if (!lookup->desc) { in acpi_populate_gpio_lookup()
738 if (lookup->info.quirks & ACPI_GPIO_QUIRK_ONLY_GPIOIO && gpioint) in acpi_populate_gpio_lookup()
739 lookup->index++; in acpi_populate_gpio_lookup()
741 if (lookup->n++ != lookup->index) in acpi_populate_gpio_lookup()
744 pin_index = lookup->pin_index; in acpi_populate_gpio_lookup()
748 if (lookup->info.quirks & ACPI_GPIO_QUIRK_ABSOLUTE_NUMBER) in acpi_populate_gpio_lookup()
753 lookup->desc = desc; in acpi_populate_gpio_lookup()
754 lookup->info.pin_config = agpio->pin_config; in acpi_populate_gpio_lookup()
755 lookup->info.debounce = agpio->debounce_timeout; in acpi_populate_gpio_lookup()
756 lookup->info.gpioint = gpioint; in acpi_populate_gpio_lookup()
757 lookup->info.wake_capable = agpio->wake_capable == ACPI_WAKE_CAPABLE; in acpi_populate_gpio_lookup()
766 if (lookup->info.gpioint) { in acpi_populate_gpio_lookup()
767 lookup->info.polarity = agpio->polarity; in acpi_populate_gpio_lookup()
768 lookup->info.triggering = agpio->triggering; in acpi_populate_gpio_lookup()
770 lookup->info.polarity = lookup->active_low; in acpi_populate_gpio_lookup()
773 lookup->info.flags = acpi_gpio_to_gpiod_flags(agpio, lookup->info.polarity); in acpi_populate_gpio_lookup()
779 static int acpi_gpio_resource_lookup(struct acpi_gpio_lookup *lookup, in acpi_gpio_resource_lookup() argument
782 struct acpi_device *adev = lookup->info.adev; in acpi_gpio_resource_lookup()
790 lookup); in acpi_gpio_resource_lookup()
796 if (!lookup->desc) in acpi_gpio_resource_lookup()
800 *info = lookup->info; in acpi_gpio_resource_lookup()
806 struct acpi_gpio_lookup *lookup) in acpi_gpio_property_lookup() argument
826 * The property was found and resolved, so need to lookup the GPIO based in acpi_gpio_property_lookup()
834 lookup->index = args.args[0]; in acpi_gpio_property_lookup()
835 lookup->pin_index = args.args[1]; in acpi_gpio_property_lookup()
836 lookup->active_low = !!args.args[2]; in acpi_gpio_property_lookup()
838 lookup->info.adev = to_acpi_device_node(args.fwnode); in acpi_gpio_property_lookup()
839 lookup->info.quirks = quirks; in acpi_gpio_property_lookup()
870 struct acpi_gpio_lookup lookup; in acpi_get_gpiod_by_index() local
876 memset(&lookup, 0, sizeof(lookup)); in acpi_get_gpiod_by_index()
877 lookup.index = index; in acpi_get_gpiod_by_index()
883 propname, index, &lookup); in acpi_get_gpiod_by_index()
888 dev_name(&lookup.info.adev->dev), lookup.index, in acpi_get_gpiod_by_index()
889 lookup.pin_index, lookup.active_low); in acpi_get_gpiod_by_index()
892 lookup.info.adev = adev; in acpi_get_gpiod_by_index()
895 ret = acpi_gpio_resource_lookup(&lookup, info); in acpi_get_gpiod_by_index()
896 return ret ? ERR_PTR(ret) : lookup.desc; in acpi_get_gpiod_by_index()
950 dev_dbg(&adev->dev, "refusing GpioInt() entry when doing GPIOD_OUT_* lookup\n"); in acpi_find_gpio()
968 * GPIO lookup to get to the GPIO resource with the relevant information and use
978 struct acpi_gpio_lookup lookup; in acpi_node_get_gpiod() local
992 memset(&lookup, 0, sizeof(lookup)); in acpi_node_get_gpiod()
993 lookup.index = index; in acpi_node_get_gpiod()
995 ret = acpi_gpio_property_lookup(fwnode, propname, index, &lookup); in acpi_node_get_gpiod()
999 ret = acpi_gpio_resource_lookup(&lookup, info); in acpi_node_get_gpiod()
1000 return ret ? ERR_PTR(ret) : lookup.desc; in acpi_node_get_gpiod()