1 /* 2 * Copyright (c) 2023 Intel Corporation. 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 struct gpio_acpi_res { 8 uintptr_t reg_base; 9 uint32_t len; 10 uint32_t pad_base; 11 uint8_t num_pins; 12 uint32_t host_owner_reg; 13 uint32_t pad_owner_reg; 14 uint32_t intr_stat_reg; 15 uint16_t base_num; 16 uint16_t irq; 17 uint32_t irq_flags; 18 }; 19 20 /** 21 * @brief Retrieve current resource settings of a gpio device from acpi. 22 * 23 * @param bank_idx band index of the gpio group (eg: gpp_a, gpp_b etc.) 24 * @param hid the hardware id of the acpi device 25 * @param uid the unique id of the acpi device 26 * @param res the pointer to resource struct on which data return 27 * @return return 0 on success or error code 28 */ 29 int soc_acpi_gpio_resource_get(int bank_idx, char *hid, char *uid, struct gpio_acpi_res *res); 30