Commit eca0f13c authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Chanwoo Choi

extcon: int3496: Ignore incorrect IoRestriction for ID pin

The commit

  70216fd9 ("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

  1b2ca32a ("gpiolib: acpi: Introduce NO_RESTRICTION quirk")

for the details, just set an appropriate quirk flag instead.
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Tested-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
parent ad49aee4
...@@ -50,7 +50,11 @@ static const struct acpi_gpio_params vbus_gpios = { INT3496_GPIO_VBUS_EN, 0, fal ...@@ -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_params mux_gpios = { INT3496_GPIO_USB_MUX, 0, false };
static const struct acpi_gpio_mapping acpi_int3496_default_gpios[] = { 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 }, { "vbus-gpios", &vbus_gpios, 1 },
{ "mux-gpios", &mux_gpios, 1 }, { "mux-gpios", &mux_gpios, 1 },
{ }, { },
...@@ -112,9 +116,6 @@ static int int3496_probe(struct platform_device *pdev) ...@@ -112,9 +116,6 @@ static int int3496_probe(struct platform_device *pdev)
ret = PTR_ERR(data->gpio_usb_id); ret = PTR_ERR(data->gpio_usb_id);
dev_err(dev, "can't request USB ID GPIO: %d\n", ret); dev_err(dev, "can't request USB ID GPIO: %d\n", ret);
return 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); data->usb_id_irq = gpiod_to_irq(data->gpio_usb_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment