From: "andriy.shevchenko@linux.intel.com" <andriy.shevchenko@linux.intel.com>
To: "Stanimir, Vasile-Laurentiu" <Vasile-Laurentiu.Stanimir@windriver.com>
Cc: "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
"mika.westerberg@linux.intel.com"
<mika.westerberg@linux.intel.com>
Subject: Re: [PATCH] gpiolib-acpi: Set gpiod flags for ACPI GPIO resources based on pullup and polarity
Date: Mon, 2 Dec 2019 15:05:53 +0200 [thread overview]
Message-ID: <20191202130553.GG32742@smile.fi.intel.com> (raw)
In-Reply-To: <D4218E93E3D74741B4028993B2A8DBE0534BF84B@ALA-MBD.corp.ad.wrs.com>
On Mon, Dec 02, 2019 at 12:36:47PM +0000, Stanimir, Vasile-Laurentiu wrote:
> From f8093f2c73c636b75fcf4dee4178af0e24c2f878 Mon Sep 17 00:00:00 2001
> From: Vasile-Laurentiu Stanimir <vasile-laurentiu.stanimir@windriver.com>
> Date: Mon, 2 Dec 2019 14:20:11 +0200
> Subject: [PATCH] gpiolib-acpi: Set gpiod flags for ACPI GPIO resources based
> on pullup and polarity
>
> ACPI GPIO resources don't contain an initial value for the
> GPIO. Therefore instead of deducting its value based on pullup field
> we should deduce that value from the polarity and the pull field.
> Typical scenario is when ACPI is defined in acpi-table and its polarity
> is defined as ACTIVE-LOW in the following call:
>
> acpi_populate_gpio_lookup(struct acpi_resource *ares, void *data)
> acpi_gpio_to_gpiod_flags(const struct acpi_resource_gpio *agpio)
>
> it will return GPIOD_OUT_HIGH if pull_up is set no matter if
> polarity is GPIO_ACTIVE_LOW, so it will return the current level instead
> of the logical level.
Thank you for the patch.
I have question in general. If we have Active Low polarity and Pull Down,
isn't it simple a bad ACPI table and rather quirk is needed here?
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2019-12-02 13:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-02 12:36 [PATCH] gpiolib-acpi: Set gpiod flags for ACPI GPIO resources based on pullup and polarity Stanimir, Vasile-Laurentiu
2019-12-02 13:05 ` andriy.shevchenko [this message]
2019-12-02 13:44 ` Stanimir, Vasile-Laurentiu
2019-12-02 14:08 ` andriy.shevchenko
2019-12-03 15:24 ` Stanimir, Vasile-Laurentiu
2019-12-04 14:08 ` andriy.shevchenko
2019-12-05 17:49 ` andriy.shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191202130553.GG32742@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=Vasile-Laurentiu.Stanimir@windriver.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).