
On Wed, Jul 8, 2020 at 3:12 AM Simon Glass sjg@chromium.org wrote:
When generating ACPI tables we need to convert GPIOs in U-Boot to the ACPI structures required by ACPI. This is a SoC-specific conversion and cannot be handled by generic code, so add a new GPIO method to do the conversion.
Signed-off-by: Simon Glass sjg@chromium.org Reviewed-by: Wolfgang Wallner wolfgang.wallner@br-automation.com
Changes in v4:
- Use memset() to zero struct acpi_gpio in gpio_get_acpi()
- Move common code about the if...else in sb_gpio_get_acpi()
- Don't set zero fields in sb_gpio_get_acpi(), and add a comment about it
- Update acpi_device_write_interrupt_irq() to return IRQ pin number
Changes in v1:
- Update sandbox driver slightly for testing
drivers/gpio/gpio-uclass.c | 22 ++++++++++ drivers/gpio/sandbox.c | 77 ++++++++++++++++++++++++++++++++ include/acpi/acpi_device.h | 90 ++++++++++++++++++++++++++++++++++++++ include/asm-generic/gpio.h | 27 ++++++++++++ test/dm/gpio.c | 62 ++++++++++++++++++++++++++ 5 files changed, 278 insertions(+)
Reviewed-by: Bin Meng bmeng.cn@gmail.com