All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chanwoo Choi <cw00.choi@samsung.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	MyungJoo Ham <myungjoo.ham@samsung.com>,
	linux-kernel@vger.kernel.org, Hans de Goede <hdegoede@redhat.com>
Subject: Re: [PATCH v2] extcon: int3496: Ignore incorrect IoRestriction for ID pin
Date: Fri, 02 Mar 2018 07:41:47 +0900	[thread overview]
Message-ID: <5A9881AB.6030203@samsung.com> (raw)
In-Reply-To: <20180228162208.42497-1-andriy.shevchenko@linux.intel.com>

On 2018년 03월 01일 01:22, Andy Shevchenko wrote:
> The commit
> 
>   70216fd937fe ("extcon: int3496: Set the id pin to direction-input if necessary")
> 
> introduced a workaround for incorrect IoRestriction mode in ACPI table.
> 
> Now, when GPIO ACPI library does it in generic way, see the commit
> 
>   1b2ca32ab0b8 ("gpiolib: acpi: Introduce NO_RESTRICTION quirk")
> 
> for the details, just set an appropriate quirk flag instead.
> 
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
> Tested-by: Hans de Goede <hdegoede@redhat.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> - add tags
> - address comments from Chanwoo
>  drivers/extcon/extcon-intel-int3496.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/extcon/extcon-intel-int3496.c b/drivers/extcon/extcon-intel-int3496.c
> index 191e99f06a9a..acaccb128fc4 100644
> --- a/drivers/extcon/extcon-intel-int3496.c
> +++ b/drivers/extcon/extcon-intel-int3496.c
> @@ -50,7 +50,11 @@ 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 },
> +	/*
> +	 * Some platforms have a bug in ACPI GPIO description making IRQ
> +	 * GPIO to be output only. Ask the GPIO core to ignore this limit.
> +	 */
> +	{ "id-gpios", &id_gpios, 1, ACPI_GPIO_QUIRK_NO_IO_RESTRICTION },
>  	{ "vbus-gpios", &vbus_gpios, 1 },
>  	{ "mux-gpios", &mux_gpios, 1 },
>  	{ },
> @@ -112,9 +116,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);
>  	}
>  
>  	data->usb_id_irq = gpiod_to_irq(data->gpio_usb_id);
> 

Applied it. Thanks.

-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

      reply	other threads:[~2018-03-01 22:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20180228162213epcas3p3e05172d30ecd01c2b99a4435a1bce0b7@epcas3p3.samsung.com>
2018-02-28 16:22 ` [PATCH v2] extcon: int3496: Ignore incorrect IoRestriction for ID pin Andy Shevchenko
2018-03-01 22:41   ` Chanwoo Choi [this message]

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=5A9881AB.6030203@samsung.com \
    --to=cw00.choi@samsung.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=myungjoo.ham@samsung.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 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.