[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANg-bXA12ZAd9vZFV9L2ffMmcG33ByJ-=+03aB+Rz3OMZQGCgw@mail.gmail.com>
Date: Tue, 2 Jan 2024 13:03:42 -0700
From: Mark Hasemeyer <markhas@...omium.org>
To: Andy Shevchenko <andriy.shevchenko@...el.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>, Rob Herring <robh@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>, Sudeep Holla <sudeep.holla@....com>,
Raul Rangel <rrangel@...omium.org>, Tzung-Bi Shih <tzungbi@...nel.org>,
Bartosz Golaszewski <brgl@...ev.pl>, Len Brown <lenb@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Mika Westerberg <mika.westerberg@...ux.intel.com>, "Rafael J. Wysocki" <rafael@...nel.org>,
Wolfram Sang <wsa@...nel.org>, linux-acpi@...r.kernel.org, linux-gpio@...r.kernel.org,
linux-i2c@...r.kernel.org
Subject: Re: [PATCH v3 02/24] gpiolib: acpi: Modify acpi_dev_irq_wake_get_by()
to use resource
>
> > + *r = DEFINE_RES_NAMED(irq, 1, NULL, res_flags);
>
> So? The whole exercise with the first patch is to have here:
>
> *r = DEFINE_RES_IRQ_NAMED_FLAGS(irq, NULL, res_flags);
Thanks. I was staring at the macro changes in ioport.h for too long...
>
> > + ret = acpi_dev_get_gpio_irq_resource(adev, name, index, &r);
> > + return ret ?: r.start;
>
> Btw, this function requires header to include ioport.h. I'm not sure
> if it's good for ACPI. I would prefer safest approach, i.e. exporting
> this from a C code, i.e. gpiolib-acpi.c.
It actually just needs 'struct resource' declared. I removed the
dependency on ioport.h, but it may make sense to leave the definition
of 'acpi_dev_gpio_irq_get_by()' here because non ACPI based systems
need a default implementation anyway.
Powered by blists - more mailing lists