Lines Matching full:lookup

756 	struct acpi_gpio_lookup *lookup = data;  in acpi_populate_gpio_lookup()  local
761 if (!lookup->desc) { in acpi_populate_gpio_lookup()
767 if (lookup->info.quirks & ACPI_GPIO_QUIRK_ONLY_GPIOIO && gpioint) in acpi_populate_gpio_lookup()
768 lookup->index++; in acpi_populate_gpio_lookup()
770 if (lookup->n++ != lookup->index) in acpi_populate_gpio_lookup()
773 pin_index = lookup->pin_index; in acpi_populate_gpio_lookup()
777 if (lookup->info.quirks & ACPI_GPIO_QUIRK_ABSOLUTE_NUMBER) in acpi_populate_gpio_lookup()
782 lookup->desc = desc; in acpi_populate_gpio_lookup()
783 lookup->info.pin_config = agpio->pin_config; in acpi_populate_gpio_lookup()
784 lookup->info.debounce = agpio->debounce_timeout; in acpi_populate_gpio_lookup()
785 lookup->info.gpioint = gpioint; in acpi_populate_gpio_lookup()
786 lookup->info.wake_capable = acpi_gpio_irq_is_wake(&lookup->info.adev->dev, agpio); in acpi_populate_gpio_lookup()
795 if (lookup->info.gpioint) { in acpi_populate_gpio_lookup()
796 lookup->info.polarity = agpio->polarity; in acpi_populate_gpio_lookup()
797 lookup->info.triggering = agpio->triggering; in acpi_populate_gpio_lookup()
799 lookup->info.polarity = lookup->active_low; in acpi_populate_gpio_lookup()
802 lookup->info.flags = acpi_gpio_to_gpiod_flags(agpio, lookup->info.polarity); in acpi_populate_gpio_lookup()
808 static int acpi_gpio_resource_lookup(struct acpi_gpio_lookup *lookup, in acpi_gpio_resource_lookup() argument
811 struct acpi_device *adev = lookup->info.adev; in acpi_gpio_resource_lookup()
819 lookup); in acpi_gpio_resource_lookup()
825 if (!lookup->desc) in acpi_gpio_resource_lookup()
829 *info = lookup->info; in acpi_gpio_resource_lookup()
835 struct acpi_gpio_lookup *lookup) in acpi_gpio_property_lookup() argument
852 * The property was found and resolved, so need to lookup the GPIO based in acpi_gpio_property_lookup()
860 lookup->index = args.args[0]; in acpi_gpio_property_lookup()
861 lookup->pin_index = args.args[1]; in acpi_gpio_property_lookup()
862 lookup->active_low = !!args.args[2]; in acpi_gpio_property_lookup()
864 lookup->info.adev = to_acpi_device_node(args.fwnode); in acpi_gpio_property_lookup()
865 lookup->info.quirks = quirks; in acpi_gpio_property_lookup()
899 struct acpi_gpio_lookup lookup; in acpi_get_gpiod_by_index() local
902 memset(&lookup, 0, sizeof(lookup)); in acpi_get_gpiod_by_index()
903 lookup.index = index; in acpi_get_gpiod_by_index()
909 propname, index, &lookup); in acpi_get_gpiod_by_index()
914 dev_name(&lookup.info.adev->dev), lookup.index, in acpi_get_gpiod_by_index()
915 lookup.pin_index, lookup.active_low); in acpi_get_gpiod_by_index()
918 lookup.info.adev = adev; in acpi_get_gpiod_by_index()
921 ret = acpi_gpio_resource_lookup(&lookup, info); in acpi_get_gpiod_by_index()
922 return ret ? ERR_PTR(ret) : lookup.desc; in acpi_get_gpiod_by_index()
932 * This function uses the property-based GPIO lookup to get to the GPIO
946 struct acpi_gpio_lookup lookup; in acpi_get_gpiod_from_data() local
955 memset(&lookup, 0, sizeof(lookup)); in acpi_get_gpiod_from_data()
956 lookup.index = index; in acpi_get_gpiod_from_data()
958 ret = acpi_gpio_property_lookup(fwnode, propname, index, &lookup); in acpi_get_gpiod_from_data()
962 ret = acpi_gpio_resource_lookup(&lookup, info); in acpi_get_gpiod_from_data()
963 return ret ? ERR_PTR(ret) : lookup.desc; in acpi_get_gpiod_from_data()
1027 dev_dbg(&adev->dev, "refusing GpioInt() entry when doing GPIOD_OUT_* lookup\n"); in acpi_find_gpio()