All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	linux-gpio@vger.kernel.org,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	linux-acpi@vger.kernel.org
Subject: Re: [PATCH v1 6/6] gpiolib: acpi: Introduce NO_RESTRICTION quirk
Date: Mon, 13 Nov 2017 15:10:48 +0200	[thread overview]
Message-ID: <1510578648.25007.166.camel@linux.intel.com> (raw)
In-Reply-To: <20171113115554.GY18997@lahna.fi.intel.com>

On Mon, 2017-11-13 at 13:55 +0200, Mika Westerberg wrote:
> On Fri, Nov 10, 2017 at 03:40:33PM +0200, Andy Shevchenko wrote:
> > Allow to relax IoRestriction for certain cases.
> > 
> > One of the use case is incorrectly cooked ACPI table where interrupt
> > pin is
> > defined with GpioIo() macro with IoRestrictionOutputOnly.
> > 
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> I think you should include user of this quirk in the patch series as
> well. Otherwise it is pretty pointless to add random quirks without
> real issues they are supposed to solve ;-)

Something like below?

--- a/drivers/extcon/extcon-intel-int3496.c
+++ b/drivers/extcon/extcon-intel-int3496.c
@@ -50,7 +50,7 @@ static const struct acpi_gpio_params vbus_gpios = {
INT3496_GPIO_VBUS_EN, 0, fal
 static const struct acpi_gpio_params mux_gpios = {
INT3496_GPIO_USB_MUX, 0, false };
 
 static const struct acpi_gpio_mapping acpi_int3496_default_gpios[] = {
-       { "id-gpios", &id_gpios, 1 },
+       { "id-gpios", &id_gpios, 1, ACPI_GPIO_QUIRK_NO_IO_RESTRICTION },
        { "vbus-gpios", &vbus_gpios, 1 },
        { "mux-gpios", &mux_gpios, 1 },
        { },
@@ -112,9 +112,6 @@ static int int3496_probe(struct platform_device
*pdev)
                ret = PTR_ERR(data->gpio_usb_id);
                dev_err(dev, "can't request USB ID GPIO: %d\n", ret);
                return ret;
-       } else if (gpiod_get_direction(data->gpio_usb_id) !=
GPIOF_DIR_IN) {
-               dev_warn(dev, FW_BUG "USB ID GPIO not in input mode,
fixing\n");
-               gpiod_direction_input(data->gpio_usb_id);
        }

> 
> Anyway looks good to me,
> 
> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>

Thanks!

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

  reply	other threads:[~2017-11-13 13:10 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-10 13:40 [PATCH v1 1/6] gpiolib: acpi: Assign polarity when call acpi_populate_gpio_lookup() Andy Shevchenko
2017-11-10 13:40 ` [PATCH v1 2/6] gpiolib: acpi: Don't contaminate return parameter in case of error Andy Shevchenko
2017-11-13 11:15   ` Mika Westerberg
2017-11-29 12:28   ` Linus Walleij
2017-11-10 13:40 ` [PATCH v1 3/6] gpiolib: acpi: Move adev member to struct acpi_gpio_info Andy Shevchenko
2017-11-13 11:23   ` Mika Westerberg
2017-11-29 12:30   ` Linus Walleij
2017-11-10 13:40 ` [PATCH v1 4/6] gpiolib: acpi: Consolidate debug output in acpi_gpio_update_gpiod_flags() Andy Shevchenko
2017-11-13 11:25   ` Mika Westerberg
2017-11-29 12:31   ` Linus Walleij
2017-11-10 13:40 ` [PATCH v1 5/6] gpiolib: acpi: Add quirks field to struct acpi_gpio_mapping Andy Shevchenko
2017-11-13 11:44   ` Mika Westerberg
2017-11-29 12:32   ` Linus Walleij
2017-11-10 13:40 ` [PATCH v1 6/6] gpiolib: acpi: Introduce NO_RESTRICTION quirk Andy Shevchenko
2017-11-13 11:55   ` Mika Westerberg
2017-11-13 13:10     ` Andy Shevchenko [this message]
2017-11-13 13:19       ` Mika Westerberg
2017-11-29 12:35       ` Linus Walleij
2017-11-29 13:41         ` Andy Shevchenko
2017-11-30  9:57           ` Linus Walleij
2017-11-30 11:07             ` Andy Shevchenko
2017-11-29 12:34   ` Linus Walleij
2017-11-13 11:07 ` [PATCH v1 1/6] gpiolib: acpi: Assign polarity when call acpi_populate_gpio_lookup() Mika Westerberg
2017-11-18 14:55 ` Rafael J. Wysocki
2017-11-18 16:45   ` Andy Shevchenko
2017-11-29 12:27 ` Linus Walleij

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=1510578648.25007.166.camel@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rjw@rjwysocki.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.