[PATCH v4 07/35] gpio: Add a method to convert a GPIO to ACPI

Bin Meng bmeng.cn at gmail.com
Mon Jul 13 04:44:12 CEST 2020


On Wed, Jul 8, 2020 at 3:12 AM Simon Glass <sjg at 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 at chromium.org>
> Reviewed-by: Wolfgang Wallner <wolfgang.wallner at 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 at gmail.com>


More information about the U-Boot mailing list