Lines Matching refs:agpio
210 struct acpi_resource_gpio **agpio) in acpi_gpio_get_irq_resource() argument
221 *agpio = gpio; in acpi_gpio_get_irq_resource()
236 struct acpi_resource_gpio **agpio) in acpi_gpio_get_io_resource() argument
247 *agpio = gpio; in acpi_gpio_get_io_resource()
289 acpi_gpio_to_gpiod_flags(const struct acpi_resource_gpio *agpio, int polarity) in acpi_gpio_to_gpiod_flags() argument
292 if (agpio->connection_type == ACPI_RESOURCE_GPIO_TYPE_INT) in acpi_gpio_to_gpiod_flags()
295 switch (agpio->io_restriction) { in acpi_gpio_to_gpiod_flags()
308 switch (agpio->pin_config) { in acpi_gpio_to_gpiod_flags()
329 struct acpi_resource_gpio *agpio, in acpi_request_own_gpiod() argument
334 enum gpiod_flags flags = acpi_gpio_to_gpiod_flags(agpio, polarity); in acpi_request_own_gpiod()
335 unsigned int pin = agpio->pin_table[index]; in acpi_request_own_gpiod()
344 ret = gpio_set_debounce_timeout(desc, agpio->debounce_timeout * 10); in acpi_request_own_gpiod()
390 const struct acpi_resource_gpio *agpio) in acpi_gpio_irq_is_wake() argument
392 unsigned int pin = agpio->pin_table[0]; in acpi_gpio_irq_is_wake()
394 if (agpio->wake_capable != ACPI_WAKE_CAPABLE) in acpi_gpio_irq_is_wake()
411 struct acpi_resource_gpio *agpio; in acpi_gpiochip_alloc_event() local
419 if (!acpi_gpio_get_irq_resource(ares, &agpio)) in acpi_gpiochip_alloc_event()
423 pin = agpio->pin_table[0]; in acpi_gpiochip_alloc_event()
428 agpio->triggering == ACPI_EDGE_SENSITIVE ? 'E' : 'L', in acpi_gpiochip_alloc_event()
445 desc = acpi_request_own_gpiod(chip, agpio, 0, "ACPI:Event"); in acpi_gpiochip_alloc_event()
474 if (agpio->triggering == ACPI_LEVEL_SENSITIVE) { in acpi_gpiochip_alloc_event()
475 if (agpio->polarity == ACPI_ACTIVE_HIGH) in acpi_gpiochip_alloc_event()
480 switch (agpio->polarity) { in acpi_gpiochip_alloc_event()
497 event->irq_is_wake = acpi_gpio_irq_is_wake(chip->parent, agpio); in acpi_gpiochip_alloc_event()
762 const struct acpi_resource_gpio *agpio = &ares->data.gpio; in acpi_populate_gpio_lookup() local
763 bool gpioint = agpio->connection_type == ACPI_RESOURCE_GPIO_TYPE_INT; in acpi_populate_gpio_lookup()
774 if (pin_index >= agpio->pin_table_length) in acpi_populate_gpio_lookup()
778 desc = gpio_to_desc(agpio->pin_table[pin_index]); in acpi_populate_gpio_lookup()
780 desc = acpi_get_gpiod(agpio->resource_source.string_ptr, in acpi_populate_gpio_lookup()
781 agpio->pin_table[pin_index]); 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()
786 lookup->info.wake_capable = acpi_gpio_irq_is_wake(&lookup->info.adev->dev, agpio); 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()
802 lookup->info.flags = acpi_gpio_to_gpiod_flags(agpio, lookup->info.polarity); in acpi_populate_gpio_lookup()
1140 struct acpi_resource_gpio *agpio; in acpi_gpio_adr_space_handler() local
1157 agpio = &ares->data.gpio; in acpi_gpio_adr_space_handler()
1159 if (WARN_ON(agpio->io_restriction == ACPI_IO_RESTRICT_INPUT && in acpi_gpio_adr_space_handler()
1165 length = min_t(u16, agpio->pin_table_length, pin_index + bits); in acpi_gpio_adr_space_handler()
1167 unsigned int pin = agpio->pin_table[i]; in acpi_gpio_adr_space_handler()
1188 if (!found && agpio->shareable == ACPI_SHARED && in acpi_gpio_adr_space_handler()
1202 desc = acpi_request_own_gpiod(chip, agpio, i, "ACPI:OpRegion"); in acpi_gpio_adr_space_handler()