Hi Bin,

On Sun, 28 Jun 2020 at 03:55, Bin Meng <bmeng...@gmail.com> wrote:
>
> Hi Simon,
>
> On Sun, Jun 14, 2020 at 10:55 AM Simon Glass <s...@chromium.org> wrote:
> >
> > Add a function to write a GPIO descriptor to the generated ACPI code.
> >
> > Signed-off-by: Simon Glass <s...@chromium.org>
> > Reviewed-by: Wolfgang Wallner <wolfgang.wall...@br-automation.com>
> > ---
> >
> > (no changes since v1)
> >
> >  include/acpi/acpi_device.h |  22 ++++++
> >  lib/acpi/acpi_device.c     | 151 +++++++++++++++++++++++++++++++++++++
> >  test/dm/acpigen.c          |  89 ++++++++++++++++++++++
> >  3 files changed, 262 insertions(+)
> >
> > diff --git a/include/acpi/acpi_device.h b/include/acpi/acpi_device.h
> > index cb9166aeae..5f229d79cf 100644
> > --- a/include/acpi/acpi_device.h
> > +++ b/include/acpi/acpi_device.h
> > @@ -12,6 +12,7 @@
> >  #include <linux/bitops.h>
> >
> >  struct acpi_ctx;
> > +struct gpio_desc;
> >  struct irq;
> >  struct udevice;
> >
> > @@ -233,4 +234,25 @@ enum acpi_dev_status acpi_device_status(const struct 
> > udevice *dev);
> >  int acpi_device_write_interrupt_irq(struct acpi_ctx *ctx,
> >                                     const struct irq *req_irq);
> >
> > +/**
> > + * acpi_device_write_gpio() - Write GpioIo() or GpioInt() descriptor
> > + *
> > + * @gpio: GPIO information to write
> > + * @return 0 if OK, -ve on error
> > + */
> > +int acpi_device_write_gpio(struct acpi_ctx *ctx, const struct acpi_gpio 
> > *gpio);
> > +
> > +/**
> > + * acpi_device_write_gpio_desc() - Write a GPIO to ACPI
> > + *
> > + * This creates a GPIO descriptor for a GPIO, including information ACPI 
> > needs
> > + * to use it. The type is always ACPI_GPIO_TYPE_IO.
>
> Why is the type always ACPI_GPIO_TYPE_IO? Is gpio_get_acpi() supposed
> to hard code gpio->type to ACPI_GPIO_TYPE_IO?

Actually that is no-longer true, so I'll drop that comment.

Regards,
Simon

Reply via email to